From 2edba253c93a9272f9a6a579981c7dfb9358f80c Mon Sep 17 00:00:00 2001 From: rohan Date: Wed, 28 Apr 2021 11:30:39 +0530 Subject: Use guild.afk_channel atr to retrieve afk Channel instance. --- bot/constants.py | 1 - bot/exts/moderation/stream.py | 2 +- config-default.yml | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bot/constants.py b/bot/constants.py index b9444c989..6d14bbb3a 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -444,7 +444,6 @@ class Channels(metaclass=YAMLGetter): mod_announcements: int staff_announcements: int - afk_voice: int admins_voice: int code_help_voice_1: int code_help_voice_2: int diff --git a/bot/exts/moderation/stream.py b/bot/exts/moderation/stream.py index ebcc00ace..1710d4c7c 100644 --- a/bot/exts/moderation/stream.py +++ b/bot/exts/moderation/stream.py @@ -82,7 +82,7 @@ class Stream(commands.Cog): if voice_state.self_stream: # End user's stream by moving them to AFK voice channel and back. original_vc = voice_state.channel - await member.move_to(self.bot.get_channel(Channels.afk_voice)) + await member.move_to(ctx.guild.afk_channel) await member.move_to(original_vc) # Notify. diff --git a/config-default.yml b/config-default.yml index 204397f7f..8c6e18470 100644 --- a/config-default.yml +++ b/config-default.yml @@ -206,7 +206,6 @@ guild: staff_announcements: &STAFF_ANNOUNCEMENTS 464033278631084042 # Voice Channels - afk_voice: 756327105389920306 admins_voice: &ADMINS_VOICE 500734494840717332 code_help_voice_1: 751592231726481530 code_help_voice_2: 764232549840846858 -- cgit v1.2.3