add success/loading/error helper functions in Command class

merge-requests/4/head
Matthew 2020-06-28 22:25:30 -04:00
parent 4be5279c8f
commit 9678dddadd
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { Message } from 'eris';
import { Message, TextableChannel, Textable } from 'eris';
import { Client } from '..';
import { Collection } from '.';
@ -39,4 +39,16 @@ export default class Command {
this.subcommands = new Collection<Command>();
this.permissions = {};
}
public success(channel: TextableChannel, txt: string) {
return channel.createMessage(`***${this.client.stores.emojis.success} ${txt}***`);
}
public loading(channel: TextableChannel, txt: string) {
return channel.createMessage(`***${this.client.stores.emojis.loading} ${txt}***`);
}
public error(channel: TextableChannel, txt: string) {
return channel.createMessage(`***${this.client.stores.emojis.error} ${txt}***`);
}
}