let the bot make invite for other bot too

This commit is contained in:
loicbersier 2019-09-12 21:09:48 +02:00
parent f4b5356946
commit 363fc03b84

View file

@ -7,6 +7,10 @@ class InviteCommand extends Command {
aliases: ['invite'], aliases: ['invite'],
category: 'utility', category: 'utility',
args: [ args: [
{
id: 'member',
type: 'user'
},
{ {
id: 'here', id: 'here',
match: 'flag', match: 'flag',
@ -22,7 +26,14 @@ class InviteCommand extends Command {
} }
async exec(message, args) { 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) { if (args.here) {
message.channel.send(invMessage); message.channel.send(invMessage);
} else { } else {