add the user who triggered the command in the reason
This commit is contained in:
parent
aa25808e10
commit
aeab4e1a11
1 changed files with 6 additions and 2 deletions
|
@ -33,12 +33,16 @@ class fakebotCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
message.channel.createWebhook(args.member.username, args.member.displayAvatarURL())
|
message.channel.createWebhook(args.member.username, {
|
||||||
|
avatar: args.member.displayAvatarURL(),
|
||||||
|
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: args.member.username,
|
||||||
avatar: args.member.displayAvatarURL()
|
avatar: args.member.displayAvatarURL(),
|
||||||
|
reason: `Fakebot/user command triggered by: ${message.author.username}`
|
||||||
});
|
});
|
||||||
this.client.fetchWebhook(webhook.id, webhook.token)
|
this.client.fetchWebhook(webhook.id, webhook.token)
|
||||||
.then(webhook => {
|
.then(webhook => {
|
||||||
|
|
Loading…
Reference in a new issue