From 5bdfddbbbd240c102c494b8948e7d75638c15146 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Mon, 13 Jan 2025 01:20:17 -0500 Subject: [PATCH] fix(commands/voice): clean up command_allowed check --- commands/voice/utils.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/commands/voice/utils.py b/commands/voice/utils.py index 50fb6a7..d582612 100644 --- a/commands/voice/utils.py +++ b/commands/voice/utils.py @@ -60,10 +60,12 @@ async def ensure_joined(message): def command_allowed(message, immutable=False): if not message.guild.voice_client: - return + return False + if immutable: - return message.channel.id == message.guild.voice_client.channel.id - else: - if not message.author.voice: - return False - return message.author.voice.channel.id == message.guild.voice_client.channel.id + return True + + if not message.author.voice: + return False + + return message.author.voice.channel.id == message.guild.voice_client.channel.id