Skip to content

Emote

Represents a Twitch emote. It could be either a global emote or a channel emote.

Extends

Extended by

Type parameters

Type parameter
T extends EventSubConnection
K extends "global" | "channel"

Constructors

new Emote()

1
new Emote<T, K>(chatbot: ChatBot<T>, data: ChannelEmote | GlobalEmote & object): Emote<T, K>

Creates a new instance of the emote.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataChannelEmote | GlobalEmote & objectThe data of the emote returned from the API.

Returns

Emote<T, K>

Overrides

BaseEmote.constructor

Source

twitchfy/packages/chatbot/src/structures/Emote.ts:22

Properties

PropertyModifierTypeDescriptionInherited from
chatbotreadonlyChatBot<T>The current instance of the chatbot.BaseEmote.chatbot
idreadonlystringThe id of the emote.BaseEmote.id
namereadonlystringThe name of the emote.BaseEmote.name

Accessors

animated

1
get animated(): boolean

Whether the emote is animated.

Returns

boolean

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:62


hasDarkTheme

1
get hasDarkTheme(): boolean

Checks whether the emote is dark theme.

Returns

boolean

Source

twitchfy/packages/chatbot/src/structures/Emote.ts:37


hasLightTheme

1
get hasLightTheme(): boolean

Checks whether the emote is light theme.

Returns

boolean

Source

twitchfy/packages/chatbot/src/structures/Emote.ts:30


ownerId

1
get ownerId(): null | string

The Id of the owner of the emote.

Returns

null | string

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:41


setId

1
get setId(): null | string

The Id of the emote set.

Returns

null | string

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:48


static

1
get static(): boolean

Whether the emote is static.

Returns

boolean

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:55

Methods

fetch()

1
fetch(): Promise<null | FetchEmote<T, K>>

Fetches the emote from the API.

Returns

Promise<null | FetchEmote<T, K>>

The fetched emote. Returns null if the emote was not found.

Inherited from

BaseEmote.fetch

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:86


getURL()

1
getURL(options?: EmoteURLOptions): string

Gets the URL of the emote.

Parameters

ParameterTypeDescription
options?EmoteURLOptionsThe options to get the URL of the emote.

Returns

string

Returns the URL of the emote.

Source

twitchfy/packages/chatbot/src/structures/Emote.ts:46


isChannel()

1
isChannel(): 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

BaseEmote.isChannel

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:78


isGlobal()

1
isGlobal(): this is BaseEmote<T, "global">

Check if the emote is a global Twitch emote.

Returns

this is BaseEmote<T, "global">

A boolean indicating whether the emote is a global Twitch emote.

Inherited from

BaseEmote.isGlobal

Source

twitchfy/packages/chatbot/src/structures/BaseEmote.ts:70