Handle exception if webhook message is already deleted on Discord
This commit is contained in:
parent
d93cbf54eb
commit
1cd39355b4
1 changed files with 3 additions and 0 deletions
3
main.py
3
main.py
|
@ -327,6 +327,9 @@ class Callbacks(object):
|
||||||
try:
|
try:
|
||||||
message = message_store[event.redacts]
|
message = message_store[event.redacts]
|
||||||
await message.delete()
|
await message.delete()
|
||||||
|
except discord.errors.NotFound as e:
|
||||||
|
matrix_logger.warning(
|
||||||
|
f"Failed to delete message {event.event_id}: {e}")
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue