@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
33 lines (32 loc) • 1.13 kB
TypeScript
import { Base } from '../Base';
import type { ChatBot } from '../ChatBot';
import type { ChatRoom } from '../ChatRoom';
import type { EventSubConnection } from '../../enums';
import type { TimeoutOptions } from '../../interfaces';
/**
* The timeout manager of a chatroom.
*/
export declare class TimeoutManager<T extends EventSubConnection> extends Base<T> {
/**
* The chatroom instance.
*/
readonly chatroom: ChatRoom<T>;
/**
* Creates a new instance of the timeout manager.
* @param chatbot The current instance of the chatbot.
* @param chatroom The chatroom instance.
*/
constructor(chatbot: ChatBot<T>, chatroom: ChatRoom<T>);
/**
* Timeout a specific user within the chatroom.
* @param options The options required for send an user into a timeout. See {@link TimeoutOptions}.
* @returns
*/
add(options: TimeoutOptions): Promise<void>;
/**
* Deletes the timeout of a specific user within the chatroom.
* @param userId The id of the user to remove from the timeout.
* @returns
*/
delete(userId: string): Promise<void>;
}