Skip to content

Commit e2254fe

Browse files
committed
Update configuration to load environment variables and enhance cross pollinate command functionality. Modify image handling for private responses and update prompt label for clarity.
1 parent d9e43e9 commit e2254fe

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

cogs/cross_pollinate_cog.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async def bookmark(
9797
(
9898
field
9999
for field in interaction_data["fields"]
100-
if field["name"] == "Cross-Pollinate Prompt"
100+
if field["name"] == "Cross-Pollinate Prompt 🐝"
101101
),
102102
None,
103103
)
@@ -252,11 +252,8 @@ async def generate_cross_pollinate_embed(
252252
inline=False,
253253
)
254254

255-
# Set the image: use attachment reference for public, direct URL for private
256-
if not private:
257-
embed.set_image(url="attachment://cross_pollinated_image.png")
258-
else:
259-
embed.set_image(url=dic["url"])
255+
# Always use attachment reference since we send file attachments for both private and public
256+
embed.set_image(url="attachment://cross_pollinated_image.png")
260257

261258
if not private:
262259
embed.set_footer(
@@ -372,8 +369,8 @@ async def cross_pollinate_command(
372369
)
373370

374371
if private:
375-
# For private responses, send embed without view and without file attachment
376-
await interaction.followup.send(embed=embed, ephemeral=True)
372+
# For private responses, send embed with file attachment but no view
373+
await interaction.followup.send(embed=embed, file=image_file, ephemeral=True)
377374
else:
378375
# For public responses, send embed with view and file attachment
379376
view: discord.ui.View = CrossPollinateButtonView()

config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import re
99
import aiohttp
1010
import asyncio
11+
from dotenv import load_dotenv
1112

13+
load_dotenv(override=True)
1214

1315
class BotConfig(BaseModel):
1416
command_prefix: str

0 commit comments

Comments
 (0)