From 5b8f6b88a7a63808bd44436160d988f33295cd98 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Wed, 12 Oct 2016 19:15:35 +0100 Subject: [PATCH] Summarise voice-only announcements. --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 30c03f5..20e2ac5 100755 --- a/bot.py +++ b/bot.py @@ -907,10 +907,11 @@ def list_announcements(message): if announcement['channel_id']: if announcement['channel_id'] != 'private': text += ' in <#{}>'.format(announcement['channel_id']) - elif announcement['voice_id']: + if announcement['voice_id']: if announcement['sound']: text += ' sound {}'.format(announcement['sound']) - text += ' in <#{}>'.format(announcement['voice_id']) + if announcement['voice_id'] != announcement['channel_id']: + text += ' in <#{}>'.format(announcement['voice_id']) if announcement['message']: short = announcement['message'][:100] if short != announcement['message']: -- 2.7.4