From: CMDR furrycat Date: Fri, 7 Oct 2016 09:07:16 +0000 (+0100) Subject: Time command. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=d9422c17d9628d5715a4573977955a440d90f961;p=furrycat%2Fcatbot.git Time command. --- diff --git a/bot.py b/bot.py index 14254f8..37ff8ea 100755 --- 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,