fix: exception

This commit is contained in:
2025-11-05 11:34:19 +01:00
parent 0615b2fd6d
commit 8ec3ea9914

View File

@@ -463,5 +463,12 @@ async def handle_message(message, bot):
and not message.embeds and not message.embeds
and message.channel.id == GENERAL_CHANNEL and message.channel.id == GENERAL_CHANNEL
): ):
try:
# Try to fetch the message to see if it still exists
await message.channel.fetch_message(message.id)
await message.reply("You do not have embed permissions on this server") await message.reply("You do not have embed permissions on this server")
return except discord.NotFound:
logger.warning(
f"Message {message.id} was deleted before reply could be sent in channel {message.channel.id}"
)
pass