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' ) ;
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 )
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
}
} ;