aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar rohan <[email protected]>2021-04-28 11:30:39 +0530
committerGravatar rohan <[email protected]>2021-04-28 11:30:39 +0530
commit2edba253c93a9272f9a6a579981c7dfb9358f80c (patch)
tree28eee42234fa42ff46ea76520e657667ab56840d
parentWait for cache to be loaded before accesing member voice state and channels. (diff)
Use guild.afk_channel atr to retrieve afk Channel instance.
-rw-r--r--bot/constants.py1
-rw-r--r--bot/exts/moderation/stream.py2
-rw-r--r--config-default.yml1
3 files changed, 1 insertions, 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