Open alexandreteles opened 1 year ago
I believe that
/src/main/java/com/jagrosh/jmusicbot/commands/dj/ForceRemoveCmd.java
User target;
List<Member> found = FinderUtil.findMembers(event.getArgs(), event.getGuild());
if(found.isEmpty())
{
event.replyError("Unable to find the user!");
return;
}
else if(found.size()>1)
{
...
Is the culprit here. Instead of searching for the user that way (which will result in no user found as the user isn't connected anymore) the command should look into the playlist for songs added by a given user (by ID or username) and remove it :)
Since JMusicBot no longer uses the members intent, we can not search by username anymore & have to rely on IDs & mentions instead.
Since JMusicBot no longer uses the members intent, we can not search by username anymore & have to rely on IDs & mentions instead.
Mentions apparently do not work either, I've tried. Could we store the username in the playlist object so once forceremove @user
is called we can check for the mentioned user and remove all entries containing his username? It would still fail if the user changed nicknames but I guess it's better than not being able to clean troll insertions.
Bug Description
If a user adds songs to the queue and then leaves the voice channel,
forceremove
will be unable to remove their songs, meaning that DJs are forced to useforceskip
in each song they've added.Steps to Reproduce
forceskip
it will reportUnable to find user
Expected Result
All user entries are deleted from the playlist.
Debug Output
Additional Info
Would be nice to be able to remove individual songs from other users as a DJ as well.
Checklist