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

Issues/60 #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Issues/60 #61

wants to merge 3 commits into from

Conversation

Matyrobbrt
Copy link

@Matyrobbrt Matyrobbrt commented Apr 7, 2022

Pull Request

Pull Request Checklist

Pull Request Information

Check and fill in the blanks for all that apply:

  • My PR fixes a bug, error, or other issue with the library's codebase.
  • My PR is for the command module of the JDA-Utilities library.
  • My PR creates a new module for the JDA-Utilities library: ____.

Description

Currently, CommandClientImpl#getParts always expects a space after a mention, and such, it crashes with a StringIndexOutOfBoundsException when the message is just a ping. This PR fixes that by checking the length of the string before continuing.

Closes #60

@Chew Chew added the module: command Commands module label Apr 20, 2022
Copy link

@freya022 freya022 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was saying that those two lines I mentioned earlier was enough, i meant that the whole PR would just be those two lines being modified

You can try with only the first two lines being modified, should work.

@Chew Chew mentioned this pull request Aug 20, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: command Commands module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checking message parts throws StringIndexOutOfBoundsException
3 participants