fix: send another message if reply fails
This commit is contained in:
parent
03a8014d2f
commit
3930175c79
@ -27,13 +27,21 @@ async def reply(message, *args, **kwargs):
|
||||
kwargs["content"] = None
|
||||
elif len(kwargs) == 0:
|
||||
kwargs["embeds"] = []
|
||||
|
||||
try:
|
||||
await message_responses[message.id].edit(
|
||||
*args, **kwargs, allowed_mentions=disnake.AllowedMentions.none()
|
||||
)
|
||||
else:
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
response = await message.reply(
|
||||
*args, **kwargs, allowed_mentions=disnake.AllowedMentions.none()
|
||||
)
|
||||
except Exception:
|
||||
response = await channel_send(message, *args, **kwargs)
|
||||
message_responses[message.id] = response
|
||||
return message_responses[message.id]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user