fix: cheerMote detection in cheerMessage#3494
Merged
zunderscore merged 5 commits intoMay 19, 2026
Merged
Conversation
this could occasionally remove strings like "huds601", and fails with cheermotes like "huds601Cheer1", only removing "Cheer1"
zunderscore
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Switch from regex-based cheermote detection to parsing messageParts
The old regex-based detection would occasionally remove strings like "huds601", and fail with custom cheermotes like "huds601Cheer1", only removing "Cheer1" and leaving "huds601"
Note: This PR removes cheermote detection in simulated messages. I'm open to reworking this so the parts are instead checked in the variable, and fallback to regex if there are no parts, but before I put that change in, I figured I'd wait for code review.
Applicable Issues
#3493
Testing
Tested live on stream to ensure including the string "huds601" is preserved and both Twitch default cheermotes as well as Huds' custom cheermotes are removed from the message.