Skip to the content.
Changelog - Version 4.7 (2024-09-19)
Enhancements & Updates
- API Token Management:
- Updated
VERSION variable to “4.7” to track the bot version.
WEATHER_API removed as it’s no longer needed as it’s now done via the Specter API.
- WebSocket Connection Enhancements:
- Added functionality for connecting to the Specter WebSocket server (
specter_websocket() method).
- Handled events for:
- Connection to the WebSocket server (
@sio.event connect).
- Disconnection from the WebSocket server (
@sio.event disconnect).
- Receiving messages from the WebSocket server (
@sio.event message).
- Stream events:
STREAM_ONLINE, STREAM_OFFLINE, FOURTHWALL and WEATHER_DATA.
- Introduced retry logic with sleep for WebSocket reconnections.
Command & Event Improvements
- Gift Sub Event:
- Updated the processing of
is_anonymous and cumulative_total within the process_giftsub_event() function.
- Fourthwall Event Processing:
- Added functionality to handle Fourthwall events with various event types such as:
ORDER_PLACED: Logs details about orders placed, including the item, quantity, and total price. Sends a notification message to the channel.
DONATION: Logs donations and includes any message from the donor. Sends a notification message to the channel.
GIVEAWAY_PURCHASED: Logs purchases of giveaway items and tracks the status and winner of each gift. Sends a notification message to the channel for each gift.
SUBSCRIPTION_PURCHASED: Logs new subscriptions and sends a notification message to the channel about the subscription details.
- Todo Command:
- Added a new
todo command to manage a user’s personal todo list with the following actions:
- Add: Users can add tasks with an optional category.
- Edit: Users can edit existing tasks by specifying the task ID and new description.
- Complete: Users can mark tasks as complete.
- Remove: Tasks can be marked for removal, pending user confirmation.
- Confirm: Confirms pending task removal.
- View: View details of a specific task using its task ID.
- The command ensures proper validation of inputs and permissions for certain actions like adding, editing, and removing tasks.
- Database operations for
todos and categories are now included for task management.
- Error Handling:
- Improved error handling and logging for
event_command_error when commands are on cooldown.
- Commands now notify users if they attempt a command that is still on cooldown.
- Added error logging for key errors and unexpected exceptions during event processing.
- Weather Command Overhaul:
- Refactored the
weather_command to pull weather data directly from the Specter API using the location information provided in the request.
- Added support for API request failure with proper logging.
- Removed the redundant manual logic for fetching weather and sending WebSocket notifications.
- Kiss Command:
- Improved fetching and logging of
kiss_count for the target user.
- Cleaned up redundant code and streamlined the fetching of
kiss_count from the database.
Other Notable Changes
- Removed unnecessary imports and cleaned up code structure, such as:
- Removal of the
as commands in the from twitchio.ext import commands import.
- Import simplification across different modules.
- System Improvements:
- Added cooldown rates for commands to manage command spam.