mirror of
https://github.com/alterware/aw-bot.git
synced 2025-11-18 09:02:07 +00:00
fix: exception
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user