From 363fc03b841f2bfac1469fe25d6e7f693e2190ad Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 12 Sep 2019 21:09:48 +0200 Subject: [PATCH] let the bot make invite for other bot too --- commands/utility/invite.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/commands/utility/invite.js b/commands/utility/invite.js index 83200dbc..4eec0c69 100644 --- a/commands/utility/invite.js +++ b/commands/utility/invite.js @@ -7,6 +7,10 @@ class InviteCommand extends Command { aliases: ['invite'], category: 'utility', args: [ + { + id: 'member', + type: 'user' + }, { id: 'here', match: 'flag', @@ -22,7 +26,14 @@ class InviteCommand extends Command { } async exec(message, args) { - let invMessage = `You can add me from here: https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=0\nYou can also join my support server over here: ${supportServer} come and say hi :)`; + let botid; + if (args.member.bot) { + botid = args.member.id; + } else { + botid = this.client.user.id; + } + + let invMessage = `You can add me from here: https://discordapp.com/oauth2/authorize?client_id=${botid}&scope=bot&permissions=0\nYou can also join my support server over here: ${supportServer} come and say hi :)`; if (args.here) { message.channel.send(invMessage); } else {