twitch.py 3.2.7__tar.gz → 3.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {twitch_py-3.2.7/twitch.py.egg-info → twitch_py-3.2.8}/PKG-INFO +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/__init__.py +2 -2
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/channel.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/chat.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/client.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/errors.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/bot/__init__.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/bot/bot.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/oauth/__init__.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/oauth/enums.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/oauth/http.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/oauth/oauth.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/__init__.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/attachment.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/geteway.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/overlay.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/route.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/ext/overlay/template.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/gateway.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/http.py +7 -2
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/state.py +4 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/stream.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/__init__.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/activity.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/analytics.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/bits.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/channels.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/chat.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/__init__.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/activity.py +1 -1
- twitch_py-3.2.8/twitch/types/eventsub/bits.py +174 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/channels.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/chat.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/interaction.py +69 -21
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/moderation.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/streams.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/eventsub/users.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/interaction.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/moderation.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/search.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/streams.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/types/users.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/user.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/utils.py +1 -1
- {twitch_py-3.2.7 → twitch_py-3.2.8/twitch.py.egg-info}/PKG-INFO +1 -1
- twitch_py-3.2.7/twitch/types/eventsub/bits.py +0 -58
- {twitch_py-3.2.7 → twitch_py-3.2.8}/LICENSE +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/MANIFEST.in +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/README.md +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/pyproject.toml +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/requirements.txt +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/setup.cfg +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/setup.py +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch/py.typed +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch.py.egg-info/SOURCES.txt +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch.py.egg-info/dependency_links.txt +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch.py.egg-info/requires.txt +0 -0
- {twitch_py-3.2.7 → twitch_py-3.2.8}/twitch.py.egg-info/top_level.txt +0 -0
|
@@ -3,12 +3,12 @@ twitch.py
|
|
|
3
3
|
|
|
4
4
|
Real-time Twitch Event Handling and Helix API Integration in Python
|
|
5
5
|
|
|
6
|
-
:copyright: (c)
|
|
6
|
+
:copyright: (c) 2025-present Snifo
|
|
7
7
|
:license: MIT, see LICENSE for more details.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
__title__ = 'twitch.py'
|
|
11
|
-
__version__ = '3.2.
|
|
11
|
+
__version__ = '3.2.8'
|
|
12
12
|
__license__ = 'MIT License'
|
|
13
13
|
__author__ = 'Snifo'
|
|
14
14
|
__email__ = 'Snifo@mail.com'
|
|
@@ -4,7 +4,7 @@ twitch.ext.overlay
|
|
|
4
4
|
An extension that provides functionalities to manage and send overlay alerts,
|
|
5
5
|
handle WebSocket connections, and manage file attachments.
|
|
6
6
|
|
|
7
|
-
:copyright: (c)
|
|
7
|
+
:copyright: (c) 2025-present Snifo
|
|
8
8
|
:license: MIT, see LICENSE for more details.
|
|
9
9
|
"""
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
The MIT License (MIT)
|
|
3
3
|
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2025-present Snifo
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
7
|
copy of this software and associated documentation files (the "Software"),
|
|
@@ -373,6 +373,11 @@ class HTTPClient:
|
|
|
373
373
|
'version': '1',
|
|
374
374
|
'condition': {'broadcaster': 'moderator_user_id', 'user': 'broadcaster_user_id'}
|
|
375
375
|
},
|
|
376
|
+
'bits_use': {
|
|
377
|
+
'name': 'channel.bits.use',
|
|
378
|
+
'version': '1',
|
|
379
|
+
'condition': {'broadcaster': None, 'user': 'broadcaster_user_id'}
|
|
380
|
+
},
|
|
376
381
|
'channel_update': {
|
|
377
382
|
'name': 'channel.update',
|
|
378
383
|
'version': '2',
|
|
@@ -510,7 +515,7 @@ class HTTPClient:
|
|
|
510
515
|
},
|
|
511
516
|
'points_automatic_reward_redemption_add': {
|
|
512
517
|
'name': 'channel.channel_points_automatic_reward_redemption.add',
|
|
513
|
-
'version': '
|
|
518
|
+
'version': '2',
|
|
514
519
|
'condition': {'broadcaster': None, 'user': 'broadcaster_user_id'}
|
|
515
520
|
},
|
|
516
521
|
'points_reward_add': {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
The MIT License (MIT)
|
|
3
3
|
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2025-present Snifo
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
7
|
copy of this software and associated documentation files (the "Software"),
|
|
@@ -535,6 +535,9 @@ class ConnectionState:
|
|
|
535
535
|
def parse_channel_cheer(self, data: eventsub.bits.CheerEvent) -> None:
|
|
536
536
|
self.__dispatch('cheer', data)
|
|
537
537
|
|
|
538
|
+
def parse_channel_bits_use(self, data: eventsub.bits.BitsEvent) -> None:
|
|
539
|
+
self.__dispatch('bits_use', data)
|
|
540
|
+
|
|
538
541
|
# Moderation
|
|
539
542
|
def parse_channel_shield_mode_begin(self, data: eventsub.moderation.ShieldModeBeginEvent) -> None:
|
|
540
543
|
self.__dispatch('shield_mode_begin', data)
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2025-present Snifo
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
to deal in the Software without restriction, including without limitation
|
|
9
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT firstED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
+
DEALINGS IN THE SOFTWARE.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
from .users import SpecificBroadcaster, SpecificUser
|
|
28
|
+
from typing import TYPE_CHECKING, TypedDict
|
|
29
|
+
|
|
30
|
+
if TYPE_CHECKING:
|
|
31
|
+
from typing import Optional, List, Optional, Literal
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CheerEvent(SpecificBroadcaster):
|
|
36
|
+
"""
|
|
37
|
+
Represents a channel cheer event on Twitch.
|
|
38
|
+
|
|
39
|
+
Attributes
|
|
40
|
+
----------
|
|
41
|
+
is_anonymous: bool
|
|
42
|
+
Indicates whether the cheer was made anonymously.
|
|
43
|
+
user_id: Optional[str]
|
|
44
|
+
The ID of the user who made the cheer, if not anonymous.
|
|
45
|
+
user_login: Optional[str]
|
|
46
|
+
The login name of the user who made the cheer, if not anonymous.
|
|
47
|
+
user_name: Optional[str]
|
|
48
|
+
The display name of the user who made the cheer, if not anonymous.
|
|
49
|
+
message: str
|
|
50
|
+
The message accompanying the cheer.
|
|
51
|
+
bits: int
|
|
52
|
+
The number of bits cheered.
|
|
53
|
+
"""
|
|
54
|
+
is_anonymous: bool
|
|
55
|
+
user_id: Optional[str]
|
|
56
|
+
user_login: Optional[str]
|
|
57
|
+
user_name: Optional[str]
|
|
58
|
+
message: str
|
|
59
|
+
bits: int
|
|
60
|
+
|
|
61
|
+
# Bits use
|
|
62
|
+
class Emote(TypedDict):
|
|
63
|
+
"""
|
|
64
|
+
Represents metadata about an emote.
|
|
65
|
+
|
|
66
|
+
Attributes
|
|
67
|
+
----------
|
|
68
|
+
id: str
|
|
69
|
+
The unique identifier for the emote.
|
|
70
|
+
emote_set_id: str
|
|
71
|
+
The identifier for the emote set the emote belongs to.
|
|
72
|
+
owner_id: str
|
|
73
|
+
The ID of the broadcaster who owns the emote.
|
|
74
|
+
format: list of {'animated', 'static'}
|
|
75
|
+
Available formats for the emote (e.g., static PNG or animated GIF).
|
|
76
|
+
"""
|
|
77
|
+
id: str
|
|
78
|
+
emote_set_id: str
|
|
79
|
+
owner_id: str
|
|
80
|
+
format: List[Literal["animated", "static"]]
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class Cheermote(TypedDict):
|
|
84
|
+
"""
|
|
85
|
+
Represents metadata about a cheermote.
|
|
86
|
+
|
|
87
|
+
Attributes
|
|
88
|
+
----------
|
|
89
|
+
prefix: str
|
|
90
|
+
The prefix of the Cheermote string used in chat.
|
|
91
|
+
bits: int
|
|
92
|
+
The number of Bits cheered.
|
|
93
|
+
tier: int
|
|
94
|
+
The tier level of the cheermote.
|
|
95
|
+
"""
|
|
96
|
+
prefix: str
|
|
97
|
+
bits: int
|
|
98
|
+
tier: int
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class Fragment(TypedDict):
|
|
102
|
+
"""
|
|
103
|
+
Represents a fragment of a chat message.
|
|
104
|
+
|
|
105
|
+
Attributes
|
|
106
|
+
----------
|
|
107
|
+
text: str
|
|
108
|
+
The message text within the fragment.
|
|
109
|
+
type: Literal["text", "cheermote", "emote"]
|
|
110
|
+
The type of fragment (text, cheermote, or emote).
|
|
111
|
+
emote: Optional[Emote]
|
|
112
|
+
Metadata about the emote if the fragment contains one.
|
|
113
|
+
"""
|
|
114
|
+
text: str
|
|
115
|
+
type: Literal["text", "cheermote", "emote"]
|
|
116
|
+
emote: Optional[Emote]
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class Message(TypedDict):
|
|
120
|
+
"""
|
|
121
|
+
Represents a chat message with potential emotes and cheermotes.
|
|
122
|
+
|
|
123
|
+
Attributes
|
|
124
|
+
----------
|
|
125
|
+
text: str
|
|
126
|
+
The complete message in plain text.
|
|
127
|
+
fragments: list of Fragment
|
|
128
|
+
The ordered list of message fragments.
|
|
129
|
+
"""
|
|
130
|
+
text: str
|
|
131
|
+
fragments: List[Fragment]
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class PowerUp(TypedDict):
|
|
135
|
+
"""
|
|
136
|
+
Represents a Power-up event in chat.
|
|
137
|
+
|
|
138
|
+
Attributes
|
|
139
|
+
----------
|
|
140
|
+
type: Literal["message_effect", "celebration", "gigantify_an_emote"]
|
|
141
|
+
The type of Power-up effect.
|
|
142
|
+
emote: Optional[Emote]
|
|
143
|
+
Associated emote with the Power-up.
|
|
144
|
+
message_effect_id: Optional[str]
|
|
145
|
+
The ID of the message effect.
|
|
146
|
+
"""
|
|
147
|
+
type: Literal["message_effect", "celebration", "gigantify_an_emote"]
|
|
148
|
+
emote: Optional[Emote]
|
|
149
|
+
message_effect_id: Optional[str]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class BitsEvent(SpecificBroadcaster, SpecificUser):
|
|
153
|
+
"""
|
|
154
|
+
Represents a Bits transaction event.
|
|
155
|
+
|
|
156
|
+
Attributes
|
|
157
|
+
----------
|
|
158
|
+
bits: int
|
|
159
|
+
The number of Bits used.
|
|
160
|
+
type: Literal["cheer", "power_up"]
|
|
161
|
+
The type of Bits event.
|
|
162
|
+
message: Optional[Message]
|
|
163
|
+
An object containing the user message and emote information.
|
|
164
|
+
cheermote: Optional[Cheermote]
|
|
165
|
+
Metadata about the cheermote.
|
|
166
|
+
power_up: Optional[PowerUp]
|
|
167
|
+
Data about Power-up effects.
|
|
168
|
+
"""
|
|
169
|
+
bits: int
|
|
170
|
+
type: Literal["cheer", "power_up"]
|
|
171
|
+
message: Optional[Message]
|
|
172
|
+
cheermote: Optional[Cheermote]
|
|
173
|
+
power_up: Optional[PowerUp]
|
|
174
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
The MIT License (MIT)
|
|
3
3
|
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2025-present Snifo
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
7
|
copy of this software and associated documentation files (the "Software"),
|
|
@@ -202,44 +202,92 @@ class PointRewardEvent(SpecificBroadcaster):
|
|
|
202
202
|
redemptions_redeemed_current_stream: Optional[int]
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
class
|
|
205
|
+
class RedemptionMessageEmote(TypedDict):
|
|
206
206
|
"""
|
|
207
|
-
Represents
|
|
207
|
+
Represents metadata about an emote.
|
|
208
208
|
|
|
209
209
|
Attributes
|
|
210
210
|
----------
|
|
211
211
|
id: str
|
|
212
|
-
The
|
|
213
|
-
|
|
214
|
-
The
|
|
215
|
-
cost: int
|
|
216
|
-
The cost of the reward in channel points or other currency.
|
|
212
|
+
The unique identifier for the emote.
|
|
213
|
+
name: str
|
|
214
|
+
The human-readable emote token.
|
|
217
215
|
"""
|
|
218
216
|
id: str
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
name: str
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class RedemptionFragment(TypedDict):
|
|
221
|
+
"""
|
|
222
|
+
Represents a fragment of a chat message.
|
|
223
|
+
|
|
224
|
+
Attributes
|
|
225
|
+
----------
|
|
226
|
+
text: str
|
|
227
|
+
The message text within the fragment.
|
|
228
|
+
type: Literal["text", "emote"]
|
|
229
|
+
The type of fragment (text or emote).
|
|
230
|
+
emote: Optional[Emote]
|
|
231
|
+
Metadata about the emote if the fragment contains one.
|
|
232
|
+
"""
|
|
233
|
+
text: str
|
|
234
|
+
type: Literal["text", "emote"]
|
|
235
|
+
emote: Optional[RedemptionMessageEmote]
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class RedemptionMessage(TypedDict):
|
|
239
|
+
"""
|
|
240
|
+
Represents a chat message with potential emotes.
|
|
241
|
+
|
|
242
|
+
Attributes
|
|
243
|
+
----------
|
|
244
|
+
text: str
|
|
245
|
+
The complete message in plain text.
|
|
246
|
+
fragments: List[Fragment]
|
|
247
|
+
The ordered list of message fragments.
|
|
248
|
+
"""
|
|
249
|
+
text: str
|
|
250
|
+
fragments: List[RedemptionFragment]
|
|
251
|
+
|
|
252
|
+
class RewardInfo(TypedDict):
|
|
253
|
+
"""
|
|
254
|
+
Represents information about the reward redeemed by the user.
|
|
255
|
+
|
|
256
|
+
Attributes
|
|
257
|
+
----------
|
|
258
|
+
type: Literal["single_message_bypass_sub_mode", "send_highlighted_message",
|
|
259
|
+
"random_sub_emote_unlock", "chosen_sub_emote_unlock",
|
|
260
|
+
"chosen_modified_sub_emote_unlock"]
|
|
261
|
+
The type of reward redeemed.
|
|
262
|
+
channel_points: int
|
|
263
|
+
The number of channel points used to redeem the reward.
|
|
264
|
+
emote: Optional[Emote]
|
|
265
|
+
The associated emote for the reward, if available.
|
|
266
|
+
message: Optional[Message]
|
|
267
|
+
The associated message and emote information for the reward.
|
|
268
|
+
"""
|
|
269
|
+
type: Literal["single_message_bypass_sub_mode", "send_highlighted_message",
|
|
270
|
+
"random_sub_emote_unlock", "chosen_sub_emote_unlock",
|
|
271
|
+
"chosen_modified_sub_emote_unlock"]
|
|
272
|
+
channel_points: int
|
|
273
|
+
emote: Optional[Emote]
|
|
274
|
+
message: Optional[RedemptionMessage]
|
|
221
275
|
|
|
222
276
|
|
|
223
277
|
class RewardRedemptionEvent(SpecificBroadcaster, SpecificUser):
|
|
224
278
|
"""
|
|
225
|
-
Represents
|
|
279
|
+
Represents a channel points redemption event.
|
|
226
280
|
|
|
227
281
|
Attributes
|
|
228
282
|
----------
|
|
229
283
|
id: str
|
|
230
|
-
The
|
|
231
|
-
|
|
232
|
-
The
|
|
233
|
-
status: Literal['unknown', 'unfulfilled', 'fulfilled', 'canceled']
|
|
234
|
-
The current status of the reward redemption.
|
|
235
|
-
reward: RewardInfo
|
|
236
|
-
Basic information about the reward redeemed.
|
|
284
|
+
The unique identifier for the redemption event.
|
|
285
|
+
reward: Reward
|
|
286
|
+
The reward information associated with the redemption.
|
|
237
287
|
redeemed_at: str
|
|
238
|
-
The
|
|
288
|
+
The UTC date and time (in RFC3339 format) of when the reward was redeemed.
|
|
239
289
|
"""
|
|
240
290
|
id: str
|
|
241
|
-
user_input: str
|
|
242
|
-
status: Literal['unknown', 'unfulfilled', 'fulfilled', 'canceled']
|
|
243
291
|
reward: RewardInfo
|
|
244
292
|
redeemed_at: str
|
|
245
293
|
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
The MIT License (MIT)
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2024-present Snifo
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
-
copy of this software and associated documentation files (the "Software"),
|
|
8
|
-
to deal in the Software without restriction, including without limitation
|
|
9
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
-
Software is furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in
|
|
14
|
-
all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
-
OR IMPLIED, INCLUDING BUT NOT firstED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
DEALINGS IN THE SOFTWARE.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
from __future__ import annotations
|
|
26
|
-
|
|
27
|
-
from .users import SpecificBroadcaster
|
|
28
|
-
from typing import TYPE_CHECKING
|
|
29
|
-
|
|
30
|
-
if TYPE_CHECKING:
|
|
31
|
-
from typing import Optional
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class CheerEvent(SpecificBroadcaster):
|
|
35
|
-
"""
|
|
36
|
-
Represents a channel cheer event on Twitch.
|
|
37
|
-
|
|
38
|
-
Attributes
|
|
39
|
-
----------
|
|
40
|
-
is_anonymous: bool
|
|
41
|
-
Indicates whether the cheer was made anonymously.
|
|
42
|
-
user_id: Optional[str]
|
|
43
|
-
The ID of the user who made the cheer, if not anonymous.
|
|
44
|
-
user_login: Optional[str]
|
|
45
|
-
The login name of the user who made the cheer, if not anonymous.
|
|
46
|
-
user_name: Optional[str]
|
|
47
|
-
The display name of the user who made the cheer, if not anonymous.
|
|
48
|
-
message: str
|
|
49
|
-
The message accompanying the cheer.
|
|
50
|
-
bits: int
|
|
51
|
-
The number of bits cheered.
|
|
52
|
-
"""
|
|
53
|
-
is_anonymous: bool
|
|
54
|
-
user_id: Optional[str]
|
|
55
|
-
user_login: Optional[str]
|
|
56
|
-
user_name: Optional[str]
|
|
57
|
-
message: str
|
|
58
|
-
bits: int
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|