Skip to content
Snippets Groups Projects
Commit 21f887bf authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Add congratulations reply and fix it responding all the time with "sorry"

parent 882d9d68
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,14 @@ class Justforfun(BotPlugin): ...@@ -11,7 +11,14 @@ class Justforfun(BotPlugin):
# The bot has been mentioned # The bot has been mentioned
cmp_message = message.body.casefold() cmp_message = message.body.casefold()
if 'thank' in cmp_message:
self.send(message.to, "you're welcome") good = ['thank']
if 'silly' or 'bad' in cmp_message: bad = ['silly', 'bad']
self.send(message.to, "sorry") congrat = ['congrats', 'congratulations']
if any(s in cmp_message for s in good):
self.send(message.to, "you're welcome", message)
if any(s in cmp_message for s in bad):
self.send(message.to, "sorry", message)
if any(s in cmp_message for s in congrat):
self.send(message.to, "thank you", message)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment