fix issue with emailcode
parent
50a9d05f97
commit
961f0e6c74
|
@ -16,6 +16,7 @@ export default class EmailCode extends Command {
|
||||||
|
|
||||||
public async run(message: Message, args: string[]) {
|
public async run(message: Message, args: string[]) {
|
||||||
try {
|
try {
|
||||||
|
if (!args.length) return this.client.commands.get('help').run(message, [this.name]);
|
||||||
const code = randomBytes(5).toString('hex');
|
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.***`);
|
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({
|
this.client.util.transport.sendMail({
|
||||||
|
|
Loading…
Reference in New Issue