Skip to content

Stream

Represents a Twitch stream.

Extends

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new Stream()

1
new Stream<T>(chatbot: ChatBot<T>, data: GetStream): Stream<T>

Creates a new instance of the stream.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataGetStreamThe data of the stream returned from the API.

Returns

Stream<T>

Overrides

BaseStream.constructor

Source

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

Properties

PropertyModifierTypeDescriptionInherited from
broadcasterreadonlyBaseUser<T>The broadcaster of the stream.BaseStream.broadcaster
chatbotreadonlyChatBot<T>The current instance of the chatbot.BaseStream.chatbot
gamereadonlyGameThe game which is currently being played on the stream.-
idreadonlystringThe id of the stream.BaseStream.id
isMaturereadonlybooleanWhether the stream is marked as mature.-
languagereadonlystringThe language of the stream.-
tagsreadonlystring[]The tags of the stream.-
typereadonlystringThe type of the stream.BaseStream.type
viewerCountreadonlynumberThe amount of viewers watching 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


title

1
get title(): null | string

The title of the stream.

Returns

null | string

Source

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

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>>

Inherited from

BaseStream.createClip

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.

Inherited from

BaseStream.fetch

Source

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


thumbnailURL()

1
thumbnailURL(options?: ThumbailOptions): string

The thumbnail URL of the stream.

Parameters

ParameterTypeDescription
options?ThumbailOptionsThe options for the thumbnail.

Returns

string

Source

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