-
-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
If there are no active chatters, stuff like $randomActiveViewer gives back [Unable to get random active user]. That string is then passed on to other variables (like one that shows a user's display name), but Firebot still tries to look up a Twitch user called "[Unable to get random active user]". This naturally won't work and throws a "Bad Request" error in the logs.
Expected Behavior
It shouldn't try to look up fake usernames like that at all. Maybe just show "[Unable to get random active user]" or something similar in chat and don't spam the logs with pointless errors.
If possible, it'd be handy if Firebot could:
- Give it another try once or twice before giving up when picking a random active user (sometimes someone pops in right after).
- Use a fallback if no one's active, like automatically try $randomViewer, or even let us pick a default/fallback username in the variable. Would make for easier testing and better random picks when chat is slow.
Just a thought: the main thing is to avoid the ugly errors and have the message in chat make sense, even with few or no chatters.
Steps To Reproduce
- Make sure chat has no active users
- Use $randomActiveViewer with another variable (like $userDisplayName[$randomActiveViewer])
- You'll see a Bad Request error in the logs and the chat message says [Error] or something unhelpful
Version
5.65.4
What operating system are you using Firebot on?
Windows 11
Relevant log output
[2026-02-10 14:58:20.345] [DEBUG] Unable to find user with name "[Unable to get random active user]" Encountered HTTP status code 400: Bad Request
URL: users?login=%5BUnable+to+get+random+active+user%5D
Method: GET
Body:
{"error":"Bad Request","status":400,"message":"Invalid username(s), email(s), or ID(s). Bad Identifiers."}Contact Details (Optional)
Grandpa Celery