From fd630640223ef8b9ba47ffd632a683f57a8d8baf Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 12 Sep 2019 21:13:39 +0200 Subject: [PATCH] better message --- commands/utility/invite.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/commands/utility/invite.js b/commands/utility/invite.js index 8b6b3cc..5183e91 100644 --- a/commands/utility/invite.js +++ b/commands/utility/invite.js @@ -26,23 +26,20 @@ class InviteCommand extends Command { } async exec(message, args) { - let botid; if (args.member) { if (args.member.bot) { - botid = args.member.id; + return message.channel.send(`You can add the bot you mentioned with this link: https://discordapp.com/oauth2/authorize?client_id=${args.member.id}&scope=bot&permissions=0`); } else { return message.channel.send('Sorry, the user you mentioned is not a bot!'); } } 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 { - message.channel.send('Check your dm'); - return message.author.send(invMessage); + 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 :)`; + if (args.here) { + message.channel.send(invMessage); + } else { + message.channel.send('Check your dm'); + return message.author.send(invMessage); + } } } }