Donation Integration (Regex)
This is the most powerful part and requires the most attention. Bearry reads the chat to identify donations from external platforms (like Livepix) through Regular Expressions (Regex).
How does it work?
Section titled “How does it work?”Bearry monitors the chat. When a specific user (the donation bot) sends a message that matches the pattern (Regex) you defined, it extracts the value and adds time.
Configuration Step-by-Step
Section titled “Configuration Step-by-Step”- Enable Donation: Check the “Enable Integration” switch.
- User Name (Bot): Type the exact name of the user sending the donation message in chat.
- Example:
Livepix,StreamElements,Nightbot. - Attention: Bearry will only read messages from this specific user to avoid fraud.
- Example:
- Regular Expression (Regex): The code that “hunts” the value in the message.
- Time per Currency: How many seconds to add for each 1 unit of currency (e.g., each $1.00).
Understanding and Creating Regex
Section titled “Understanding and Creating Regex”The Regex must have a Capture Group (...) around the numeric value. Bearry takes whatever is inside that group to know how much was donated.
Practical Examples
Section titled “Practical Examples”Scenario 1: Livepix
- Chat Message:
Livepix: User John sent R$ 50,00 and said: Hello! - What we want to get:
50,00 - Recommended Regex:
R\$ (\d+[.,]\d{2})R\$: Looks for the literal text “R$”.: White space.(\d+[.,]\d{2}): The Capture Group.\d+: One or more digits (the 50).[.,]: Dot OR comma.\d{2}: Exactly two decimal digits (the 00).
Scenario 2: Simple Message
- Chat Message:
Donated 100 reais - Regex:
Donated (\d+) reais
Scenario 3: Currency with Attached Symbol
- Chat Message:
User donated $10.50 - Regex:
\$(\d+\.?\d*)
Regex Testing Sites
Section titled “Regex Testing Sites”We strongly recommend testing your Regex before the stream. Use these sites, paste your bot’s example message, and see if the Regex works (the value should appear as “Group 1”).