@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
60 lines (59 loc) • 2.04 kB
TypeScript
import type { ChatSettings, PatchChatSettingsBody } from '@twitchfy/api-types';
import { Base } from './Base';
import type { ChatBot } from './ChatBot';
import type { ChatRoom } from './ChatRoom';
import type { EventSubConnection } from '../enums';
/**
* Represents the settings of a chatroom.
*/
export declare class ChatRoomSettings<T extends EventSubConnection> extends Base<T> {
/**
* The chatroom of the settings.
*/
readonly chatroom: ChatRoom<T>;
/**
* The data representing the chat settings.
*/
private data;
/**
* Creates a new instance of the chatroom settings.
* @param chatbot The current instance of the chatbot.
* @param chatroom The chatroom of the settings.
* @param data The data representing the chat settings.
*/
constructor(chatbot: ChatBot<T>, chatroom: ChatRoom<T>, data: ChatSettings);
/**
* Edits the chat settings of the chatroom.
* @param options The options to edit the chat settings.
* @returns The updated chatroom settings.
*/
edit(options: PatchChatSettingsBody): Promise<ChatRoomSettings<T>>;
/**
* The Id of the chatroom.
*/
get chatroomId(): string;
/**
* Whether the chatroom is in emote only mode.
*/
get emotesOnly(): boolean;
/**
* The number of seconds a follower has to be following to be able to write. If the follower mode is disabled, this will return false.
*/
get followersOnly(): number | false;
/**
* Whether the chatroom is in subscriber mode.
*/
get subscriberMode(): boolean;
/**
* Whether the chatroom is in unique messages mode.
*/
get uniqueMessagesMode(): boolean;
/**
* The slow mode duration of the chatroom in seconds. If slow mode is disabled, this will return false.
*/
get slowMode(): number | false | null;
/**
* The duration of the chat delay in seconds. If chat delay is disabled, this will return false.
*/
get chatDelay(): number | false | null;
}