Darkside138/DiscordSoundboard

Underscore in Discord username

Closed this issue · 5 comments

A user of my Discord server has an underscore in his name. The bot keeps ignoring him although I named the file exactly like the bot recognises his name... Is this a known bug or am I doing something wrong? Do I need to escape the underscore in some way?

I have just realized that there are two users being ignored by the bot and they both have upper case letters (not underscores) in their names. So I suspect that there's a problem in the EntranceSoundBoardListener class.

z1g commented

You need to rename the sound file to all lower case. For Exampe: MyUserName would be myusername.mp3

I'll make the code non-case sensitive so this won't be an issue it the next release.

The thing is that I tried exactly that. It seems to be a Linux-exclusive problem. Everything works fine when I'm using Windows but if I try to use the same lower case files in Debian it keeps ignoring these two users. But I'll wait until the next version is released and then I'll have another look. Thanks for your reply though!

Yes, I would imagine Linux would be case sensitive where Windows is not. The next version should fix your issue.