Skip to content

BaseUserWithoutUsername

The base class for a user without an username.

Extends

  • Base<T>

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BaseUserWithoutUsername()

1
new BaseUserWithoutUsername<T>(chatbot: ChatBot<T>, data: Omit<BaseUserData, "login">): BaseUserWithoutUsername<T>

Creates a new instance of the base user without an username.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataOmit<BaseUserData, "login">The base data of the user.

Returns

BaseUserWithoutUsername<T>

Overrides

Base<T>.constructor

Source

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

Properties

PropertyModifierTypeDescriptionInherited from
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot
dislayNamereadonlystringThe display name of the user.-
idreadonlystringThe id of the user.-

Methods

fetch()

1
fetch(): Promise<User<T>>

Fetches the current user from the API.

Returns

Promise<User<T>>

The fetched user from the API.

Source

twitchfy/packages/chatbot/src/structures/BaseUserWithoutUsername.ts:38


inStream()

1
inStream(): Promise<boolean>

Returns whether the user is currently in stream or not.

Returns

Promise<boolean>

A boolean indicating whether the user is currently streaming.

Source

twitchfy/packages/chatbot/src/structures/BaseUserWithoutUsername.ts:64


stream()

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

Fetches the current stream of the user from the API.

Returns

Promise<null | Stream<T>>

The current stream or null if the stream is offline.

Source

twitchfy/packages/chatbot/src/structures/BaseUserWithoutUsername.ts:53


toString()

1
toString(): string

Returns the mention of the user.

Returns

string

Source

twitchfy/packages/chatbot/src/structures/BaseUserWithoutUsername.ts:45


whisper()

1
whisper(message: string): Promise<void>

Sends a whisper to the user.

Parameters

ParameterTypeDescription
messagestringThe message to send.

Returns

Promise<void>

Source

twitchfy/packages/chatbot/src/structures/BaseUserWithoutUsername.ts:74