forked from engineering/cloudservices
add success/loading/error helper functions in Command class
parent
4be5279c8f
commit
9678dddadd
|
@ -1,4 +1,4 @@
|
||||||
import { Message } from 'eris';
|
import { Message, TextableChannel, Textable } from 'eris';
|
||||||
import { Client } from '..';
|
import { Client } from '..';
|
||||||
import { Collection } from '.';
|
import { Collection } from '.';
|
||||||
|
|
||||||
|
@ -39,4 +39,16 @@ export default class Command {
|
||||||
this.subcommands = new Collection<Command>();
|
this.subcommands = new Collection<Command>();
|
||||||
this.permissions = {};
|
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}***`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue