2020-01-13 22:38:12 +00:00
|
|
|
import { Message, PermissionString } from 'discord.js';
|
|
|
|
import { PluginClient } from '../PluginClient';
|
2020-01-19 18:55:35 +00:00
|
|
|
import { UserDoc } from '../models/User';
|
2020-01-13 22:38:12 +00:00
|
|
|
|
|
|
|
type CommandFunction = (
|
|
|
|
lifeguard: PluginClient,
|
|
|
|
msg: Message,
|
2020-01-19 18:55:35 +00:00
|
|
|
args: string[],
|
|
|
|
dbUser: UserDoc
|
2020-01-13 22:38:12 +00:00
|
|
|
) => void;
|
|
|
|
|
|
|
|
interface CommandOptions {
|
|
|
|
alias?: string[];
|
|
|
|
guildOnly?: boolean;
|
|
|
|
hidden?: boolean;
|
|
|
|
level: number;
|
|
|
|
usage: string[];
|
|
|
|
permissions?: PermissionString[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Command {
|
|
|
|
constructor(
|
|
|
|
public name: string,
|
|
|
|
public func: CommandFunction,
|
|
|
|
public options: CommandOptions
|
|
|
|
) {}
|
|
|
|
}
|