aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar rohan <[email protected]>2021-04-25 21:05:09 +0530
committerGravatar rohan <[email protected]>2021-04-25 21:05:09 +0530
commit9affdb92bb67794fd11732376ec64362da932817 (patch)
treed30034189e2a2d907e8b6af8ab0c4e949c9b34ba
parentAdd method for suspending member's stream when revoking stream perms. (diff)
Wait for cache to be loaded before accesing member voice state and channels.
Diffstat (limited to '')
-rw-r--r--bot/exts/moderation/stream.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/exts/moderation/stream.py b/bot/exts/moderation/stream.py
index a2ebb6205..ebcc00ace 100644
--- a/bot/exts/moderation/stream.py
+++ b/bot/exts/moderation/stream.py
@@ -72,6 +72,7 @@ class Stream(commands.Cog):
async def _suspend_stream(self, ctx: commands.Context, member: discord.Member) -> None:
"""Suspend a member's stream."""
+ await self.bot.wait_until_guild_available()
voice_state = member.voice
if not voice_state: