Browse Source

adding a @url reply to logbot

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

6
LogBot/logbot.py

@ -33,6 +33,8 @@ class Logbot(Bot):
logbot @font <font>: Switch to another font. For example: logbot @font font. Available fonts include: polsku, notcouriersans; or select None to switch back to default serif.
logbot @url: Ask logbot to send the url of the log.
logbot @uptime: To check how long @logbot has been around
@bots: To see who is around :)
@ -216,6 +218,10 @@ class Logbot(Bot):
self._add_to_db(message)
reply = "Added, thanks!"
# Response to @url
elif "@url" in message.text:
reply = f"{ self.baseurl }{ self.db["folder"] }/"
# Response to @delete
elif "@delete" in message.text:
match = re.findall(r"@delete \d*", message.content)[0]

Loading…
Cancel
Save