Finished implemenation of modular amount of required skips
This commit is contained in:
parent
5c6b36d645
commit
92ca0831e0
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,11 @@ class Music:
|
||||||
state = self.get_voice_state(after.server)
|
state = self.get_voice_state(after.server)
|
||||||
if state.voice is None:
|
if state.voice is None:
|
||||||
return
|
return
|
||||||
#state.required_skips = state.voice.channel
|
voice_channel = state.voice.channel
|
||||||
|
if voice_channel != before.voice.voice_channel and voice_channel != after.voice.voice_channel:
|
||||||
|
return
|
||||||
|
num_members =len(voice_channel.voice_members)
|
||||||
|
state.required_skips = math.ceil((num_members+1)/3)
|
||||||
|
|
||||||
@commands.command(pass_context=True, no_pm=True)
|
@commands.command(pass_context=True, no_pm=True)
|
||||||
@checks.custom_perms(send_messages=True)
|
@checks.custom_perms(send_messages=True)
|
||||||
|
|
Loading…
Reference in a new issue