From 6b161692a4ae86b2f52b7e67320fa27952e9655e Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Sat, 6 Aug 2016 07:27:08 -0500 Subject: [PATCH] Added a check for if a queue was empty, when printing the queue --- cogs/playlist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cogs/playlist.py b/cogs/playlist.py index 861e0d4..9e4d380 100644 --- a/cogs/playlist.py +++ b/cogs/playlist.py @@ -219,7 +219,10 @@ class Music: if not state.is_playing(): await self.bot.say('Not playing any music right now...') return - fmt = "\n".join(str(x) for x in state.songs._queue) + if len(state.songs._queue) == 0: + fmt = "Nothing currently in the queue" + else: + fmt = "\n".join(str(x) for x in state.songs._queue) await self.bot.say("Current songs in the queue:```\n{}```".format(fmt)) @commands.command(pass_context=True, no_pm=True)