Skip to content

Commit 05ef52b

Browse files
committed
Fix color format in config.template.toml and update embed generation logic; add error handling for message deletion
1 parent 8da002b commit 05ef52b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

config.template.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ api_provider_url = "https://pollinations.ai/"
7676
bot_creator_avatar = ""
7777

7878
[ui.colors]
79-
success = "0x7289da" # og_blurple
79+
success = "0x7289DA" # og_blurple
8080
error = "0xe74c3c" # red
8181
warning = "0xf1c40f" # yellow
8282

utils/embed_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ async def generate_pollinate_embed(
1818
title="",
1919
timestamp=datetime.datetime.now(datetime.timezone.utc),
2020
url=dic["url"],
21-
color=int(config.ui.colors.success, 16),
2221
)
2322

2423
embed.add_field(

utils/error_handler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ async def send_error_embed(
1515
if not interaction.response.is_done():
1616
await interaction.response.send_message(embed=embed, ephemeral=True)
1717
else:
18+
# try to delete the previous message
19+
try:
20+
await interaction.followup.delete_previous_message()
21+
except Exception:
22+
pass
1823
await interaction.followup.send(embed=embed, ephemeral=True)

0 commit comments

Comments
 (0)