Don't complain if we don't have a channel to join.
authorCMDR furrycat <elite@furrycat.net>
Fri, 30 Sep 2016 07:40:14 +0000 (08:40 +0100)
committerCMDR furrycat <elite@furrycat.net>
Fri, 30 Sep 2016 07:40:14 +0000 (08:40 +0100)
bot.py

diff --git a/bot.py b/bot.py
index fce9d1a..89dca1d 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -606,7 +606,8 @@ def voice_channel_for_channel(channel):
 @asyncio.coroutine
 def maybe_play_sound(channel, filename, *, probability = 0.05, join = True):
   if not channel or not filename:
-    log.warning('Missing channel and/or filename for play_sound()')
+    if join:
+      log.warning('Missing channel and/or filename for play_sound()')
     return False
 
   if random.random() > probability: