fix(commands/voice): clean up command_allowed check
This commit is contained in:
parent
d0ddf9ee47
commit
5bdfddbbbd
@ -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:
|
||||
return True
|
||||
|
||||
if not message.author.voice:
|
||||
return False
|
||||
|
||||
return message.author.voice.channel.id == message.guild.voice_client.channel.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user