123456789101112131415161718192021222324252627 |
- import { Message } from "discord.js";
- export type BotEvent = (actionsDone: boolean, ...params: any[]) => boolean;
- export interface IDocumentation {
- auth: boolean;
- description: string;
- };
- export type DocumentationSet = {
- [command: string] : IDocumentation;
- };
- export interface IBotCommand {
- pattern: string | RegExp;
- action(message: Message, strippedContents: string, matches?: RegExpMatchArray) : void;
- };
- export interface ICommand {
- commands?: Array<IBotCommand>;
- documentation?: DocumentationSet;
- onMessage?(actionsDone: boolean, m : Message, content: string) : boolean;
- onIndirectMention?(actionsDone: boolean, m: Message) : boolean;
- onDirectMention?(actionsDone: boolean, m: Message, content: string) : boolean;
- postMessage?(actionsDone: boolean, m: Message) : boolean;
- onStart?(): void;
- };
|