Skip to content

BaseClip

Represents the base class for all clips.

Extends

  • Base<T>

Extended by

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BaseClip()

1
new BaseClip<T>(chatbot: ChatBot<T>, data: GetClip | PostCreateClip): BaseClip<T>

Creates a new instance of the clip.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataGetClip | PostCreateClipThe data of the clip returned from the API.

Returns

BaseClip<T>

Overrides

Base<T>.constructor

Source

twitchfy/packages/chatbot/src/structures/BaseClip.ts:28

Properties

PropertyModifierTypeDescriptionInherited from
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot
idreadonlystringThe id of the clip.-
urlreadonlystringThe url of the clip.-

Methods

fetch()

1
fetch(): Promise<null | Clip<T>>

Fetches the information of the clip from the API.

Returns

Promise<null | Clip<T>>

The fetched clip. Returns null if the clip was not found (probably because it was not cached yet).

Source

twitchfy/packages/chatbot/src/structures/BaseClip.ts:47


toString()

1
toString(): string

Returns

string

The url of the clip.

Source

twitchfy/packages/chatbot/src/structures/BaseClip.ts:39