Skip to content

Commit 26ac22d

Browse files
techfish-11Copilot
andauthored
Update cogs/voice/basic.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 57bbfc0 commit 26ac22d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cogs/voice/basic.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,10 @@ async def get_user_speaker_id(self, user_id: int, guild_id: int = None) -> int:
599599
high_load_time = config.get("high_load_time")
600600
high_load_time_voice_switch = config.get("high_load_time_voice_switch", True)
601601
high_load_time_voice_switch_guild_threshold_enabled = config.get("high_load_time_voice_switch_guild_threshold_enabled", False)
602-
high_load_time_voice_switch_guild_threshold = int(config.get("high_load_time_voice_switch_guild_threshold", 0))
602+
try:
603+
high_load_time_voice_switch_guild_threshold = int(config.get("high_load_time_voice_switch_guild_threshold", 0))
604+
except (ValueError, TypeError):
605+
high_load_time_voice_switch_guild_threshold = 0
603606
guild = None
604607
if guild_id:
605608
guild = self.bot.get_guild(guild_id)

0 commit comments

Comments
 (0)