GlobalEmote
Represents a Twitch global emote.
Extends
Emote<T,"global">
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new GlobalEmote()
1new GlobalEmote<T>(chatbot: ChatBot<T>, data: GlobalEmote & object): GlobalEmote<T>Creates a new instance of the global emote.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
data | GlobalEmote & object | The data of the global emote returned from the API. |
Returns
GlobalEmote<T>
Overrides
Source
twitchfy/packages/chatbot/src/structures/GlobalEmote.ts:16
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
chatbot | readonly | ChatBot<T> | The current instance of the chatbot. | Emote.chatbot |
id | readonly | string | The id of the emote. | Emote.id |
name | readonly | string | The name of the emote. | Emote.name |
Accessors
animated
1get animated(): booleanWhether the emote is animated.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:62
hasDarkTheme
1get hasDarkTheme(): booleanChecks whether the emote is dark theme.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Emote.ts:37
hasLightTheme
1get hasLightTheme(): booleanChecks whether the emote is light theme.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Emote.ts:30
ownerId
1get ownerId(): null | stringThe Id of the owner of the emote.
Returns
null | string
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:41
setId
1get setId(): null | stringThe Id of the emote set.
Returns
null | string
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:48
static
1get static(): booleanWhether the emote is static.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:55
Methods
fetch()
1fetch(): Promise<null | GlobalEmote<T>>Fetches the emote from the API.
Returns
Promise<null | GlobalEmote<T>>
The fetched emote. Returns null if the emote was not found.
Inherited from
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:86
getURL()
1getURL(options?: EmoteURLOptions): stringGets the URL of the emote.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | EmoteURLOptions | The options to get the URL of the emote. |
Returns
string
Returns the URL of the emote.
Inherited from
Source
twitchfy/packages/chatbot/src/structures/Emote.ts:46
isChannel()
1isChannel(): this is BaseEmote<T, "channel">Check if the emote is a custom channel emote.
Returns
this is BaseEmote<T, "channel">
A boolean indicating whether the emote is a channel emote.
Inherited from
Source
twitchfy/packages/chatbot/src/structures/BaseEmote.ts:78
isGlobal()
1isGlobal(): this is GlobalEmote<T>Overrides isChannel method from BaseEmote to assert this as ChannelEmote and not BaseEmote.
Returns
this is GlobalEmote<T>
Whether the emote is a global emote.