forked from varia/bots
editing the delete reply message, to display the url of the media file
This commit is contained in:
parent
6d7009d81c
commit
7e6d6bd846
@ -233,7 +233,10 @@ class Logbot(Bot):
|
|||||||
self.log.info(
|
self.log.info(
|
||||||
f"To be deleted: { self.db[message.room]['messages'][key] }"
|
f"To be deleted: { self.db[message.room]['messages'][key] }"
|
||||||
)
|
)
|
||||||
reply = f"This message is deleted: { self.db[message.room]['messages'][key] }"
|
if 'media' in self.db[message.room]['messages'][key]:
|
||||||
|
reply = f"This message is deleted: { self.db[message.room]['messages'][key]['media']['url'] }"
|
||||||
|
else:
|
||||||
|
reply = f"This message is deleted: { self.db[message.room]['messages'][key]['post'] }"
|
||||||
del self.db[message.room]["messages"][key]
|
del self.db[message.room]["messages"][key]
|
||||||
else:
|
else:
|
||||||
reply = "This message is already gone!"
|
reply = "This message is already gone!"
|
||||||
|
Loading…
Reference in New Issue
Block a user