Changelog

3.0.0b

The changelog for this version is too large to display. Please see Migrating for more information.

2.10.0

  • TwitchIO
    • Bug fixes
      • fix: fetch_markers() was passing list of one element from payload, now just passes element

  • ext.commands
    • Changes
      • Added which alias failed to load in the error raised by add_command()

    • Bug fixes
      • fix string parser not properly parsing specific quoted strings

  • ext.eventsub
    • Additions
      • Added EventSubClient.subscribe_channel_unban_request_create /

        EventSubWSClient.subscribe_channel_unban_request_create

      • Added EventSubClient.subscribe_channel_unban_request_resolve /

        EventSubWSClient.subscribe_channel_unban_request_resolve

      • Added EventSubClient.subscribe_automod_terms_update /

        EventSubWSClient.subscribe_automod_terms_update

      • Added EventSubClient.subscribe_automod_settings_update /

        EventSubWSClient.subscribe_automod_settings_update

      • Added EventSubClient.subscribe_automod_message_update /

        EventSubWSClient.subscribe_automod_message_update

      • Added EventSubClient.subscribe_automod_message_hold /

        EventSubWSClient.subscribe_automod_message_hold

      • Added EventSubClient.subscribe_channel_moderate /

        EventSubWSClient.subscribe_channel_moderate

      • Added EventSubClient.subscribe_suspicious_user_update /

        EventSubWSClient.subscribe_suspicious_user_update

      • Added EventSubClient.subscribe_channel_vip_add /

        EventSubWSClient.subscribe_channel_vip_add

      • Added EventSubClient.subscribe_channel_vip_remove /

        EventSubWSClient.subscribe_channel_vip_remove

      • Added all accompanying models for those endpoints.

  • ext.sounds
    • Additions
      • Added TinyTag as a dependency to support retrieving audio metadata.

      • added twitchio.ext.sounds.Sound.rate() setter.

      • added twitchio.ext.sounds.Sound.channels() setter.

2.9.2

  • TwitchIO
  • ext.commands
    • Bug fixes
      • Fixed return type of get_user() to PartialChatter / Chatter from PartialUser / User.

2.9.1

  • ext.eventsub
    • Bug fixes
      • fix: Special-cased a restart when a specific known bad frame is received.

2.9.0

2.8.2

  • ext.commands
    • Bug fixes
      • Fixed an issue where built-in converters would raise an internal TypeError.

2.8.1

  • ext.commands
    • Bug fixes
      • Fixed an issue where CommandNotFound couldn’t be processed from get_context.

2.8.0

  • TwitchIO
    • Additions
      • Added the new follower / followed endpoints for PartialUser:
        • fetch_channel_followers()

        • fetch_channel_following()

        • fetch_channel_follower_count()

        • fetch_channel_following_count()

      • The deprecated methods have had warnings added in the docs.

      • New models for the new methods have been added:
      • New optional is_featured query parameter for fetch_clips()

      • New optional is_featured query parameter for fetch_clips()

      • New attribute is_featured for Clip

    • Bug fixes
      • Fix IndexError when getting prefix when empty message is sent in a reply.

  • ext.eventsub
    • Bug fixes
      • Fix websocket reconnection event.

      • Fix another websocket reconnect issue where it tried to decode nonexistent headers.

  • ext.commands
    • Additions
      • Added support for the following typing constructs in command signatures:
        • Union[A, B] / A | B

        • Optional[T] / T | None

        • Annotated[T, converter] (accessible through the typing_extensions module on older python versions)

  • Docs
    • Added walkthrough for ext.commands

2.7.0

  • TwitchIO
    • Additions
      • Added fetch_charity_campaigns() with CharityCampaign and CharityValues.

      • Added fetch_global_chat_badges()

      • Added User method fetch_chat_badges()

      • Added repr for SearchUser

      • Added two new events
        • Added event_notice()

        • Added event_raw_notice()

      • Added HypeChatData for hype chat events

      • Added hype_chat_data for hype chat events

      • Added fetch_content_classification_labels() along with ContentClassificationLabel

      • Added content_classification_labels and is_branded_content to ChannelInfo

      • Added new parameters to modify_stream() for is_branded_content and content_classification_labels

    • Bug fixes
      • Fix search_categories() due to igdb_id being added to Game

      • Made Chatter id property public

      • event_token_expired() will now be called correctly when response is 401 Invalid OAuth token

      • Fix reconnect loop when Twitch sends a RECONNECT via IRC websocket

      • Fix edit() so it now can enable the reward

    • Other Changes
      • Updated the HTTPException to provide useful information when an error is raised.

  • ext.eventsub
    • Added websocket support via EventSubWSClient.

    • Added support for charity donation events.

  • Other
    • [speed] extra
      • Added wheels on external pypi index for cchardet and ciso8601

      • Bumped ciso8601 from >=2.2,<2.3 to >=2.2,<3

      • Bumped cchardet from >=2.1,<2.2 to >=2.1,<3

