BaseUser
The base class for a user.
Extends
Base
<T
>
Extended by
Type parameters
Type parameter |
---|
T extends EventSubConnection |
Constructors
new BaseUser()
Creates a new instance of the base user.
Parameters
Parameter | Type | Description |
---|---|---|
chatbot | ChatBot <T > | The current instance of the chatbot. |
data | BaseUserData | The base data of the user. |
Returns
BaseUser
<T
>
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:31
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
chatbot | readonly | ChatBot <T > | The current instance of the chatbot. | Base.chatbot |
displayName | readonly | string | The display name of the user. | - |
id | readonly | string | The id of the user. | - |
username | readonly | string | The username of the user. | - |
Methods
channel()
Returns
Promise
<Channel
<T
>>
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:79
chatroom()
Gets the chatroom of the user.
Returns
Promise
<ChatRoom
<T
>>
The chatroom of the user.
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:42
fetch()
Fetches the current user from the API.
Returns
Promise
<User
<T
>>
The fetched user from the API.
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:51
inStream()
Checks whether the user is currently streaming.
Returns
Promise
<boolean
>
A boolean indicating whether the user is currently streaming.
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:74
stream()
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/BaseUser.ts:66
toString()
Returns the mention of the user.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/BaseUser.ts:58
whisper()
Sends a whisper to the user.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | The message to send. |
Returns
Promise
<void
>