forked from engineering/cloudservices
fix command handler again
parent
c177fb88ee
commit
ec5717d0a7
|
@ -11,6 +11,8 @@ export default class {
|
||||||
|
|
||||||
public async run(message: Message) {
|
public async run(message: Message) {
|
||||||
try {
|
try {
|
||||||
|
if (message.author.bot) return;
|
||||||
|
if (message.content.indexOf(this.client.config.prefix) !== 0) return;
|
||||||
const noPrefix: string[] = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g);
|
const noPrefix: string[] = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g);
|
||||||
const command: string = noPrefix[0].toLowerCase();
|
const command: string = noPrefix[0].toLowerCase();
|
||||||
const resolved: Command = this.client.util.resolveCommand(command);
|
const resolved: Command = this.client.util.resolveCommand(command);
|
||||||
|
|
Loading…
Reference in New Issue