Fix fakebot

This commit is contained in:
loicbersier 2019-10-17 01:13:39 +02:00
parent c62fcb68ab
commit 7cd741b315

View file

@ -34,15 +34,14 @@ class fakebotCommand extends Command {
async exec(message, args) { async exec(message, args) {
console.log(args.member); message.channel.createWebhook(args.member.username, {
message.channel.createWebhook(message.guild.members.get(args.member.id).nickname, {
avatar: args.member.displayAvatarURL(), avatar: args.member.displayAvatarURL(),
reason: `Fakebot/user command triggered by: ${message.author.username}` reason: `Fakebot/user command triggered by: ${message.author.username}`
}) })
.then(webhook => { .then(webhook => {
// Have to edit after creation otherwise the picture doesn't get applied // Have to edit after creation otherwise the picture doesn't get applied
webhook.edit({ webhook.edit({
name: message.guild.members.get(args.member.id).nickname, name: args.member.username,
avatar: args.member.displayAvatarURL(), avatar: args.member.displayAvatarURL(),
reason: `Fakebot/user command triggered by: ${message.author.username}` reason: `Fakebot/user command triggered by: ${message.author.username}`
}); });