forked from Supositware/Haha-Yes
don't actually crash
This commit is contained in:
parent
8166a16a17
commit
4ab1eb3a2d
1 changed files with 18 additions and 10 deletions
|
@ -40,19 +40,27 @@ class fakebotCommand extends Command {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
return message.channel.send('Please run me again to send the message!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
let webhook = require(`../../webhook/${message.guild.id}.json`);
|
let webhook = require(`../../webhook/${message.guild.id}.json`);
|
||||||
this.client.fetchWebhook(webhook.id, webhook.token)
|
this.client.fetchWebhook(webhook.id, webhook.token)
|
||||||
.then(webhook => {
|
.then(webhook => {
|
||||||
webhook.edit({
|
webhook.edit({
|
||||||
name: args.member.username,
|
name: args.member.username,
|
||||||
avatar: args.member.displayAvatarURL()
|
avatar: args.member.displayAvatarURL()
|
||||||
|
});
|
||||||
|
|
||||||
|
webhook.edit({
|
||||||
|
name: args.member.username,
|
||||||
|
avatar: args.member.displayAvatarURL()
|
||||||
|
});
|
||||||
|
|
||||||
|
message.delete();
|
||||||
|
return webhook.send(args.message);
|
||||||
});
|
});
|
||||||
message.delete();
|
}
|
||||||
return webhook.send(args.message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module.exports = fakebotCommand;
|
module.exports = fakebotCommand;
|
Loading…
Reference in a new issue