Browse Source

simplifying the delete message

master
manetta 3 years ago
parent
commit
d371d90be4
  1. 6
      LogBot/logbot.py

6
LogBot/logbot.py

@ -234,12 +234,12 @@ class Logbot(Bot):
f"To be deleted: { self.db[message.room]['messages'][key] }" f"To be deleted: { self.db[message.room]['messages'][key] }"
) )
if 'media' in 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'] }" reply = f"Deleted: { self.db[message.room]['messages'][key]['media']['url'] }"
else: else:
reply = f"This message is deleted: { self.db[message.room]['messages'][key]['post'] }" reply = f"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 one is already gone!"
# Response to @title # Response to @title
elif "@title" in message.text: elif "@title" in message.text:

Loading…
Cancel
Save