Haha-Yes/commands/utility/invite.js

25 lines
1,001 B
JavaScript
Raw Permalink Normal View History

2018-09-07 19:07:10 +02:00
const { Command } = require('discord.js-commando');
2018-12-25 19:17:07 +01:00
const { supportServer } = require('../../config.json');
2018-11-28 01:35:26 +01:00
const SelfReloadJSON = require('self-reload-json');
2018-12-25 19:17:07 +01:00
const blacklist = require('../../json/blacklist.json');
2018-12-05 00:52:21 +01:00
2018-09-07 19:07:10 +02:00
module.exports = class InviteCommand extends Command {
constructor(client) {
super(client, {
name: 'invite',
2018-09-17 17:02:39 +02:00
group: 'utility',
2018-09-07 19:07:10 +02:00
memberName: 'invite',
description: 'Send invite to add the bot',
});
}
2018-09-09 21:32:08 +02:00
async run(message) {
2018-12-06 23:01:40 +01:00
let blacklistJson = new SelfReloadJSON('./json/blacklist.json');
2018-11-28 01:35:26 +01:00
if(blacklistJson[message.author.id])
return blacklist(blacklistJson[message.author.id] , message)
message.say('Check your dm')
return message.author.send(`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 :)`);
2018-09-07 19:07:10 +02:00
}
};