Releases: Teekeks/pyTwitchAPI
v4.5.0
This version drops PubSub from the library
Twitch
- Fixed
Twitch.get_emote_sets()being parsed incorrectly (thanks @moralrecordings ) - Fixed Exceptions when passing None to unsuspecting parameters in various functions
- Fixed returning wrong object for
Twitch.get_channel_emotes() - Added new parameter
for_source_onlytoTwitch.send_chat_message() - Added new parameter
subscription_idtoTwitch.get_eventsub_subscriptions() - Added new parameter
target_tokentoTwitch.get_eventsub_subscriptions() - Added new parameter
target_tokentoTwitch.delete_eventsub_subscription()
EventSub
- Added new data related to shared chat to the payload of
listen_channel_chat_message() - Added message metadata to all event payloads
- Added message deduplication to
EventSubWebsocket - Added the following new Topics:
- "Channel Bits Use"
listen_channel_bits_use() - "Channel Points Automatic Reward Redemption v2"
listen_channel_points_automatic_reward_redemption_add_v2()
- "Channel Bits Use"
- Fixed potentially targeting the wrong access token depending on transport and available tokens
Other
- Improved type hints all over the library
- Fixed AttributeError in
TwitchObject.__repr__()for unset attributes
v4.4.0
Twitch
- Added the following new Endpoint:
- "Get Shared Chat Session"
Twitch.get_shared_chat_session()
- "Get Shared Chat Session"
EventSub
- Added the following new Topics:
- "Channel Shared Chat Session Begin"
EventSubBase.listen_channel_shared_chat_begin() - "Channel Shared Chat Session Update"
EventSubBase.listen_channel_shared_chat_update() - "Channel Shared Chat Session End"
EventSubBase.listen_channel_shared_chat_end()
- "Channel Shared Chat Session Begin"
- Added the "Golden Kappa Train" info to the following Topics:
EventSubBase.listen_hype_train_begin()EventSubBase.listen_hype_train_progress()EventSubBase.listen_hype_train_end()
Chat
- Added new middleware
SharedChatOnlyCurrentwhich restricts the messages to only the current room (thanks @Latent-Logic ) - Added support for source room and user tags
- Added new option
no_shared_chat_messageswhich controls if shared chat messages should be filtered out or not (thanks @Latent-Logic )
OAuth
- Made it possible to specify target host and port in constructor of
UserAuthenticator(thanks @nojoule ) - Made it possible to control if a browser should be opened in
UserAuthenticator.authenticate()(thanks @Latent-Logic )
v4.3.1
v4.3.0
Twitch
- Added the following new Endpoints:
- "Get User Emotes"
- "Warn Chat User"
- "Create EventSub Subscription"
- Fixed Error handling of Endpoint
Twitch.create_clip() - Fixed not raising UnauthorizedException when auth token is invalid and auto_refresh_auth is False
- Added Parameter
is_pausedtoTwitch.update_custom_reward()(thanks @iProdigy ) - Remove deprecated field "tags_ids" from
SearchChannelResult
EventSub
- Added the following new Topics:
- "Channel Chat Settings Update"
- "User Whisper Message"
- "Channel Points Automatic Reward Redemption"
- "Channel VIP Add"
- "Channel VIP Remove"
- "Channel Unban Request Create"
- "Channel Unban Request Resolve"
- "Channel Suspicious User Message"
- "Channel Suspicious User Update"
- "Channel Moderate"
- "Channel Warning Acknowledgement"
- "Channel Warning Send"
- "Automod Message Hold"
- "Automod Message Update"
- "Automod Settings Update"
- "Automod Terms Update"
- "Channel Chat User Message Hold"
- "Channel Chat User Message Update"
- Fixed reconnect logic for Websockets (thanks @Latent-Logic )
- Fixed logger names being set incorrectly for EventSub transports
- Fixed field "ended_at being incorrectly named "ends_at" for ChannelPollEndData
Chat
- Added flag
ChatMessage.firstto ChatMessage indicating a first time chatter (thanks @lbrooney )
OAuth
- Added CodeFlow user authenticator, usefull for headless server user token generation.
- Added the following new Auth Scopes:
AuthScope.USER_READ_EMOTESAuthScope.USER_READ_WHISPERSAuthScope.MODERATOR_READ_UNBAN_REQUESTSAuthScope.MODERATOR_MANAGE_UNBAN_REQUESTSAuthScope.MODERATOR_READ_SUSPICIOUS_USERSAuthScope.MODERATOR_READ_BANNED_USERSAuthScope.MODERATOR_READ_CHAT_SETTINGSAuthScope.MODERATOR_READ_WARNINGSAuthScope.MODERATOR_MANAGE_WARNINGSAuthScope.MODERATOR_READ_MODERATORSAuthScope.MODERATOR_READ_VIPS
v4.2.1
v4.2.0
Twitch
- Fixed Endpoint
Twitch.get_stream_key()(thanks @moralrecordings ) - Added the following new Endpoints:
- "Get Ad Schedule"
- "Snooze Next Ad"
- "Send Chat Message"
- "Get Moderated Channels"
EventSub
- Fixed
EventSubWebsocket.stop()not raising RuntimeException when called and socket not running. - Added the following new Topics:
- "Channel Ad Break Begin"
- "Channel Chat Message"
OAuth
- Added the following new AuthScopes:
AuthScope.USER_WRITE_CHATAuthScope.CHANNEL_READ_ADSAuthScope.CHANNEL_MANAGE_ADSAuthScope.USER_READ_MODERATED_CHANNELS
v4.1.0
Twitch
- Removed the deprecated Endpoint "Get Users Follows"
- Removed the deprecated bits related fields from Poll Endpoint data
EventSub
-
Duplicate Webhook messages will now be ignored
-
EventSub will now recover properly from a disconnect when auth token is expired
-
Added the following new Topics:
- "Channel Chat Clear"
- "Channel Chat Clear User Messages"
- "Channel Chat Message Delete"
- "Channel Chat Notification"
-
Removed the deprecated version 1 of topic "Channel Follow"
Chat
- Improved recovery from broken network connection (thanks @Latent-Logic )
- Added
ChatMessage.is_meflag - Fixed parsing of messages using the
/mechat command
OAuth
- Added the following new AuthScopes:
AuthScope.CHANNEL_BOTAuthScope.USER_BOTAuthScope.USER_READ_CHAT
v4.0.1
v4.0.0
This is a major release, please see https://pytwitchapi.dev/en/v4.0.0/v4-migration.html for a migration guide!
Keystone Features
- EventSub now supports the newly added Websocket transport
- EventSub is now using TwitchObject based callback payloads instead of raw dictionaries
- Chat now supports Command Middleware, check out https://pytwitchapi.dev/en/v4.0.0/tutorial/chat-use-middleware.html for more info
- Added
UserAuthenticationStorageHelperto cut down on common boilerplate code, check out https://pytwitchapi.dev/en/v4.0.0/tutorial/reuse-user-token.html for more info
Twitch
-
Added new fields
ChannelInformation.is_branded_contentandChannelInformation.content_classification_labelsto response ofget_channel_information() -
Added new parameters
modify_channel_information.is_branded_contentandmodify_channel_information.content_classification_labelstomodify_channel_information() -
Added new Endpoint "Get Content Classification Labels"
get_content_classification_labels() -
Removed the following deprecated Endpoints:
- "Get Soundstrack Current Track"
- "Get SoundTrack Playlist"
- "Get Soundtrack Playlists"
-
get_polls()now allows up to 20 poll IDs -
get_channel_followers()can now also be used without the required Scope or just with App Authentication -
Added new parameter
get_clips.is_featuredtoget_clips()and addedobject.api.Clip.is_featuredto result.
EventSub
- Moved old EventSub from
twitchAPI.eventsubto new packagetwitchAPI.eventsub.webhookand renamed it toEventSubWebhook - Added new EventSub Websocket transport
EventSubWebsocket - All EventSub callbacks now use
object.base.TwitchObjectbased Payloads instead of raw dictionaries. See :ref:eventsub-available-topicsfor a list of all available Payloads - Added
EventSubBase.listen_channel_update_v2() - Added option for
EventSubWebhookto specify a asyncio loop viaEventSubWebhook.callback_loopin which to run all callbacks in - Added option for
EventSubWebsocketto specify a asyncio loop viaEventSubWebsocket.callback_loopin which to run all callbacks in - Added automatical removal of tailing
/inEventSubWebhook.callback_urlif present - Fixed broken handling of malformed HTTP requests made to the callback endport of
EventSubWebhook - Made
EventSubWebhookmore easily mockable viatwitch-cliby addingEventSubWebhook.subscription_url - Added optional subscription revokation handler via
EventSubWebhook.revocation_handlertoEventSubWebhook
PubSub
- Handle Authorization Revoked messages (Thanks @Braastos )
- Added option to specify a asyncio loop via
pubsub.PubSub.callback_loopin which to run all callbacks in
Chat
-
Added Chat Command Middleware, a way to decide if a command should run, see https://pytwitchapi.dev/en/v4.0.0/tutorial/chat-use-middleware.html for more info.
-
Added the following default Chat Command Middleware:
ChannelRestrictionUserRestrictionStreamerOnlyChannelCommandCooldownChannelUserCommandCooldownGlobalCommandCooldown
-
Added option to specify a asyncio loop via
callback_loopin which to run all callbacks in -
Fixed errors raised in callbacks not being properly reported
-
Added Hype Chat related fields to
ChatMessage -
Improved logging
-
Fixed KeyError when encountering some Notice events
-
Added new reply tags
ChatMessage.reply_thread_parent_msg_idandChatMessage.reply_thread_parent_user_logintoChatMessage -
Reconnects no longer duplicate the channel join list
-
Chat.start()now thows an error should Chat() not have been awaited
OAuth
- Added
UserAuthenticationStorageHelper, a easy plug and play way to generate user auth tokens only on demand - Made it possible to mock all auth flows with
twitch-cli
Other
- Added
AsyncIterTwitchObject.current_cursor() - Renamed module
twitchAPI.typestotwitchAPI.type - Moved all API related TwitchObjects from module
twitchAPI.objecttotwitchAPI.object.api - Removed default imports from module
twitchAPI
v3.11.0
Twitch
- Added missing field
emote_modeto response ofTwitch.get_chat_settings()andTwitch.update_chat_settings()(#234)
Chat
- Fixed timing based
AttributeError: 'NoneType' object has no attribute 'get'in NoticeEvent during reconnect - Ensured that only Chat Messages will ever be parsed as chat commands
- Added functionality to set per channel based prefixes (#229):
Chat.set_channel_prefix()to set a custom prefix for the given channel(s)Chat.reset_channel_prefix()to remove a custom set prefix for the given channel(s)