@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
30 lines (29 loc) • 1.12 kB
TypeScript
import { Base } from '../Base';
import type { ChatBot } from '../ChatBot';
import { Ban } from '../Ban';
import type { EventSubConnection } from '../../enums';
import type { BanOptions } from '../../interfaces';
/**
* The ban manager of the chatbot.
*/
export declare class ChatBotBanManager<T extends EventSubConnection> extends Base<T> {
/**
* Creates a new instance of the ban manager.
* @param chatbot The current instance of the chatbot.
*/
constructor(chatbot: ChatBot<T>);
/**
* Ban a specific user.
* @param chatroomId The id of the chatroom where the user will be banned.
* @param options The options required for banning an user. See {@link BanOptions}.
* @returns A class representation of the ban. See {@link Ban}.
*/
add(chatroomId: string, options: BanOptions): Promise<Ban<T>>;
/**
* Deletes the ban of a specific user.
* @param chatroomId The id of the chatroom where the user will be unbanned.
* @param userId The id of the user to unban.
* @returns
*/
delete(chatroomId: string, userId: string): Promise<void>;
}