2.6.0

  • TwitchIO
  • ext.eventsub
    • Documentation
      • Updated quickstart example to reflect proper usage of callback

    • Additions
      • Updated docs regarding new HypeTrain contribution method other for type

      • Added Shield Status events
        • subscribe_channel_shield_mode_begin()

        • subscribe_channel_shield_mode_end()

      • Added Shoutout events
        • subscribe_channel_shoutout_create()

        • subscribe_channel_shoutout_receive()

      • Added subscribe_channel_follows_v2()

      • Added support for type and user_id queries on get_subscriptions()

    • Deprecations
      • subscribe_channel_follows(), use subscribe_channel_follows_v2()

  • ext.pubsub
    • Bug fixes
      • Fix forced RECONNECT messages

    • Additions
      • Added proper message when wrong type is passed to a topic argument

      • Added auth failure hook: auth_fail_hook()

      • Added reconnect hook: reconnect_hook()

2.5.0

  • TwitchIO
    • Additions
      • Added first to Message

      • Added fetch_channel_emotes() to PartialUser

      • Added fetch_global_emotes() to Client

      • Added event_channel_join_failure() event:
        • This is dispatched when the bot fails to join a channel

        • This also makes the channel join error message in logs optional

    • Bug fixes
      • Fix AuthenticationError not being properly propagated when a bad token is given

      • Fix channel join failures causing ValueError: list.remove(x): x not in list when joining channels after the initial start

      • Added is_vip property to Chatter

      • New PartialUser methods
        • fetch_follower_count() to fetch total follower count of a User

        • fetch_following_count() to fetch total following count of a User

      • Fix whispers that were not able to be parsed

      • Fix USERSTATE parsing incorrect user

      • Fix errors when event loop is started using run_until_complete to call methods prior to run()

      • Improved handling of USERNOTICE messages and the tags created for event_raw_usernotice()

  • ext.routines
    • Additions
      • Added the change_interval() method.

  • ext.commands
    • Bug fixes
      • Make sure double-quotes are properly tokenized for bot commands

  • ext.sound
    • Bug fixes
      • Make system calls to ffmpeg are more robust (works on windows and linux)

  • ext.eventsub
    • Additions
      • Goal subscriptions have been Added
        • subscribe_channel_goal_begin()

        • subscribe_channel_goal_progress()

        • subscribe_channel_goal_end()

        • event_eventsub_notification_channel_goal_begin()

        • event_eventsub_notification_channel_goal_progress()

        • event_eventsub_notification_channel_goal_end()

      • Channel subscription end
        • subscribe_channel_subscription_end()

      • User authorization grant
        • subscribe_user_authorization_granted()

      • HypeTrainBeginProgressData now has the level

    • Bug fixes
      • Correct typo in HypeTrainBeginProgressData attribute expires

      • Correct typo “revokation” to “revocation” in server _message_types.

  • ext.pubsub
    • Additions
      • Websocket automatically handles “RECONNECT” requests by Twitch

    • Bug fixes
      • “type” of PubSubModerationActionChannelTerms now uses the correct type data

      • Correct typo in HypeTrainBeginProgressData attribute expires

      • Unsubscribing from PubSub events works again

      • Fix a forgotten nonce in _send_topics()

      • PubSubModerationActionChannelTerms now uses the correct type data

2.4.0

  • TwitchIO
  • ext.commands
    • Bug fixes
      • Add type conversion for variable positional arguments

      • Fixed message content while handling commands in reply messages

  • ext.pubsub
    • Bug fixes
      • PubSubModerationAction now handles missing keys

  • ext.eventsub
    • Additions
      • Added Gift Subcriptions subscriptions for gifting other users Subs:
        • Subscribed via twitchio.ext.eventsub.EventSubClient.subscribe_channel_subscription_gifts()

        • Callback function is twitchio.ext.eventsub.event_eventsub_notification_subscription_gift()

      • Added Resubscription Message subscriptions for Resub messages:
        • Subscribed via twitchio.ext.eventsub.EventSubClient.subscribe_channel_subscription_messages()

        • Callback function is twitchio.ext.eventsub.event_eventsub_notification_subscription_message()

      • Added twitchio.ext.eventsub.EventSubClient.delete_all_active_subscriptions() for convenience

      • Created an Eventsub-specific CustomReward model

2.3.0

Massive documentation updates

  • TwitchIO
  • ext.commands
    • twitchio.ext.commands.Bot.handle_commands() now also invokes on threads / replies

    • Cooldowns are now handled correctly per bucket.

    • Fix issue with twitchio.ext.commands.Bot.reload_module() where module is reloaded incorrectly if exception occurs

    • Additions
      • twitchio.ext.commands.Bot.handle_commands() now also invokes on threads / replies

    • Bug fixes
      • Cooldowns are now handled correctly per bucket.

      • Fix issue with twitchio.ext.Bot.reload_module() where module is reloaded incorrectly if exception occurs

  • ext.pubsub
    • Channel subscription model fixes and additional type hints for Optional return values

    • PubSubBitsMessage model updated to return correct data and updated typing

    • PubSubBitsBadgeMessage model updated to return correct data and updated typing

    • PubSubChatMessage now correctly returns a string rather than int for the Bits Events

