Handle exception if webhook message is already deleted on Discord

This commit is contained in:
git-bruh 2020-12-13 12:25:39 +05:30
parent d93cbf54eb
commit 1cd39355b4
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -327,6 +327,9 @@ class Callbacks(object):
try:
message = message_store[event.redacts]
await message.delete()
except discord.errors.NotFound as e:
matrix_logger.warning(
f"Failed to delete message {event.event_id}: {e}")
except KeyError:
pass