1
0
Fork 0
mirror of synced 2024-06-17 01:54:35 +12:00

Use correct attribute for length of a song

This commit is contained in:
Phxntxm 2017-07-23 17:34:28 -05:00
parent c782ad8727
commit 755d7cde06

View file

@ -68,8 +68,7 @@ class VoiceState:
def skip(self): def skip(self):
self.skip_votes.clear() self.skip_votes.clear()
if self.playing: self.voice.stop()
self.voice.stop()
def after(self, _=None): def after(self, _=None):
if self.user_queue: if self.user_queue:
@ -683,7 +682,7 @@ class Music:
if song.requester == author: if song.requester == author:
found = True found = True
break break
count += song.duration count += song.length
if not found: if not found:
await ctx.send("You are not in the queue!") await ctx.send("You are not in the queue!")
@ -776,7 +775,7 @@ class Music:
async def modskip(self, ctx): async def modskip(self, ctx):
"""Forces a song skip, can only be used by a moderator""" """Forces a song skip, can only be used by a moderator"""
state = self.voice_states.get(ctx.message.guild.id) state = self.voice_states.get(ctx.message.guild.id)
if state is None or not state.playing: if state is None:
await ctx.send('Not playing any music right now...') await ctx.send('Not playing any music right now...')
return return