Combine !play and next message

This commit is contained in:
Joscha 2018-09-05 20:58:49 +00:00
parent f975f5b86c
commit 3cb8050e86

View file

@ -178,13 +178,16 @@ class Playlist:
self.playing_video = video, player self.playing_video = video, player
self.playing_until = time.time() + duration self.playing_until = time.time() + duration
text = self.format_play(video, player) play_text = self.format_play(video, player)
msg = await room.send(text) #msg = await room.send(play_text)
next_video = self.next() next_video = self.next()
video, player = next_video if next_video else (None, None) video, player = next_video if next_video else (None, None)
text = self.format_next(video, player) next_text = self.format_next(video, player)
await room.send(text, msg.mid) #await room.send(next_text, msg.mid)
text = f"{play_text}\n{next_text}"
await room.send(text)
await asyncio.sleep(duration) await asyncio.sleep(duration)