Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While using remove Command raised an exception: AttributeError: 'Bot' object has no attribute 'music' #14

Open
shamspias opened this issue Oct 19, 2021 · 2 comments

Comments

@shamspias
Copy link

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]

shamspias added a commit to shamspias/Music-Discord-Bot that referenced this issue Oct 19, 2021
@Darkempire78
Copy link
Owner

This line checks if the index is not upper that the last index of the queue. So it is useful

@shamspias
Copy link
Author

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'

Toby406 added a commit to Toby406/Music-Discord-Bot that referenced this issue Jan 7, 2022
Fixed the issue "AttributeError: 'Bot' object has no attribute 'music'" and included the index fix (Darkempire78#14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants