@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
79 lines (78 loc) • 2.77 kB
TypeScript
import type { GetClipsOptions } from '@twitchfy/helix';
import { Base } from './Base';
import type { ChatRoom } from './ChatRoom';
import { BaseUser } from './BaseUser';
import type { ChatBot } from './ChatBot';
import { ChannelEmote } from './ChannelEmote';
import { Collection } from './Collection';
import type { EventSubConnection } from '../enums';
export declare class BaseChannel<T extends EventSubConnection = EventSubConnection> extends Base<T> {
/**
* The id of the channel.
*/
readonly id: string;
/**
* The broadcaster of the channel.
*/
readonly broadcaster: BaseUser<T>;
/**
* The chatroom of the channel.
*/
readonly chatroom: ChatRoom<T>;
constructor(chatbot: ChatBot<T>, data: BaseChannelData, chatroom: ChatRoom<T>);
/**
* The id of the broadcaster who owns the channel.
*/
get broadcasterId(): string;
/**
* The id of the chatroom of the channel.
*/
get chatroomId(): string;
/**
* The chatroom bans manager. See {@link BanManager}.
*/
get bans(): import("structures").BanManager<T>;
/**
* The chatroom timeouts manager. See {@link TimeoutManager}.
*/
get timeouts(): import("structures").TimeoutManager<T>;
/**
* The chatroom messages manager. See {@link MessageManager}.
*/
get messages(): import("structures").MessageManager<T>;
/**
* The chatroom warns manager. See {@link WarnsManager}.
*/
get warns(): import("structures").WarnsManager<T>;
/**
* The chatroom chatters manager. See {@link ChatterManager}.
*/
get chatters(): import("structures").ChatterManager<T>;
/**
* Fetches all the emotes of this channel.
* @returns The a Collection containing all the emotes of the channel.
*/
emotes(): Promise<Collection<string, ChannelEmote<T>>>;
/**
* Fetches the current stream of the channel from the API.
* @returns The current stream or null if the stream is offline.
*/
stream(): Promise<import("structures").Stream<T> | null>;
/**
* Fetches the clips of the channel from the API.
* @param options The options to fetch the clips.
* @returns An array containing the clips of the channel.
*/
clips(options?: Omit<GetClipsOptions<true>, 'broadcaster_id'>): Promise<import("structures").Clip<T>[] | null>;
isModerator(): Promise<boolean>;
/**
* Fetches the current channel from the API.
* @returns The fetched channel from the API.
*/
fetch(): Promise<import("./Channel").Channel<T>>;
}
export interface BaseChannelData {
broadcaster_id: string;
broadcaster_login: string;
broadcaster_name: string;
}