diff options
| author | 2018-12-28 14:58:28 -0500 | |
|---|---|---|
| committer | 2018-12-28 14:58:28 -0500 | |
| commit | 32b1ec7aa21d59166458eb2bb1826c628ec8013b (patch) | |
| tree | ab9e1aa525838f21ca65d945914485fc1fa41778 | |
| parent | Add defcon channel topic updating (diff) | |
Fix channel grabbing logic
| -rw-r--r-- | bot/cogs/defcon.py | 5 |
1 files 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) |