diff --git a/src/commands/emailcode.ts b/src/commands/emailcode.ts index d4947e2..19e4ff8 100644 --- a/src/commands/emailcode.ts +++ b/src/commands/emailcode.ts @@ -16,6 +16,7 @@ export default class EmailCode extends Command { public async run(message: Message, args: string[]) { try { + if (!args.length) return this.client.commands.get('help').run(message, [this.name]); const code = randomBytes(5).toString('hex'); if (!this.client.util.isValidEmail(args[0])) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Invalid email address supplied.***`); this.client.util.transport.sendMail({