Chew / JDA-Chewtils

Chew's fork of JDA-Applications/JDA-Utilities, with support for modern features such as Slash Commands, Context Menus, and more.
https://chew.pro/JDA-Chewtils
Apache License 2.0
73 stars 23 forks source link

Checking message parts throws `StringIndexOutOfBoundsException` #60

Open Matyrobbrt opened 2 years ago

Matyrobbrt commented 2 years ago

Issue Checklist

Affected Modules

Command

Description

Currently, CommandClientImpl#getParts always expects a space after the mention:

On top of that we need to do another +1 because the default @mention prefix will always be followed by a space

However, this causes a StringIndexOutOfBoundsException when a message is just a ping without a space (for example, if the bot is pinged to make it join a thread).