Time command.
authorCMDR furrycat <elite@furrycat.net>
Fri, 7 Oct 2016 09:07:16 +0000 (10:07 +0100)
committerCMDR furrycat <elite@furrycat.net>
Fri, 7 Oct 2016 09:07:16 +0000 (10:07 +0100)
bot.py

diff --git a/bot.py b/bot.py
index 14254f8..37ff8ea 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -514,6 +514,12 @@ def do_commands(message, command, raw, non_admin):
 
     rsstime.value = int(m.group(1))
 
+  elif command == 'time':
+    # time
+    yield from say(message.channel, iso8601(int(time.time())))
+    yield from maybe_play_sound(voice_channel_for_channel(message.channel), 'purr.wav', join = False)
+    return
+
   elif command in ['treat', 'stroke', 'fuss', 'pat']:
     # treat
     if command == 'treat':
@@ -1203,7 +1209,7 @@ modules = {
   'any': {
     'fn': do_commands,
     'args': [True],
-    'commands': ['bling', 'fuss', 'stroke', 'treat', 'pat']
+    'commands': ['bling', 'fuss', 'stroke', 'time', 'treat', 'pat']
   },
   'edi': {
     'fn': do_edi,