twitch-core
Version:
Twitch bot command client
74 lines (73 loc) • 2.11 kB
TypeScript
import { ChatUserstate, CommonUserstate } from 'tmi.js';
import { TwitchChatUser } from '../users/TwitchChatUser';
import { TwitchChatChannel } from '../channels/TwitchChatChannel';
import { TwitchCommandClient, ChatterState } from '../client/TwitchCommandClient';
declare class TwitchChatMessage {
private client;
private originalMessage;
private _channel;
private _author;
private _timestamp;
constructor(originalMessage: ChatterState, channel: string, client: TwitchCommandClient);
/**
* Text of the message
*/
get text(): string;
/**
* The author of the message
*/
get author(): TwitchChatUser;
/**
* The ID of the message
*/
get id(): string;
/**
* The channel where the message has been sent in
*/
get channel(): TwitchChatChannel;
/**
* Text color
*/
get color(): string;
/**
* Emotes contained in the message
*/
get emotes(): CommonUserstate['emotes'];
/**
* Message sent date
*/
get timestamp(): Date;
/**
* Message type
*/
get messageType(): ChatUserstate['message-type'];
/**
* Helper method to reply quickly to a message. Create a message to send in the channel with @author <text>
*
* @param text
* @param addRandomEmote
*/
reply(text: string, addRandomEmote?: boolean): Promise<[string, string] | [string]>;
/**
* Helper method to reply quickly to a message with an action
*
* @param text
* @param addRandomEmote
*/
actionReply(text: string, addRandomEmote?: boolean): Promise<[string]>;
/**
* Helper method to send message
*
* @param text
* @param addRandomEmote
*/
say(text: string, addRandomEmote?: boolean): Promise<[string]>;
/**
* Helper method to a message with an action
*
* @param text
* @param addRandomEmote
*/
actionSay(text: string, addRandomEmote?: boolean): Promise<[string]>;
}
export { TwitchChatMessage };