Changelog - Version 4.9 (2024-10-06)
New Features
- Subathon Tracker:
- Added a new command
!subathonto manage subathons. - Actions:
start,stop,pause,resume,addtime,status. - Allows moderators to control the subathon timer and display its status.
- Added a new command
- Channel Joined Event: Added an event handler (
event_channel_joined) to log when the bot joins a channel.
Enhancements & Updates
- Updated
VERSIONvariable to “4.9”. - Weather Command: Improved the wording of the weather command output to sound more natural.
- Force Offline/Online Commands: Updated the
!forceofflineand!forceonlinecommands to use thewebsocket_noticefunction directly. - Stream Online/Offline Events: Optimized handling of “stream.online” and “stream.offline” events to use the
websocket_noticefunction directly.
Command & Event Improvements
- Subathon Command:
- Implemented the
!subathoncommand with various actions to control the subathon timer. - Added error handling and user feedback for invalid actions or insufficient permissions.
- Implemented the
Bug Fixes
- Subscription Events: Fixed issues in the
process_subscription_eventandprocess_subscription_message_eventfunctions to correctly handle new subscriptions, resubscriptions, and subscription messages. Specifically:- Corrected the database update statements to properly update the
monthscolumn for existing subscriptions. - Ensured that the
event_monthsvalue is used consistently when inserting new subscription records. - Improved logging to provide more detailed information about subscription events.
- Fixed an issue where the subscriber message was not included in the Twitch channel message for new subscriptions with messages.
- Standardized the Discord notification message for both new subscriptions and resubscriptions.
- Corrected the database update statements to properly update the
- MyBits Command: Fixed an issue where the
!mybitscommand was not displaying the correct number of bits for the user. - Command Error Handling: Fixed an issue in the
event_command_errorfunction where cooldown messages were not being sent to the correct channel.
Database Changes
- Added new database table
subathonto store subathon state:id: Integer, auto-incrementing primary key.start_time: Date and time when the subathon started.end_time: Date and time when the subathon is scheduled to end.starting_minutes: Initial duration of the subathon in minutes.paused: Boolean indicating whether the subathon is paused.remaining_minutes: Number of minutes remaining when paused.
- Added new database table
subathon_settingsto store subathon configuration:id: Integer, auto-incrementing primary key.starting_minutes: Default starting duration of the subathon in minutes.cheer_add: Number of minutes to add for each cheer.sub_add_1: Number of minutes to add for a tier 1 subscription.sub_add_2: Number of minutes to add for a tier 2 subscription.sub_add_3: Number of minutes to add for a tier 3 subscription.
Removed Features
- Removed the
process_stream_onlineandprocess_stream_offlinefunctions.
Other Notable Changes
- Lotto Numbers: Updated the
user_lotto_numbersfunction to draw 6 winning numbers and 3 supplementary numbers from 1-47. - Implemented background task
subathon_countdownto keep track of the subathon timer.
Note: This changelog highlights the key changes in version 4.9. For a detailed view of all code changes, please refer to the commit history.