From d78a697f4750f01d17607df73ef06dadb0868ba6 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Fri, 30 Sep 2016 08:40:14 +0100 Subject: [PATCH] Don't complain if we don't have a channel to join. --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index fce9d1a..89dca1d 100755 --- 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: -- 2.7.4