From 961f0e6c748abc9a76e6bdf5280e18fb41ec8cdb Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 1 May 2020 17:45:53 -0400 Subject: [PATCH] fix issue with emailcode --- src/commands/emailcode.ts | 1 + 1 file changed, 1 insertion(+) 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({