diff --git a/bot.py b/bot.py index 82c07e6..85be563 100644 --- a/bot.py +++ b/bot.py @@ -425,18 +425,17 @@ async def resume(interaction: discord.Interaction): return + # Ideal function if interaction.guild.voice_client.is_paused(): interaction.guild.voice_client.resume() await interaction.followup.send(f"Resumed!") return - - + # Something that it cannot do! await interaction.followup.send("Something unexpected happened, and I cannot resume!") return - # Add # Enqueue an item @bot.tree.command(name="add", description="Queues a song into the list") @@ -460,7 +459,7 @@ async def add(interaction: discord.Interaction, title: str): # Epilogue # Sends informational message - await interaction.followup.send(f"Added **{song_title}** by *{song_artist}*!") + await interaction.followup.send(f"Added **{query_song_title}** by *{query_song_artist}*!") tracks_queued = guild_queue_dict[interaction.guild_id].count() # Helpfully tells the user how many tracks until their track is played @@ -486,22 +485,21 @@ async def clear(interaction: discord.Interaction): #Allows the user to view the queue @bot.tree.command(name="queue", description="See the queue") async def queue(interaction: discord.Interaction): + # Makes the reaction visible to everyone await interaction.response.defer() - - - # + # Add all the items in a queue to a list result_list = [] for song in guild_queue_dict[interaction.guild_id]: result_list.append(f"**{song[1]}** by *{song[2]}*") await interaction.followup.send("\n".join(result_list)) - return + #Current # Display currently playing @bot.tree.command(name="current", description="See whats currently playing") @@ -509,6 +507,15 @@ async def current(interaction: discord.Interaction): # Makes the reaction visible to everyone await interaction.response.defer() + #Display the current song + + # Some song information + current = guild_queue_dict[interaction.guild_id][0] + current_title = current[1] + current_artist = current[2] + + await interaction.followup.send(f"Currently Playing: **{current_title}** by *{current_artist}*") + # Cleanup await interaction.followup.send(f"Emptied the queue!")