2.2.0

  • ext.sounds
    • Added sounds extension.

  • TwitchIO
    • Loosen aiohttp requirements to allow 3.8.1

    • Stream was missing from __all__. It is now available in the twitchio namespace.

    • Added .status, .reason and .extra to HTTPException

    • Fix Message._timestamp value when tag is not provided by twitch

    • Fix wait_for_ready()

    • Remove loop= parameter inside wait_for() for 3.10 compatibility

    • Add is_broadcaster check to PartialChatter. This is accessible as Context.author.is_broadcaster

    • fetch_follow() will now return None if the FollowEvent does not exists

    • TwitchIO will now correctly handle error raised when only the prefix is typed in chat

    • Fix paginate logic in TwitchHTTP.request()

  • ext.commands
    • Fixed an issue (GH#273) where cog listeners were not ejected when unloading a module

  • ext.pubsub
    • Add channel subscription pubsub model.

  • ext.eventsub
    • Add support for the following subscription types
      • twitchio.ext.eventsub.PollBeginProgressData
        • channel.poll.begin:

        • channel.poll.progress

      • twitchio.ext.eventsub.PollEndData
        • channel.poll.end

      • twitchio.ext.eventsub.PredictionBeginProgressData
        • channel.prediction.begin

        • channel.prediction.progress

      • twitchio.ext.eventsub.PredictionLockData
        • channel.prediction.lock

      • twitchio.ext.eventsub.PredictionEndData
        • channel.prediction.end

2.1.5

  • TwitchIO
    • Add user_id property to Client

    • Change id_cache to only cache if a value is not None

    • Add Client.wait_for_ready()

2.1.4

  • TwitchIO
    • Chatter.is_mod now uses name instead of display_name

    • Added ChannelInfo to slots

    • Remove loop= parameter for asyncio.Event in websocket for 3.10 compatibility

  • ext.eventsub
    • ChannelCheerData now returns user if is_anonymous is False else None

2.1.3

  • TwitchIO
    • Fix bug where chatter never checked for founder in is_subscriber

    • Fix rewards model so it can now handle pubsub and helix callbacks

  • ext.commands
    • Fix TypeError in Bot.from_client_credentials

2.1.2

New logo!

  • TwitchIO
    • Add Chatter.mention()

    • Re-add raw_usernotice from V1.x

    • Fix echo messages for replies

    • Fix a bug where the wrong user would be whispered

    • Fix a bug inside User.modify_stream() where the game_id key would be specified as "None" if not provided (GH#237)

    • Add support for teams and channelteams API routes
      • Team, ChannelTeams

      • Client.fetch_teams()

      • PartialUser.fetch_channel_teams()

  • ext.commands
    • Fix issue where Bot.from_client_credentials would result in an inoperable Bot instance (GH#239)

  • ext.pubsub
    • Added ext.pubsub.Websocket.pubsub_error() to support being notified of pubsub errors

    • Added ext.pubsub.Websocket.pubsub_nonce() to support being notified of pubsub nonces

  • ext.eventsub
    • Patch 2.1.1 bug which breaks library on 3.7 for ext.eventsub

2.1.1

  • TwitchIO
    • Patch a bug introduced in 2.1.0 that broke the library on python 3.7

2.1.0

  • TwitchIO
    • Type the User class

    • Update the library to use a proper ISO datetime parser

    • Add event_raw_usernotice event (GH#229)

    • User fixed an issue where the User class couldn’t fetch rewards (GH#214)

    • Chatter fixed the docstring for the badges property

    • Chatter.is_subscriber() will now return True for founders

    • Client change docstring on fetch_channel

    • Add support for the predictions API routes
      • Prediction, Predictor, PredictionOutcome

      • PartialUser.end_prediction(), PartialUser.get_prediction(), PartialUser.create_prediction()

    • Add support for the schedules API routes
      • Schedule, ScheduleSegment, ScheduleCategory, ScheduleVacation

      • PartialUser.fetch_schedule()

    • Add PartialUser.modify_stream()

    • Fix bug where chatter cache would not be created

    • Fix bug where Client.wait_for() would cause internal asyncio.InvalidState errors

  • ext.commands
    • General typing improvements

    • ext.commands.builtin_converters.convert_Clip() - Raise error when the regex doesn’t match to appease linters. This should never be raised.

    • Added ext.commands.Context.reply() to support message replies

  • ext.pubsub
    • Fixed bug with Pool.unsubscribe_topics caused by typo

  • ext.eventsub
    • fix ext.eventsub.models.ChannelBanData’s permanent attribute accessing nonexistent attrs from the event payload

    • Add documentation