Skip to content

BaseStream

The base class for a stream.

Extends

  • Base<T>

Extended by

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BaseStream()

1
new BaseStream<T>(chatbot: ChatBot<T>, data: BaseStreamData): BaseStream<T>

Creates a new instance of the base stream.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataBaseStreamDataThe base data of the stream.

Returns

BaseStream<T>

Overrides

Base<T>.constructor

Source

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

Properties

PropertyModifierTypeDescriptionInherited from
broadcasterreadonlyBaseUser<T>The broadcaster of the stream.-
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot
idreadonlystringThe id of the stream.-
typereadonlystringThe type of the stream.-

Accessors

startedAt

1
get startedAt(): Date

When the stream has started. Returns a JavaScript Date object.

Returns

Date

Source

twitchfy/packages/chatbot/src/structures/BaseStream.ts:67

Methods

createClip()

1
createClip(delay?: boolean): Promise<BaseClip<T>>

Creates a new clip of the stream.

Parameters

ParameterTypeDescription
delay?booleanWhether to delay few seconds the clip or not.

Returns

Promise<BaseClip<T>>

Source

twitchfy/packages/chatbot/src/structures/BaseStream.ts:49


fetch()

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

Fetches the current stream from the API.

Returns

Promise<null | Stream<T>>

The current stream or null if the stream is offline.

Source

twitchfy/packages/chatbot/src/structures/BaseStream.ts:57