better message

This commit is contained in:
loicbersier 2019-09-12 21:13:39 +02:00
parent df0d295c08
commit fd63064022

View file

@ -26,23 +26,20 @@ class InviteCommand extends Command {
} }
async exec(message, args) { async exec(message, args) {
let botid;
if (args.member) { if (args.member) {
if (args.member.bot) { 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 { } else {
return message.channel.send('Sorry, the user you mentioned is not a bot!'); return message.channel.send('Sorry, the user you mentioned is not a bot!');
} }
} else { } else {
botid = this.client.user.id; 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);
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 :)`; } else {
if (args.here) { message.channel.send('Check your dm');
message.channel.send(invMessage); return message.author.send(invMessage);
} else { }
message.channel.send('Check your dm');
return message.author.send(invMessage);
} }
} }
} }