1
0
Fork 0

fix command handler again

refactor/models
Matthew 2019-10-27 22:03:05 -04:00
parent c177fb88ee
commit ec5717d0a7
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,8 @@ export default class {
public async run(message: Message) {
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 command: string = noPrefix[0].toLowerCase();
const resolved: Command = this.client.util.resolveCommand(command);