2018-09-07 19:07:10 +02:00
const { Command } = require ( 'discord.js-commando' ) ;
2018-09-22 19:52:10 +02:00
const { supportServer } = require ( '../../config.json' )
2018-11-28 01:35:26 +01:00
const SelfReloadJSON = require ( 'self-reload-json' ) ;
const blacklist = require ( '../../blacklist' ) ;
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-11-28 01:35:26 +01:00
let blacklistJson = new SelfReloadJSON ( 'json/blacklist.json' ) ;
if ( blacklistJson [ message . author . id ] )
return blacklist ( blacklistJson [ message . author . id ] , message )
2018-10-19 23:46:52 +02:00
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 \n You can also join my support server over here: ${ supportServer } come and say hi :) ` ) ;
2018-09-07 19:07:10 +02:00
}
} ;