Don't wake up to say certain things.
authorCMDR furrycat <elite@furrycat.net>
Thu, 29 Sep 2016 10:08:34 +0000 (11:08 +0100)
committerCMDR furrycat <elite@furrycat.net>
Thu, 29 Sep 2016 10:08:34 +0000 (11:08 +0100)
bot.py

diff --git a/bot.py b/bot.py
index c550624..123fbf4 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -252,7 +252,7 @@ def do_commands(message, command, raw, non_admin):
       url = message.attachments[0]['url']
     if url is None:
       log.debug('No URL for avatar')
-      yield from say(message.channel, 'zzz')
+      yield from say(message.channel, 'zzz', wake = False)
       return
     result = yield from set_avatar(url)
     if not result:
@@ -289,7 +289,7 @@ def do_commands(message, command, raw, non_admin):
       url = message.author.avatar_url
     if url is None:
       log.debug('No URL for avatar to Deltaify')
-      yield from say(message.channel, 'zzz')
+      yield from say(message.channel, 'zzz', wake = False)
       return
     yield from client.send_typing(message.channel)
     data = delta_avatar(url)
@@ -315,7 +315,7 @@ def do_commands(message, command, raw, non_admin):
   elif command == 'delete':
     # delete
     if message.channel.is_private:
-      yield from say(message.channel, 'hiss')
+      yield from say(message.channel, 'hiss', wake = False)
       return
 
     args = {}
@@ -358,7 +358,7 @@ def do_commands(message, command, raw, non_admin):
       if said:
         return
 
-  yield from maybe_say(message.channel, 'purr')
+  yield from maybe_say(message.channel, 'purr', wake = False)
 
 @asyncio.coroutine
 def do_edi(message, command, raw, p):
@@ -555,7 +555,10 @@ def process_module(message, command, raw):
       yield from fn(message, command, raw, *args)
       return
   log.debug('Unrecognised command!')
-  yield from maybe_say(message.channel, 'meow!')
+  if status() == discord.Status.idle:
+    yield from maybe_say(message.channel, 'zzz', wake = False)
+  else:
+    yield from maybe_say(message.channel, 'meow!')
 
 @asyncio.coroutine
 def channels_to_greet():