Allow create voice only announcement without specifying fake channel.
authorCMDR furrycat <elite@furrycat.net>
Thu, 6 Oct 2016 15:58:21 +0000 (16:58 +0100)
committerCMDR furrycat <elite@furrycat.net>
Thu, 6 Oct 2016 15:59:29 +0000 (16:59 +0100)
bot.py

diff --git a/bot.py b/bot.py
index 10f8289..dbe9f7f 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -987,8 +987,11 @@ def create_announcement(message, raw):
     return
 
   if 'channel_id' not in create:
-    yield from say(message.channel, 'Missing channel!')
-    return
+    if 'voice_id' in create:
+      create['channel_id'] = create['voice_id']
+    else:
+      yield from say(message.channel, 'Missing channel!')
+      return
 
   if create['channel_id'] == 'private':
     create['server_id'] = 'private'