-
Notifications
You must be signed in to change notification settings - Fork 5
Add support for clan tags #11
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for parsing clan tags/prefixes in player names for Minecraft chat messages. The implementation extracts usernames from messages where players have clan tags or prefixes before their names (e.g., <[CLAN] PlayerName>).
Changes:
- Modified
parseUsernameto extract the last token when spaces are present (clan tags typically come before usernames) - Added fallback logic in message parsing to handle clan tag formats like
<[CLAN] username> - Updated
removePlayerFromMsgto handle clan tags within angle brackets
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/structure/mineflayer/utils/parseUsername.ts |
Extracts username from strings containing clan tags by taking the last space-separated token and renamed variable from name to cleanedName |
src/events/mineflayer/messagestr.ts |
Adds fallback parsing for clan tag format <clan username> to extract usernames and messages |
src/events/mineflayer/message.ts |
Updates player name removal logic to handle clan tags inside angle brackets with word boundary matching |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (cleanedName.startsWith("<")) { | ||
| cleanedName = cleanedName.slice(1); | ||
| } |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check for a leading "<" character will never match because the previous line (line 12) already removes all non-word characters, underscores, and numbers. The regex [^_\w\d] removes all special characters including "<", so by the time this check runs, any "<" character would already be removed. This check should either be moved before line 12, or removed entirely if it's no longer needed.
- !q now supports server/all scope - add !lq to list quotable servers - add !rqa for random quote across all servers
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
…fully Handle whois 400 “No user found” without bot restarts "Alr u can merge it Code is fine Idk how well it will work tho lol Without actually reading it carefully" -Bacon
…ror-gracefully Revert "Handle whois 400 “No user found” without bot restarts" Reverting copilot code that didn't work.
… the FIRST word in the message.
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
Co-authored-by: BaconCat1 <126538523+BaconCat1@users.noreply.github.com>
No description provided.