From 32b1ec7aa21d59166458eb2bb1826c628ec8013b Mon Sep 17 00:00:00 2001 From: sco1 Date: Fri, 28 Dec 2018 14:58:28 -0500 Subject: Fix channel grabbing logic --- bot/cogs/defcon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/cogs/defcon.py b/bot/cogs/defcon.py index d26170444..a29f4599e 100644 --- a/bot/cogs/defcon.py +++ b/bot/cogs/defcon.py @@ -265,11 +265,12 @@ class Defcon: """ if self.enabled: - new_topic = f"{BASE_CHANNEL_TOPIC}\n(Status: Enabled, Threshold: {self.days} days)" + day_str = "days" if self.days > 1 else "day" + new_topic = f"{BASE_CHANNEL_TOPIC}\n(Status: Enabled, Threshold: {self.days} {day_str})" else: new_topic = f"{BASE_CHANNEL_TOPIC}\n(Status: Disabled)" - defcon_channel = await self.bot.guild.get_channel(Channels.defcon) + defcon_channel = self.bot.guilds[0].get_channel(Channels.defcon) await defcon_channel.edit(topic=new_topic) -- cgit v1.2.3