Changelog - Version 5.5 (2025-10-18)
Version Information
- Updated version from 5.4 to 5.5
- Enhanced chat messaging system to support Twitch ChatBot Badge Icon and Shared Chat
New Features & Major Changes
Twitch Chat Integration
- Implemented Twitch API-based chat message sending to enable the new ChatBot Badge Icon in chat messages
- Added the
send_chat_message
function using Twitch API endpoint for sending messages - Updated all bot functions to use the new
send_chat_message
function for consistent ChatBot badge display - This allows the bot to display the official ChatBot badge when sending messages in chat
- Fixed Twitch shared chat functionality to validate message origin using
source-room-id
tag- Added validation to check
source-room-id
from IRC tags against the running bot’sCHANNEL_ID
- Bot only processes messages from users in the configured channel, rejecting messages from users in other channels within shared chat sessions
- Ensures messages from external shared chat users are ignored
- Prevents bot from responding to cross-channel shared chat messages while maintaining compatibility with legitimate channel messages
- Added validation to check
System Update Handler Enhancement
- Enhanced SYSTEM_UPDATE websocket event handlers in the bot with API-based version checking
- Implemented dynamic version retrieval from
https://api.botofthespecter.com/versions
API endpoint - Added intelligent version comparison logic that selects appropriate version based on SYSTEM variable (beta_version for BETA, stable_version for STABLE)
- Improved update notifications to only send chat messages when versions actually differ, preventing unnecessary spam
Stream Bingo Twitch Extension Integration
- Added comprehensive Stream Bingo Twitch Extension support with WebSocket integration
- Implemented
stream_bingo_websocket()
function for persistent WebSocket connection to Stream Bingo API - Added
process_stream_bingo_message()
function to handle all bingo game events including game start/end, player joins, bingo registrations, and voting - Integrated database storage for bingo games and winners with automatic tracking of game status, player rankings, and event data
- Added support for various bingo event types: GAME_STARTED, GAME_ENDED, EVENT_CALLED, PLAYER_JOINED, BINGO_REGISTERED, EXTRA_CARD_WITH_BITS, VOTE_STARTED, VOTE_ENDED, and ALL_EVENTS_CALLED
- Enables seamless integration with Stream Bingo extension for interactive bingo games during streams
New Commands
!wsstatus
- New moderator command to check WebSocket server connection status for the channel instance- Displays “Connected” or “Disconnected” status for the internal system WebSocket connection
- Allows moderators to diagnose websocket connectivity issues in real-time
- Helps determine if bot features requiring websocket connection are functional
- 30-second cooldown with permission-based access control
- Automatically added to builtin_commands database table
Game Death Ignore System
- Added game death ignore settings allowing streamers to specify games where deaths should not be counted
- Updated
!deaths
command to check if the current game is on the ignore list and notify users that deaths are not counted for ignored games - Updated
!deathadd
command to prevent adding deaths for ignored games and notify users accordingly - Integrated with dashboard modules for easy management of ignored games list
WebSocket Reconnection & Connection Management Enhancement
- Completely overhauled WebSocket reconnection system for improved reliability and server reboot compatibility
- Implemented unlimited retry attempts with fixed 60-second delays optimized for server reboot scenarios
- Added comprehensive connection state validation and clean disconnection handling before reconnection attempts
- Enhanced error handling with exponential backoff jitter to prevent connection storms
- Implemented
is_websocket_connected()
helper function for centralized connection status checking - Added
!wsstatus
command to allow users and moderators to check WebSocket connection status in real-time - Enhanced
websocket_notice()
function with automatic connection validation to prevent failed notifications - Updated weather command to use new standardized connection checking system
- Added comprehensive logging for all WebSocket connection events and state changes
- Removed unused helper functions (
get_websocket_status
,force_websocket_reconnect
) to clean up codebase - Ensures robust reconnection handling that maintains full bot functionality after server maintenance or network interruptions
Dynamic Command Cooldown System
- Implemented database-driven command cooldown system for all builtin commands, replacing hardcoded
@commands.cooldown
decorators - Added
check_cooldown()
function to enforce cooldowns per bucket type (global, moderator, or per-user) with configurable rates and time windows - Added
add_usage()
function to track command usage history for analytics and cooldown management - Updated all builtin commands in the bot to fetch cooldown settings from the
builtin_commands
database table includingcooldown_rate
,cooldown_time
, andcooldown_bucket
- Enabled dynamic cooldown adjustments without requiring bot redeployment - administrators can modify cooldowns through the database
- Implemented bucket-based cooldown logic where commands can have different cooldown behaviors:
- Global bucket: Cooldown applies to all users collectively
- Moderator bucket: Separate cooldown for moderators vs regular users
- User bucket: Individual cooldown per user
- Enhanced command permission and status checking with database-driven configuration
- Added comprehensive error handling and database connection management for all command executions
- Maintains backward compatibility while providing flexibility for future cooldown management features
Bug Fixes
- Fixed WebSocket reconnection issues where “half of the system doesn’t work” after reconnection by implementing proper connection state management
- Resolved inappropriate retry delays that didn’t account for server reboot timing requirements
Thank you for your feedback and support!
As always, your feedback is appreciated. Please report any issues or suggestions in the #get-support channel on our Discord server. You can also submit feedback directly on our website: https://botofthespecter.com/feedback.php