Type Definitions#
- enum twitchAPI.type.AnalyticsReportType(value)#
Bases:
Enum
Enum of all Analytics report types
Valid values are as follows:
- V1 = <AnalyticsReportType.V1: 'overview_v1'>#
- V2 = <AnalyticsReportType.V2: 'overview_v2'>#
- enum twitchAPI.type.AuthScope(value)#
Bases:
Enum
Enum of Authentication scopes
Valid values are as follows:
- ANALYTICS_READ_EXTENSION = <AuthScope.ANALYTICS_READ_EXTENSION: 'analytics:read:extensions'>#
View analytics data for the Twitch Extensions owned by the authenticated account.
- ANALYTICS_READ_GAMES = <AuthScope.ANALYTICS_READ_GAMES: 'analytics:read:games'>#
View analytics data for the games owned by the authenticated account.
- BITS_READ = <AuthScope.BITS_READ: 'bits:read'>#
View Bits information for a channel.
API
get_bits_leaderboard()
EventSub
listen_channel_cheer()
- CHANNEL_READ_SUBSCRIPTIONS = <AuthScope.CHANNEL_READ_SUBSCRIPTIONS: 'channel:read:subscriptions'>#
View a list of all subscribers to a channel and check if a user is subscribed to a channel.
API
get_broadcaster_subscriptions()
EventSub
listen_channel_subscribe()
listen_channel_subscription_end()
listen_channel_subscription_gift()
listen_channel_subscription_message()
- CHANNEL_READ_STREAM_KEY = <AuthScope.CHANNEL_READ_STREAM_KEY: 'channel:read:stream_key'>#
View an authorized user’s stream key.
API
get_stream_key()
- CHANNEL_EDIT_COMMERCIAL = <AuthScope.CHANNEL_EDIT_COMMERCIAL: 'channel:edit:commercial'>#
Run commercials on a channel.
- CHANNEL_READ_HYPE_TRAIN = <AuthScope.CHANNEL_READ_HYPE_TRAIN: 'channel:read:hype_train'>#
View Hype Train information for a channel.
API
get_hype_train_events()
EventSub
listen_hype_train_begin()
listen_hype_train_progress()
listen_hype_train_end()
- CHANNEL_MANAGE_BROADCAST = <AuthScope.CHANNEL_MANAGE_BROADCAST: 'channel:manage:broadcast'>#
Manage a channel’s broadcast configuration, including updating channel configuration and managing stream markers and stream tags.
- CHANNEL_READ_REDEMPTIONS = <AuthScope.CHANNEL_READ_REDEMPTIONS: 'channel:read:redemptions'>#
View Channel Points custom rewards and their redemptions on a channel.
API
get_custom_reward()
get_custom_reward_redemption()
EventSub
listen_channel_points_automatic_reward_redemption_add()
listen_channel_points_custom_reward_add()
listen_channel_points_custom_reward_update()
listen_channel_points_custom_reward_remove()
listen_channel_points_custom_reward_redemption_add()
listen_channel_points_custom_reward_redemption_update()
- CHANNEL_MANAGE_REDEMPTIONS = <AuthScope.CHANNEL_MANAGE_REDEMPTIONS: 'channel:manage:redemptions'>#
Manage Channel Points custom rewards and their redemptions on a channel.
API
get_custom_reward()
get_custom_reward_redemption()
create_custom_reward()
delete_custom_reward()
update_custom_reward()
update_redemption_status()
EventSub
listen_channel_points_automatic_reward_redemption_add()
listen_channel_points_custom_reward_add()
listen_channel_points_custom_reward_update()
listen_channel_points_custom_reward_remove()
listen_channel_points_custom_reward_redemption_add()
listen_channel_points_custom_reward_redemption_update()
- CHANNEL_READ_CHARITY = <AuthScope.CHANNEL_READ_CHARITY: 'channel:read:charity'>#
Read charity campaign details and user donations on your channel.
API
get_charity_campaign()
get_charity_donations()
EventSub
listen_channel_charity_campaign_donate()
listen_channel_charity_campaign_start()
listen_channel_charity_campaign_progress()
listen_channel_charity_campaign_stop()
- CLIPS_EDIT = <AuthScope.CLIPS_EDIT: 'clips:edit'>#
Manage Clips for a channel.
API
create_clip()
- USER_EDIT = <AuthScope.USER_EDIT: 'user:edit'>#
Manage a user object.
API
update_user()
- USER_EDIT_BROADCAST = <AuthScope.USER_EDIT_BROADCAST: 'user:edit:broadcast'>#
View and edit a user’s broadcasting configuration, including Extension configurations.
API
get_user_extensions()
get_user_active_extensions()
update_user_extensions()
- USER_READ_BROADCAST = <AuthScope.USER_READ_BROADCAST: 'user:read:broadcast'>#
View a user’s broadcasting configuration, including Extension configurations.
API
get_stream_markers()
get_user_extensions()
get_user_active_extensions()
- USER_READ_EMAIL = <AuthScope.USER_READ_EMAIL: 'user:read:email'>#
View a user’s email address.
API
get_users()
(optional)
update_user()
(optional)
EventSub
listen_user_update()
(optional)
- USER_EDIT_FOLLOWS = <AuthScope.USER_EDIT_FOLLOWS: 'user:edit:follows'>#
- CHANNEL_MODERATE = <AuthScope.CHANNEL_MODERATE: 'channel:moderate'>#
- CHAT_EDIT = <AuthScope.CHAT_EDIT: 'chat:edit'>#
Send chat messages to a chatroom using an IRC connection.
- CHAT_READ = <AuthScope.CHAT_READ: 'chat:read'>#
View chat messages sent in a chatroom using an IRC connection.
- WHISPERS_READ = <AuthScope.WHISPERS_READ: 'whispers:read'>#
Receive whisper messages for your user using PubSub.
- WHISPERS_EDIT = <AuthScope.WHISPERS_EDIT: 'whispers:edit'>#
- MODERATION_READ = <AuthScope.MODERATION_READ: 'moderation:read'>#
API
check_automod_status()
get_banned_users()
get_moderators()
EventSub
listen_channel_moderator_add()
listen_channel_moderator_remove()
- CHANNEL_SUBSCRIPTIONS = <AuthScope.CHANNEL_SUBSCRIPTIONS: 'channel_subscriptions'>#
- CHANNEL_READ_EDITORS = <AuthScope.CHANNEL_READ_EDITORS: 'channel:read:editors'>#
View a list of users with the editor role for a channel.
- CHANNEL_MANAGE_VIDEOS = <AuthScope.CHANNEL_MANAGE_VIDEOS: 'channel:manage:videos'>#
Manage a channel’s videos, including deleting videos.
API
delete_videos()
- USER_READ_BLOCKED_USERS = <AuthScope.USER_READ_BLOCKED_USERS: 'user:read:blocked_users'>#
View the block list of a user.
- USER_MANAGE_BLOCKED_USERS = <AuthScope.USER_MANAGE_BLOCKED_USERS: 'user:manage:blocked_users'>#
Manage the block list of a user.
- USER_READ_SUBSCRIPTIONS = <AuthScope.USER_READ_SUBSCRIPTIONS: 'user:read:subscriptions'>#
View if an authorized user is subscribed to specific channels.
- USER_READ_FOLLOWS = <AuthScope.USER_READ_FOLLOWS: 'user:read:follows'>#
View the list of channels a user follows.
- CHANNEL_READ_GOALS = <AuthScope.CHANNEL_READ_GOALS: 'channel:read:goals'>#
View Creator Goals for a channel.
API
get_creator_goals()
EventSub
listen_goal_begin()
listen_goal_progress()
listen_goal_end()
- CHANNEL_READ_POLLS = <AuthScope.CHANNEL_READ_POLLS: 'channel:read:polls'>#
View a channel’s polls.
API
get_polls()
EventSub
listen_channel_poll_begin()
listen_channel_poll_progress()
listen_channel_poll_end()
- CHANNEL_MANAGE_POLLS = <AuthScope.CHANNEL_MANAGE_POLLS: 'channel:manage:polls'>#
Manage a channel’s polls.
API
get_polls()
create_poll()
end_poll()
EventSub
listen_channel_poll_begin()
listen_channel_poll_progress()
listen_channel_poll_end()
- CHANNEL_READ_PREDICTIONS = <AuthScope.CHANNEL_READ_PREDICTIONS: 'channel:read:predictions'>#
View a channel’s Channel Points Predictions.
API
get_predictions()
EventSub
listen_channel_prediction_begin()
listen_channel_prediction_progress()
listen_channel_prediction_lock()
listen_channel_prediction_end()
- CHANNEL_MANAGE_PREDICTIONS = <AuthScope.CHANNEL_MANAGE_PREDICTIONS: 'channel:manage:predictions'>#
Manage of channel’s Channel Points Predictions
API
get_predictions()
create_prediction()
end_prediction()
EventSub
listen_channel_prediction_begin()
listen_channel_prediction_progress()
listen_channel_prediction_lock()
listen_channel_prediction_end()
- MODERATOR_MANAGE_AUTOMOD = <AuthScope.MODERATOR_MANAGE_AUTOMOD: 'moderator:manage:automod'>#
Manage messages held for review by AutoMod in channels where you are a moderator.
API
manage_held_automod_message()
EventSub
listen_automod_message_hold()
listen_automod_message_update()
listen_automod_terms_update()
- CHANNEL_MANAGE_SCHEDULE = <AuthScope.CHANNEL_MANAGE_SCHEDULE: 'channel:manage:schedule'>#
Manage a channel’s stream schedule.
API
update_channel_stream_schedule()
create_channel_stream_schedule_segment()
update_channel_stream_schedule_segment()
delete_channel_stream_schedule_segment()
- MODERATOR_MANAGE_CHAT_SETTINGS = <AuthScope.MODERATOR_MANAGE_CHAT_SETTINGS: 'moderator:manage:chat_settings'>#
Manage a broadcaster’s chat room settings.
API
update_chat_settings()
EventSub
listen_channel_moderate()
- MODERATOR_READ_CHAT_SETTINGS = <AuthScope.MODERATOR_READ_CHAT_SETTINGS: 'moderator:read:chat_settings'>#
View a broadcaster’s chat room settings.
API
get_chat_settings()
EventSub
listen_channel_moderate()
- MODERATOR_MANAGE_BANNED_USERS = <AuthScope.MODERATOR_MANAGE_BANNED_USERS: 'moderator:manage:banned_users'>#
Ban and unban users.
API
get_banned_users()
ban_user()
unban_user()
EventSub
listen_channel_moderate()
- MODERATOR_READ_BANNED_USERS = <AuthScope.MODERATOR_READ_BANNED_USERS: 'moderator:read:banned_users'>#
Read banned users.
EventSub
listen_channel_moderate()
- MODERATOR_READ_BLOCKED_TERMS = <AuthScope.MODERATOR_READ_BLOCKED_TERMS: 'moderator:read:blocked_terms'>#
View a broadcaster’s list of blocked terms.
API
get_blocked_terms()
EventSub
listen_channel_moderate()
- MODERATOR_MANAGE_BLOCKED_TERMS = <AuthScope.MODERATOR_MANAGE_BLOCKED_TERMS: 'moderator:manage:blocked_terms'>#
Manage a broadcaster’s list of blocked terms.
API
get_blocked_terms()
add_blocked_term()
remove_blocked_term()
EventSub
listen_channel_moderate()
- CHANNEL_MANAGE_RAIDS = <AuthScope.CHANNEL_MANAGE_RAIDS: 'channel:manage:raids'>#
Manage a channel raiding another channel.
- MODERATOR_MANAGE_ANNOUNCEMENTS = <AuthScope.MODERATOR_MANAGE_ANNOUNCEMENTS: 'moderator:manage:announcements'>#
Send announcements in channels where you have the moderator role.
- MODERATOR_MANAGE_CHAT_MESSAGES = <AuthScope.MODERATOR_MANAGE_CHAT_MESSAGES: 'moderator:manage:chat_messages'>#
Delete chat messages in channels where you have the moderator role.
API
delete_chat_message()
EventSub
listen_channel_moderate()
- MODERATOR_READ_CHAT_MESSAGES = <AuthScope.MODERATOR_READ_CHAT_MESSAGES: 'moderator:read:chat_messages'>#
Read deleted chat messages in channels where you have the moderator role.
EventSub
listen_channel_moderate()
- MODERATOR_READ_WARNINGS = <AuthScope.MODERATOR_READ_WARNINGS: 'moderator:read:warnings'>#
Read warnings in channels where you have the moderator role.
EventSub
listen_channel_moderate()
listen_channel_warning_acknowledge()
listen_channel_warning_send()
- MODERATOR_MANAGE_WARNINGS = <AuthScope.MODERATOR_MANAGE_WARNINGS: 'moderator:manage:warnings'>#
Warn users in channels where you have the moderator role.
API
warn_chat_user()
EventSub
listen_channel_moderate()
listen_channel_warning_acknowledge()
listen_channel_warning_send()
- USER_MANAGE_CHAT_COLOR = <AuthScope.USER_MANAGE_CHAT_COLOR: 'user:manage:chat_color'>#
Update the color used for the user’s name in chat.
- CHANNEL_MANAGE_MODERATORS = <AuthScope.CHANNEL_MANAGE_MODERATORS: 'channel:manage:moderators'>#
Add or remove the moderator role from users in your channel.
API
add_channel_moderator()
remove_channel_moderator()
get_moderators()
- CHANNEL_READ_VIPS = <AuthScope.CHANNEL_READ_VIPS: 'channel:read:vips'>#
Read the list of VIPs in your channel.
API
get_vips()
EventSub
listen_channel_vip_add()
listen_channel_vip_remove()
- MODERATOR_READ_MODERATORS = <AuthScope.MODERATOR_READ_MODERATORS: 'moderator:read:moderators'>#
Read the list of channels you are moderator in.
EventSub
listen_channel_moderate()
- MODERATOR_READ_VIPS = <AuthScope.MODERATOR_READ_VIPS: 'moderator:read:vips'>#
- CHANNEL_MANAGE_VIPS = <AuthScope.CHANNEL_MANAGE_VIPS: 'channel:manage:vips'>#
Add or remove the VIP role from users in your channel.
API
get_vips()
add_channel_vip()
remove_channel_vip()
EventSub
listen_channel_vip_add()
listen_channel_vip_remove()
- USER_READ_WHISPERS = <AuthScope.USER_READ_WHISPERS: 'user:read:whispers'>#
Receive whispers sent to your user.
EventSub
listen_user_whisper_message()
- USER_MANAGE_WHISPERS = <AuthScope.USER_MANAGE_WHISPERS: 'user:manage:whispers'>#
Receive whispers sent to your user, and send whispers on your user’s behalf.
API
send_whisper()
EventSub
listen_user_whisper_message()
- MODERATOR_READ_CHATTERS = <AuthScope.MODERATOR_READ_CHATTERS: 'moderator:read:chatters'>#
View the chatters in a broadcaster’s chat room.
API
get_chatters()
- MODERATOR_READ_SHIELD_MODE = <AuthScope.MODERATOR_READ_SHIELD_MODE: 'moderator:read:shield_mode'>#
View a broadcaster’s Shield Mode status.
API
get_shield_mode_status()
EventSub
listen_channel_shield_mode_begin()
listen_channel_shield_mode_end()
- MODERATOR_MANAGE_SHIELD_MODE = <AuthScope.MODERATOR_MANAGE_SHIELD_MODE: 'moderator:manage:shield_mode'>#
Manage a broadcaster’s Shield Mode status.
API
update_shield_mode_status()
EventSub
listen_channel_shield_mode_begin()
listen_channel_shield_mode_end()
- MODERATOR_READ_AUTOMOD_SETTINGS = <AuthScope.MODERATOR_READ_AUTOMOD_SETTINGS: 'moderator:read:automod_settings'>#
View a broadcaster’s AutoMod settings.
API
get_automod_settings()
EventSub
listen_automod_settings_update()
- MODERATOR_MANAGE_AUTOMOD_SETTINGS = <AuthScope.MODERATOR_MANAGE_AUTOMOD_SETTINGS: 'moderator:manage:automod_settings'>#
Manage a broadcaster’s AutoMod settings.
- MODERATOR_READ_FOLLOWERS = <AuthScope.MODERATOR_READ_FOLLOWERS: 'moderator:read:followers'>#
Read the followers of a broadcaster.
API
get_channel_followers()
EventSub
listen_channel_follow_v2()
- MODERATOR_MANAGE_SHOUTOUTS = <AuthScope.MODERATOR_MANAGE_SHOUTOUTS: 'moderator:manage:shoutouts'>#
Manage a broadcaster’s shoutouts.
API
send_a_shoutout()
EventSub
listen_channel_shoutout_create()
listen_channel_shoutout_receive()
- MODERATOR_READ_SHOUTOUTS = <AuthScope.MODERATOR_READ_SHOUTOUTS: 'moderator:read:shoutouts'>#
View a broadcaster’s shoutouts.
EventSub
listen_channel_shoutout_create()
listen_channel_shoutout_receive()
- CHANNEL_BOT = <AuthScope.CHANNEL_BOT: 'channel:bot'>#
Joins your channel’s chatroom as a bot user, and perform chat-related actions as that user.
API
send_chat_message()
EventSub
listen_channel_chat_message()
listen_channel_chat_clear_user_messages()
listen_channel_chat_message()
listen_channel_chat_message_delete()
listen_channel_chat_notification()
listen_channel_chat_settings_update()
- USER_BOT = <AuthScope.USER_BOT: 'user:bot'>#
Join a specified chat channel as your user and appear as a bot, and perform chat-related actions as your user.
API
send_chat_message()
EventSub
listen_channel_chat_clear()
listen_channel_chat_clear_user_messages()
listen_channel_chat_message()
listen_channel_chat_message_delete()
listen_channel_chat_notification()
listen_channel_chat_settings_update()
listen_channel_chat_user_message_hold()
listen_channel_chat_user_message_update()
- USER_READ_CHAT = <AuthScope.USER_READ_CHAT: 'user:read:chat'>#
Receive chatroom messages and informational notifications relating to a channel’s chatroom.
EventSub
listen_channel_chat_clear()
listen_channel_chat_clear_user_messages()
listen_channel_chat_message()
listen_channel_chat_message_delete()
listen_channel_chat_notification()
listen_channel_chat_settings_update()
listen_channel_chat_user_message_hold()
listen_channel_chat_user_message_update()
- CHANNEL_READ_ADS = <AuthScope.CHANNEL_READ_ADS: 'channel:read:ads'>#
Read the ads schedule and details on your channel.
API
get_ad_schedule()
EventSub
listen_channel_ad_break_begin()
- CHANNEL_MANAGE_ADS = <AuthScope.CHANNEL_MANAGE_ADS: 'channel:manage:ads'>#
Manage ads schedule on a channel.
- USER_WRITE_CHAT = <AuthScope.USER_WRITE_CHAT: 'user:write:chat'>#
Send chat messages to a chatroom.
- USER_READ_MODERATED_CHANNELS = <AuthScope.USER_READ_MODERATED_CHANNELS: 'user:read:moderated_channels'>#
Read the list of channels you have moderator privileges in.
- USER_READ_EMOTES = <AuthScope.USER_READ_EMOTES: 'user:read:emotes'>#
View emotes available to a user.
- MODERATOR_READ_UNBAN_REQUESTS = <AuthScope.MODERATOR_READ_UNBAN_REQUESTS: 'moderator:read:unban_requests'>#
View a broadcaster’s unban requests.
API
get_unban_requests()
EventSub
listen_channel_unban_request_create()
listen_channel_unban_request_resolve()
listen_channel_moderate()
- MODERATOR_MANAGE_UNBAN_REQUESTS = <AuthScope.MODERATOR_MANAGE_UNBAN_REQUESTS: 'moderator:manage:unban_requests'>#
Manage a broadcaster’s unban requests.
API
resolve_unban_requests()
EventSub
listen_channel_unban_request_create()
listen_channel_unban_request_resolve()
listen_channel_moderate()
- MODERATOR_READ_SUSPICIOUS_USERS = <AuthScope.MODERATOR_READ_SUSPICIOUS_USERS: 'moderator:read:suspicious_users'>#
Read chat messages from suspicious users and see users flagged as suspicious in channels where you have the moderator role.
EventSub
listen_channel_suspicious_user_message()
listen_channel_suspicious_user_update()
- enum twitchAPI.type.ModerationEventType(value)#
Bases:
Enum
Enum of moderation event types
Valid values are as follows:
- BAN = <ModerationEventType.BAN: 'moderation.user.ban'>#
- UNBAN = <ModerationEventType.UNBAN: 'moderation.user.unban'>#
- UNKNOWN = <ModerationEventType.UNKNOWN: ''>#
- enum twitchAPI.type.TimePeriod(value)#
Bases:
Enum
Enum of valid Time periods
Valid values are as follows:
- ALL = <TimePeriod.ALL: 'all'>#
- DAY = <TimePeriod.DAY: 'day'>#
- WEEK = <TimePeriod.WEEK: 'week'>#
- MONTH = <TimePeriod.MONTH: 'month'>#
- YEAR = <TimePeriod.YEAR: 'year'>#
- enum twitchAPI.type.SortMethod(value)#
Bases:
Enum
Enum of valid sort methods
Valid values are as follows:
- TIME = <SortMethod.TIME: 'time'>#
- TRENDING = <SortMethod.TRENDING: 'trending'>#
- VIEWS = <SortMethod.VIEWS: 'views'>#
- enum twitchAPI.type.HypeTrainContributionMethod(value)#
Bases:
Enum
Enum of valid Hype Train contribution types
Valid values are as follows:
- BITS = <HypeTrainContributionMethod.BITS: 'BITS'>#
- SUBS = <HypeTrainContributionMethod.SUBS: 'SUBS'>#
- OTHER = <HypeTrainContributionMethod.OTHER: 'OTHER'>#
- UNKNOWN = <HypeTrainContributionMethod.UNKNOWN: ''>#
- enum twitchAPI.type.VideoType(value)#
Bases:
Enum
Enum of valid video types
Valid values are as follows:
- ALL = <VideoType.ALL: 'all'>#
- UPLOAD = <VideoType.UPLOAD: 'upload'>#
- ARCHIVE = <VideoType.ARCHIVE: 'archive'>#
- HIGHLIGHT = <VideoType.HIGHLIGHT: 'highlight'>#
- UNKNOWN = <VideoType.UNKNOWN: ''>#
- enum twitchAPI.type.AuthType(value)#
Bases:
Enum
Type of authentication required. Only internal use
Valid values are as follows:
- NONE = <AuthType.NONE: 0>#
- USER = <AuthType.USER: 1>#
- APP = <AuthType.APP: 2>#
- EITHER = <AuthType.EITHER: 3>#
- enum twitchAPI.type.StatusCode(value)#
Bases:
Enum
Enum Code Status, see https://dev.twitch.tv/docs/api/reference#get-code-status for more documentation
Valid values are as follows:
- SUCCESSFULLY_REDEEMED = <StatusCode.SUCCESSFULLY_REDEEMED: 'SUCCESSFULLY_REDEEMED'>#
- ALREADY_CLAIMED = <StatusCode.ALREADY_CLAIMED: 'ALREADY_CLAIMED'>#
- EXPIRED = <StatusCode.EXPIRED: 'EXPIRED'>#
- USER_NOT_ELIGIBLE = <StatusCode.USER_NOT_ELIGIBLE: 'USER_NOT_ELIGIBLE'>#
- NOT_FOUND = <StatusCode.NOT_FOUND: 'NOT_FOUND'>#
- INACTIVE = <StatusCode.INACTIVE: 'INACTIVE'>#
- UNUSED = <StatusCode.UNUSED: 'UNUSED'>#
- INCORRECT_FORMAT = <StatusCode.INCORRECT_FORMAT: 'INCORRECT_FORMAT'>#
- INTERNAL_ERROR = <StatusCode.INTERNAL_ERROR: 'INTERNAL_ERROR'>#
- UNKNOWN_VALUE = <StatusCode.UNKNOWN_VALUE: ''>#
- enum twitchAPI.type.PubSubResponseError(value)#
Bases:
Enum
Valid values are as follows:
- BAD_MESSAGE = <PubSubResponseError.BAD_MESSAGE: 'ERR_BADMESSAGE'>#
- BAD_AUTH = <PubSubResponseError.BAD_AUTH: 'ERR_BADAUTH'>#
- SERVER = <PubSubResponseError.SERVER: 'ERR_SERVER'>#
- BAD_TOPIC = <PubSubResponseError.BAD_TOPIC: 'ERR_BADTOPIC'>#
- NONE = <PubSubResponseError.NONE: ''>#
- UNKNOWN = <PubSubResponseError.UNKNOWN: 'unknown error'>#
- enum twitchAPI.type.CustomRewardRedemptionStatus(value)#
Bases:
Enum
Valid values are as follows:
- UNFULFILLED = <CustomRewardRedemptionStatus.UNFULFILLED: 'UNFULFILLED'>#
- FULFILLED = <CustomRewardRedemptionStatus.FULFILLED: 'FULFILLED'>#
- CANCELED = <CustomRewardRedemptionStatus.CANCELED: 'CANCELED'>#
- enum twitchAPI.type.SortOrder(value)#
Bases:
Enum
Valid values are as follows:
- OLDEST = <SortOrder.OLDEST: 'OLDEST'>#
- NEWEST = <SortOrder.NEWEST: 'NEWEST'>#
- enum twitchAPI.type.BlockSourceContext(value)#
Bases:
Enum
Valid values are as follows:
- CHAT = <BlockSourceContext.CHAT: 'chat'>#
- WHISPER = <BlockSourceContext.WHISPER: 'whisper'>#
- enum twitchAPI.type.BlockReason(value)#
Bases:
Enum
Valid values are as follows:
- SPAM = <BlockReason.SPAM: 'spam'>#
- HARASSMENT = <BlockReason.HARASSMENT: 'harassment'>#
- OTHER = <BlockReason.OTHER: 'other'>#
- enum twitchAPI.type.EntitlementFulfillmentStatus(value)#
Bases:
Enum
Valid values are as follows:
- CLAIMED = <EntitlementFulfillmentStatus.CLAIMED: 'CLAIMED'>#
- FULFILLED = <EntitlementFulfillmentStatus.FULFILLED: 'FULFILLED'>#
- enum twitchAPI.type.PollStatus(value)#
Bases:
Enum
Valid values are as follows:
- ACTIVE = <PollStatus.ACTIVE: 'ACTIVE'>#
- COMPLETED = <PollStatus.COMPLETED: 'COMPLETED'>#
- MODERATED = <PollStatus.MODERATED: 'MODERATED'>#
- INVALID = <PollStatus.INVALID: 'INVALID'>#
- TERMINATED = <PollStatus.TERMINATED: 'TERMINATED'>#
- ARCHIVED = <PollStatus.ARCHIVED: 'ARCHIVED'>#
- enum twitchAPI.type.PredictionStatus(value)#
Bases:
Enum
Valid values are as follows:
- ACTIVE = <PredictionStatus.ACTIVE: 'ACTIVE'>#
- RESOLVED = <PredictionStatus.RESOLVED: 'RESOLVED'>#
- CANCELED = <PredictionStatus.CANCELED: 'CANCELED'>#
- LOCKED = <PredictionStatus.LOCKED: 'LOCKED'>#
- enum twitchAPI.type.AutoModAction(value)#
Bases:
Enum
Valid values are as follows:
- ALLOW = <AutoModAction.ALLOW: 'ALLOW'>#
- DENY = <AutoModAction.DENY: 'DENY'>#
- class twitchAPI.type.AutoModCheckEntry#
Bases:
TypedDict
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- clear() None. Remove all items from D. #
- copy() a shallow copy of D #
- fromkeys(value=None, /)#
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)#
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items #
- keys() a set-like object providing a view on D's keys #
- pop(k[, d]) v, remove specified key and return the corresponding value. #
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()#
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F. #
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values #
- enum twitchAPI.type.DropsEntitlementFulfillmentStatus(value)#
Bases:
Enum
Valid values are as follows:
- CLAIMED = <DropsEntitlementFulfillmentStatus.CLAIMED: 'CLAIMED'>#
- FULFILLED = <DropsEntitlementFulfillmentStatus.FULFILLED: 'FULFILLED'>#
- enum twitchAPI.type.ChatEvent(value)#
Bases:
Enum
Represents the possible events to listen for using
register_event()
Valid values are as follows:
- READY = <ChatEvent.READY: 'ready'>#
Triggered when the bot is started up and ready
- MESSAGE = <ChatEvent.MESSAGE: 'message'>#
Triggered when someone wrote a message in a chat channel
- SUB = <ChatEvent.SUB: 'sub'>#
Triggered when someone subscribed to a channel
- RAID = <ChatEvent.RAID: 'raid'>#
Triggered when a channel gets raided
- ROOM_STATE_CHANGE = <ChatEvent.ROOM_STATE_CHANGE: 'room_state_change'>#
Triggered when a chat channel is changed (e.g. sub only mode was enabled)
- JOIN = <ChatEvent.JOIN: 'join'>#
Triggered when someone other than the bot joins a chat channel
- JOINED = <ChatEvent.JOINED: 'joined'>#
Triggered when the bot joins a chat channel
- LEFT = <ChatEvent.LEFT: 'left'>#
Triggered when the bot leaves a chat channel
- USER_LEFT = <ChatEvent.USER_LEFT: 'user_left'>#
Triggered when a user leaves a chat channel
- MESSAGE_DELETE = <ChatEvent.MESSAGE_DELETE: 'message_delete'>#
Triggered when a message gets deleted from a channel
- CHAT_CLEARED = <ChatEvent.CHAT_CLEARED: 'chat_cleared'>#
Triggered when a user was banned, timed out or all messaged from a user where deleted
- WHISPER = <ChatEvent.WHISPER: 'whisper'>#
Triggered when someone whispers to your bot. NOTE: You need the
WHISPERS_READ
Auth Scope to get this Event.
- NOTICE = <ChatEvent.NOTICE: 'notice'>#
Triggered on server notice
- class twitchAPI.type.ChatRoom#
Bases:
object
ChatRoom(name: str, is_emote_only: bool, is_subs_only: bool, is_followers_only: bool, is_unique_only: bool, follower_only_delay: int, room_id: str, slow: int)
- __init__(name, is_emote_only, is_subs_only, is_followers_only, is_unique_only, follower_only_delay, room_id, slow)#
- exception twitchAPI.type.TwitchAPIException#
Bases:
Exception
Base Twitch API Exception
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.InvalidRefreshTokenException#
Bases:
TwitchAPIException
used User Refresh Token is invalid
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.InvalidTokenException#
Bases:
TwitchAPIException
Used if a invalid token is set for the client
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.NotFoundException#
Bases:
TwitchAPIException
Resource was not found with the given parameter
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.TwitchAuthorizationException#
Bases:
TwitchAPIException
Exception in the Twitch Authorization
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.UnauthorizedException#
Bases:
TwitchAuthorizationException
Not authorized to use this
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.MissingScopeException#
Bases:
TwitchAuthorizationException
authorization is missing scope
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.TwitchBackendException#
Bases:
TwitchAPIException
when the Twitch API itself is down
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.PubSubListenTimeoutException#
Bases:
TwitchAPIException
when a PubSub listen command times out
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.MissingAppSecretException#
Bases:
TwitchAPIException
When the app secret is not set but app authorization is attempted
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.EventSubSubscriptionTimeout#
Bases:
TwitchAPIException
When the waiting for a confirmed EventSub subscription timed out
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.EventSubSubscriptionConflict#
Bases:
TwitchAPIException
When you try to subscribe to a EventSub subscription that already exists
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.EventSubSubscriptionError#
Bases:
TwitchAPIException
if the subscription request was invalid
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception twitchAPI.type.DeprecatedError#
Bases:
TwitchAPIException
If something has been marked as deprecated by the Twitch API
- __init__(*args, **kwargs)#
- __new__(**kwargs)#
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.