user member nickname
This commit is contained in:
parent
4f68f9c466
commit
4ad1032845
1 changed files with 4 additions and 2 deletions
|
@ -33,14 +33,16 @@ class fakebotCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
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(),
|
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: args.member.username,
|
name: 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}`
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue