Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
49c5960a9c
1 changed files with 3 additions and 3 deletions
|
@ -165,12 +165,12 @@ class Mybot(commands.Cog):
|
||||||
async def play_next(self):
|
async def play_next(self):
|
||||||
if self.sounds:
|
if self.sounds:
|
||||||
source,ctx = self.sounds[0]
|
source,ctx = self.sounds[0]
|
||||||
self.sounds_history.insert(source,0)
|
|
||||||
if self.sounds_history >5:
|
|
||||||
self.sounds_history = self.sounds_history[:5]
|
|
||||||
if not ctx.voice_client.is_playing() and ctx.voice_client.is_connected():
|
if not ctx.voice_client.is_playing() and ctx.voice_client.is_connected():
|
||||||
ctx.voice_client.play(source, after=lambda e: print('Player error: %s' % e) if e else None)
|
ctx.voice_client.play(source, after=lambda e: print('Player error: %s' % e) if e else None)
|
||||||
self.sounds.pop(0)
|
self.sounds.pop(0)
|
||||||
|
self.sounds_history.insert(source,0)
|
||||||
|
if self.sounds_history >5:
|
||||||
|
self.sounds_history = self.sounds_history[:5]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue