Changelog - Version 6.0.0 (UPCOMING UPDATE)
Version Information
- Updated version from 5.9 to 6.0.0
- Version 6.0.0 is a ground-up rewrite of the Twitch bot (
bot/beta-v6.py), moving it to TwitchIO 3. The 5.9 stable and beta bots only receive bug fixes from here on.
TwitchIO 3 Migration
- New bot base
- The bot is now a TwitchIO 3
commands.AutoBot, created withclient_id,client_secret,bot_id,owner_id, a list of EventSubsubscriptionsandforce_subscribe, instead of the old IRC style bot that joinedinitial_channelswith a token. - The bot starts inside an async context (
main()run withasyncio.run), adds its own token withadd_token, and starts without the TwitchIO token store or web adapter. - New
event_token_refreshedhandler keeps the channel token in step when TwitchIO refreshes it. - The old
event_channel_joinedhandler is gone, as there is no IRC channel join in TwitchIO 3.
- The bot is now a TwitchIO 3
- Commands
- Commands use the
commands.Contextstyle. Asetup_hookfinds every@commands.commandon the bot class, injects the bot and registers it, and logs how many were registered. - The bot provides the component hooks TwitchIO 3 expects (
component_before_invoke,component_after_invoke,component_command_error), so commands work without a separate commands component.
- Commands use the
- Chat over EventSub
- Chat now arrives through a
ChatMessageSubscriptionfor the channel instead of IRC. - Message and user fields follow TwitchIO 3:
.textand.chatterreplace.contentand.author, and themoderator,vipandsubscriberflags replaceis_mod,is_vipandis_subscriber. - The bot ignores its own messages by checking the chatter ID against the bot ID.
- Routines use
delta=timedelta(...)instead ofseconds=.
- Chat now arrives through a
- EventSub conduit
- On startup the bot looks for an existing EventSub conduit and creates one (one shard) if none exists.
- EventSub keepalive
- The EventSub websocket keepalive is now 30 seconds instead of 600, so a dropped connection is noticed and reconnected much sooner.
Lotto
- New V6 lotto odds
- Each ticket now picks its result first, then builds numbers that the existing draw scores as exactly that result:
- Division 1 (Jackpot): 1%
- No win: 1%
- Divisions 2 to 6: 19.6% each
- Main and supplementary numbers never overlap, and the draw scoring itself is unchanged.
- Each ticket now picks its result first, then builds numbers that the existing draw scores as exactly that result:
- Clearer ticket message
- Redeeming a lotto ticket now tells the viewer “Your lotto numbers are …, and your supplementary numbers are …” instead of the old “Winning Numbers: … Supplementary Numbers: …” wording.
Thank you for your feedback and support!
As always, your feedback is appreciated. Please report any issues, bugs, or suggestions in the #ticket-info channel on our Discord server. You can also submit feedback and bug reports directly on our website: https://botofthespecter.com/feedback.php