Music-Discord-Bot
Music-Discord-Bot copied to clipboard
While using remove Command raised an exception: AttributeError: 'Bot' object has no attribute 'music'
Problem while trying to remove a song from the queue it shows that error the problem is in Cogs/removeRemoverange.py
if (int(index) - 1) > len(self.bot.music[ctx.guild.id]["musics"]): return await ctx.channel.send(f"{self.bot.emojiList.false} {ctx.author.mention} The index is invalid!")
Solve,
just comment out these 2 line no need for any use.
after commenting it out it will show another error,
Command raised an exception: IndexError: list index out of range
because
track = tracks[index]
solve is
track = tracks[index-2]
This line checks if the index is not upper that the last index of the queue. So it is useful
This line checks if the index is not upper that the last index of the queue. So it is useful
yes but
self.bot.music
this Bot' object has no attribute 'music'