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 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
- Changes:
fetch_moderated_channels()
returns “broadcaster_login” api field instead of “broadcaster_name”
- Bug fixes
fix:
fetch_moderated_channels()
useduser_
prefix from payload, now usesbroadcaster_
instead
- 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#
- TwitchIO
- Additions
Added
AdSchedule
andEmote
- Added the new ad-related methods for
PartialUser
:
- Added the new ad-related methods for
Added new method
fetch_user_emotes()
toPartialUser
Added
fetch_moderated_channels()
toPartialUser
- Bug fixes
Fixed
event_token_expired
not applying to the current request.
- ext.eventsub
- Bug fixes
Fixed a crash where a Future could be None, causing unintentional errors.
Special-cased a restart when a specific known bad frame is received.
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 fromget_context
.
2.8.0#
- TwitchIO
- Additions
- Added the new follower / followed endpoints for
PartialUser
:
- Added the new follower / followed endpoints for
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 forfetch_clips()
New attribute
is_featured
forClip
- 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 thetyping_extensions
module on older python versions)
- Docs
Added walkthrough for ext.commands
2.7.0#
- TwitchIO
- Additions
Added
fetch_charity_campaigns()
withCharityCampaign
andCharityValues
.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 eventsAdded
hype_chat_data
for hype chat eventsAdded
fetch_content_classification_labels()
along withContentClassificationLabel
Added
content_classification_labels
andis_branded_content
toChannelInfo
Added new parameters to
modify_stream()
foris_branded_content
andcontent_classification_labels
- Bug fixes
Fix
search_categories()
due toigdb_id
being added toGame
Made Chatter
id
property publicevent_token_expired()
will now be called correctly when response is401 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
- Additions
Added optional
started_at
andended_at
arguments tofetch_clips()
Updated docstring regarding new HypeTrain contribution method
OTHER
fortype
Add support for
ciso8601
if installedAdded
speed
install flag (pip install twitchio[speed]
) to install all available speedupsAdded
igdb_ids
argument tofetch_games()
Added
tags
attribute toStream
,ChannelInfo
andSearchUser
Added
fetch_followed_streams()
Added
shoutout()
Added
type
arg tofetch_streams()
- Bug fixes
Fix
fetch_bits_leaderboard()
not handlingstarted_at
andBitsLeaderboard
not correctly parsingFix parsing
ScheduleSegment
whereend_time
is NoneFix auto reconnect of websocket. Created tasks by asyncio.create_task() need to be referred to prevent task disappearing (garbage collection)
Strip newlines from message content when sending or replying to IRC websocket
Removed unnessecary assert from
fetch_streams()
- ext.eventsub
- Documentation
Updated quickstart example to reflect proper usage of callback
- Additions
Updated docs regarding new HypeTrain contribution method
other
fortype
- Added Shield Status events
- Added Shoutout events
Added support for
type
anduser_id
queries onget_subscriptions()
- Deprecations
- 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
fetch_channel_emotes()
toPartialUser
Added
fetch_global_emotes()
toClient
- 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
- Added
- 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 Userfetch_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
- Channel subscription end
- User authorization grant
HypeTrainBeginProgressData now has the
level
- Bug fixes
Correct typo in
HypeTrainBeginProgressData
attributeexpires
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 dataCorrect typo in
HypeTrainBeginProgressData
attributeexpires
Unsubscribing from PubSub events works again
Fix a forgotten nonce in
_send_topics()
PubSubModerationActionChannelTerms
now uses the correct type data
2.4.0#
- TwitchIO
- Additions
Added
event_reconnect()
toClient
Add attribute docs to
PartialUser
andUser
- Added following new
Client
methods:
- Added following new
Add
duration
andvod_offset
attributes toClip
Added repr for
CustomReward
Added repr for
PredictionOutcome
Add extra attributes to
UserBan
- Bug fixes
Added
self.registered_callbacks = {}
tofrom_client_credentials()
Allow empty or missing initial_channels to trigger
event_ready()
Corrected
twitchio.CustomRewardRedemption.fulfill()
endpoint typo and creationCorrected
twitchio.CustomRewardRedemption.refund()
endpoint typo and creationChanged
join_channels()
logic to handle bigger channel lists betterCorrected
Predictor
slots and user keys, repr has also been addedUpdated IRC parser to not strip colons from beginning of messages
Updated IRC parser to not remove multiple spaces when clumped together
Fixed
twitchio.Client.start()
exiting immediatelyChatters will now update correctly when someone leaves chat
Fixed a crash when twitch sends a RECONNECT notice
- 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:
Added
twitchio.ext.eventsub.EventSubClient.delete_all_active_subscriptions()
for convenienceCreated an Eventsub-specific
CustomReward
model
2.3.0#
Massive documentation updates
- TwitchIO
- Additions
Added
retain_cache
kwarg to Client and Bot. Default is True.Added
twitchio.PartialUser.fetch_goals()
methodAdded
twitchio.PartialUser.fetch_chat_settings()
andtwitchio.PartialUser.update_chat_settings()
methodsAdded
twitchio.Client.part_channels()
methodAdded
event_channel_joined()
event. This is dispatched when the bot joins a channelAdded first kwarg to
twitchio.CustomReward.get_redemptions()
- Bug fixes
Removed unexpected loop termination from
WSConnection._close()
Fix bug where # prefixed channel names and capitals in initial_channels would not trigger
event_ready()
Adjusted join channel rate limit handling
twitchio.PartialUser.create_clip()
has been fixed by converting bool to string in http requestfetch_cheermotes
color attribute correctedtwitchio.PartialUser.fetch_channel_teams()
returns empty list if no teams found rather than unhandled errorFix
twitchio.CustomRewardRedemption
sotwitchio.CustomReward.get_redemptions()
returns correctly
- ext.commands
twitchio.ext.commands.Bot.handle_commands()
now also invokes on threads / repliesCooldowns 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 typingPubSubBitsBadgeMessage
model updated to return correct data and updated typingPubSubChatMessage
now correctly returns a string rather than int for the Bits Events
2.2.0#
- ext.sounds
Added sounds extension. Check the Sounds Ext documentation for more information.
- 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
toHTTPException
Fix
Message._timestamp
value when tag is not provided by twitchFix
wait_for_ready()
Remove loop= parameter inside
wait_for()
for 3.10 compatibilityAdd
is_broadcaster
check toPartialChatter
. This is accessible asContext.author.is_broadcaster
fetch_follow()
will now returnNone
if the FollowEvent does not existsTwitchIO 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 ClientChange 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.xFix 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 errorsAdded
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
classUpdate 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 propertyChatter.is_subscriber()
will now return True for foundersClient
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
’spermanent
attribute accessing nonexistent attrs from the event payloadAdd documentation