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):
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user