user member nickname

This commit is contained in:
loicbersier 2019-10-05 19:51:05 +02:00
parent 4f68f9c466
commit 4ad1032845

View file

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