adding a @url reply to logbot

This commit is contained in:
manetta 2022-02-18 17:05:36 +01:00
parent ae2b4cee3a
commit 3c3216c327

View File

@ -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]