Skip to content

Checking message parts throws StringIndexOutOfBoundsException #60

@Matyrobbrt

Description

@Matyrobbrt

Issue Checklist

  • I have checked for similar issues on the Issue tracker
  • I have updated to the latest version of JDA-Chewtils.
  • I have checked the branches or the maintainer's PRs for upcoming bug fixes.

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmodule: commandCommands module

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions