From aeab4e1a11e622fc3ca5d4195338fb9dd7846baa Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 17 Aug 2019 11:40:36 +0200 Subject: [PATCH] add the user who triggered the command in the reason --- commands/fun/fakebot.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/commands/fun/fakebot.js b/commands/fun/fakebot.js index 1c654c72..1ebf6617 100644 --- a/commands/fun/fakebot.js +++ b/commands/fun/fakebot.js @@ -33,12 +33,16 @@ class fakebotCommand extends Command { } 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 => { // Have to edit after creation otherwise the picture doesn't get applied webhook.edit({ 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) .then(webhook => {