async def add_to_playlist(self,ctx,*,playlist_name): player = self.bot.music.player_manager.get(ctx.guild.id) if player.is_playing: songname = player.current['title'] passfail = fileRead.add_to_playlist(ctx,playlist_name,songname) if passfail: await ctx.channel.send("Song added") else: await ctx.channel.send("Playlist needs to be created before you can add to it.") else: await ctx.channel.send("Need the song to add currently playing.")
async def add_queue_to_list(self, ctx, *, listname): player = self.bot.lavalink.player_manager.get(ctx.guild.id) if player.is_playing: songlist = player.queue for song in songlist: check = fileRead.add_to_playlist(ctx, listname, f"{song['title']}") if not check: return await ctx.channel.send( "Operation failed. Make sure the playlist name is valid." ) await ctx.channel.send("Queue added to " + str(listname) + ".") else: await ctx.channel.send("There is nothing playing.")