fix(commands/voice): clean up command_allowed check

This commit is contained in:
Ryan 2025-01-13 01:20:17 -05:00
parent d0ddf9ee47
commit 5bdfddbbbd
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -60,10 +60,12 @@ async def ensure_joined(message):
def command_allowed(message, immutable=False): def command_allowed(message, immutable=False):
if not message.guild.voice_client: if not message.guild.voice_client:
return return False
if immutable: if immutable:
return message.channel.id == message.guild.voice_client.channel.id return True
else:
if not message.author.voice: if not message.author.voice:
return False return False
return message.author.voice.channel.id == message.guild.voice_client.channel.id
return message.author.voice.channel.id == message.guild.voice_client.channel.id