|
37 | 37 | "Clip", |
38 | 38 | "CheerEmote", |
39 | 39 | "CheerEmoteTier", |
| 40 | + "GlobalEmote", |
| 41 | + "ChannelEmote", |
40 | 42 | "HypeTrainContribution", |
41 | 43 | "HypeTrainEvent", |
42 | 44 | "BanEvent", |
@@ -174,6 +176,90 @@ def __repr__(self): |
174 | 176 | return f"<CheerEmote prefix={self.prefix} type={self.type} order={self.order}>" |
175 | 177 |
|
176 | 178 |
|
| 179 | +class GlobalEmote: |
| 180 | + """ |
| 181 | + Represents a Global Emote |
| 182 | +
|
| 183 | + Attributes |
| 184 | + ----------- |
| 185 | + id: :class:`str` |
| 186 | + The ID of the emote. |
| 187 | + name: :class:`str` |
| 188 | + The name of the emote. |
| 189 | + images: :class:`dict` |
| 190 | + Contains the image URLs for the emote. These image URLs will always provide a static (i.e., non-animated) emote image with a light background. |
| 191 | + format: List[:class:`str`] |
| 192 | + The formats that the emote is available in. |
| 193 | + scale: List[:class:`str`] |
| 194 | + The sizes that the emote is available in. |
| 195 | + theme_mode: List[:class:`str`] |
| 196 | + The background themes that the emote is available in. |
| 197 | + """ |
| 198 | + |
| 199 | + __slots__ = ( |
| 200 | + "id", |
| 201 | + "name", |
| 202 | + "images", |
| 203 | + "format", |
| 204 | + "scale", |
| 205 | + "theme_mode", |
| 206 | + "template" |
| 207 | + ) |
| 208 | + |
| 209 | + def __init__(self, http: "TwitchHTTP", data: dict): |
| 210 | + self.id: str = data["id"] |
| 211 | + self.name: str = data["name"] |
| 212 | + self.images: dict = data["images"] |
| 213 | + self.format: List[str] = data["format"] |
| 214 | + self.scale: List[str] = data["scale"] |
| 215 | + self.theme_mode: List[str] = data["theme_mode"] |
| 216 | + |
| 217 | + def __repr__(self): |
| 218 | + return f"<GlobalEmote id={self.id} name={self.name}" |
| 219 | + |
| 220 | + |
| 221 | +class ChannelEmote(GlobalEmote): |
| 222 | + """ |
| 223 | + Represents a Channel Emote |
| 224 | +
|
| 225 | + Attributes |
| 226 | + ----------- |
| 227 | + id: :class:`str` |
| 228 | + The ID of the emote. |
| 229 | + name: :class:`str` |
| 230 | + The name of the emote. |
| 231 | + images: :class:`dict` |
| 232 | + Contains the image URLs for the emote. These image URLs will always provide a static (i.e., non-animated) emote image with a light background. |
| 233 | + tier: :class:`str` |
| 234 | + The subscriber tier at which the emote is unlocked. |
| 235 | + type: :class:`str` |
| 236 | + The type of emote. |
| 237 | + set_id: :class:`str` |
| 238 | + An ID that identifies the emote set that the emote belongs to. |
| 239 | + format: List[:class:`str`] |
| 240 | + The formats that the emote is available in. |
| 241 | + scale: List[:class:`str`] |
| 242 | + The sizes that the emote is available in. |
| 243 | + theme_mode: List[:class:`str`] |
| 244 | + The background themes that the emote is available in. |
| 245 | + """ |
| 246 | + |
| 247 | + __slots__ = ( |
| 248 | + "tier", |
| 249 | + "type", |
| 250 | + "set_id" |
| 251 | + ) |
| 252 | + |
| 253 | + def __init__(self, http: "TwitchHTTP", data: dict): |
| 254 | + super().__init__(http, data) |
| 255 | + self.tier: str = data["tier"] |
| 256 | + self.type: str = data["emote_type"] |
| 257 | + self.set_id: str = data["emote_set_id"] |
| 258 | + |
| 259 | + def __repr__(self): |
| 260 | + return f"<ChannelEmote id={self.id} name={self.name} type={self.type}>" |
| 261 | + |
| 262 | + |
177 | 263 | class Clip: |
178 | 264 | """ |
179 | 265 | Represents a Twitch Clip |
|
0 commit comments