Handle exception if edited message is deleted on Discord
This commit is contained in:
parent
6e869e724c
commit
ed6562233b
1 changed files with 8 additions and 1 deletions
7
main.py
7
main.py
|
@ -288,7 +288,14 @@ class Callbacks(object):
|
|||
content_dict["m.new_content"]["body"], channel_id
|
||||
)
|
||||
webhook_message = message_store[edited_event]
|
||||
|
||||
try:
|
||||
await webhook_message.edit(content=edited_content)
|
||||
except discord.errors.NotFound as e:
|
||||
matrix_logger.warning(
|
||||
f"Failed to edit message {edited_event}: {e}"
|
||||
)
|
||||
|
||||
return
|
||||
except KeyError:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue