How to filter out multiple cheer messages? PubSub (or Event Sub)


I’m currently using the Pubsub API and can process new cheers that start with Cheer500 (CheerAmount) for example. If a message has multiple cheer types in a single message, such as Cheer100, Corgo100, Kapa100, I’d like to be able to filter out all the cheer types and amounts from the message. Is there a way to get a list of the cheers used, so that I could use to write a function to remove them? StreamElements seems to be able to do it with their TTS. All I’m able to see so far is the total bits used.

Any help or ideas would be appreciated.



Call Get Cheermotes Reference | Twitch Developers
To get known prefixes.

Then search the chat message for prefixY using a regex

an example is in the chat guide

Sent only for Bits messages. The amount of cheer/Bits employed by the user. All instances follow the regular expression: /(^\|\s)<emote-name>\d+(\s\|$)/

Great, thanks for the help @BarryCarlyon

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.