Delete old webhook message on edit
This commit is contained in:
parent
2e6b979ffa
commit
d4551a5c61
1 changed files with 8 additions and 10 deletions
18
main.py
18
main.py
|
@ -239,16 +239,14 @@ class Callbacks(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
# https://github.com/Rapptz/discord.py/issues/6058
|
# https://github.com/Rapptz/discord.py/issues/6058
|
||||||
# content_dict = event.source.get("content")
|
content_dict = event.source.get("content")
|
||||||
# try:
|
try:
|
||||||
# if content_dict["m.relates_to"]["rel_type"] == "m.replace":
|
if content_dict["m.relates_to"]["rel_type"] == "m.replace":
|
||||||
# edited_event = content_dict["m.relates_to"]["event_id"]
|
edited_event = content_dict["m.relates_to"]["event_id"]
|
||||||
# edited_content = content_dict["m.new_content"]["body"]
|
webhook_message = message_store[edited_event]
|
||||||
# webhook_message = message_cache[edited_event]
|
await webhook_message.delete()
|
||||||
# await something_edit_webhook(webhook_message, edited_content)
|
except KeyError:
|
||||||
# return
|
pass
|
||||||
# except KeyError:
|
|
||||||
# pass
|
|
||||||
|
|
||||||
message = event.body
|
message = event.body
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue