Drinks show affection.
authorCMDR furrycat <elite@furrycat.net>
Mon, 30 Jan 2017 15:16:10 +0000 (15:16 +0000)
committerCMDR furrycat <elite@furrycat.net>
Mon, 30 Jan 2017 15:16:10 +0000 (15:16 +0000)
plugin/affection/affection.py

index 8659a42..cda817b 100644 (file)
@@ -6,13 +6,14 @@ import bot
 class Affection(object):
   def __init__(self):
     self.eat = ['biscuit', 'catnip', 'food', 'fish', 'lollipop', 'sausage', 'treat']
+    self.drink = ['beer', 'juice', 'milk', 'water']
     self.fuss = ['fuss', 'hug', 'love', 'nice', 'pat', 'pet', 'stroke']
 
   def description(self):
     return 'Respond (or not) to displays of affection.'
 
   def secret_commands(self):
-    return self.eat + self.fuss
+    return self.eat + self.drink + self.fuss
 
   @asyncio.coroutine
   def handle_command(self, message, command, raw):
@@ -36,6 +37,8 @@ class Affection(object):
   def handle_affection(self, message, command):
     if command in self.eat:
       responses = ['om nom nom', '^-^', 'meow!', 'lick', ':cat:', ':fork_and_knife:']
+    elif command in self.drink:
+      responses = ['slurp', '^-^', 'meow!', 'lap lap lap', 'lick', ':cat:', ':tropical_drink:']
     else:
       responses = ['nuzzle', '^-^', 'meow!', 'mrrp', ':cat:', ':paw_prints:']
     for response in responses: