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

fix: silent crashes & add ability to compare other players by tag #115

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

VanillaViking
Copy link
Collaborator

No description provided.

Copy link
Owner

@Seizoxu Seizoxu left a comment

Choose a reason for hiding this comment

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

Looks good. 👌

Comment on lines +35 to +40
if (args.length == 2) {
idStr = args[1].subSequence(2, args[1].length()-1).toString();
} else {
idStr = event.getAuthor().getId();
}

Copy link
Owner

Choose a reason for hiding this comment

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

This is an older way of checking arguments, especially for pings. I think the newer for-cmd-switch statement in a parseArguments() method would be better for scalability, but it's fine for now, since I can't think of any other arguments we'd add to \c. Still good to keep in mind for later uses.

Also, there's a specific method to get a mentioned member within a message, event.getMessage().getMentionedMembers().get(0).getId(), which is better than manually checking the String, but the functionality is effectively the same.

@Seizoxu Seizoxu merged commit 9b417cb into master Jan 17, 2024
1 check failed
@Seizoxu Seizoxu deleted the ashwin/compare-crash-fix branch January 17, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants