2018-12-30 01:20:24 +01:00
const { Command } = require ( 'discord-akairo' ) ;
2018-12-25 19:17:07 +01:00
const { supportServer } = require ( '../../config.json' ) ;
2018-12-30 01:20:24 +01:00
class InviteCommand extends Command {
2019-01-02 08:09:45 +01:00
constructor ( ) {
super ( 'invite' , {
aliases : [ 'invite' ] ,
category : 'utility' ,
2019-01-21 22:13:02 +01:00
args : [
{
id : 'here' ,
2019-06-23 03:41:59 +02:00
match : 'flag' ,
flag : '--here'
2019-01-21 22:13:02 +01:00
}
] ,
2019-01-02 08:09:45 +01:00
description : {
2018-12-30 01:20:24 +01:00
content : 'Send invite link for the bot and support server' ,
usage : '' ,
examples : [ '' ]
}
2019-01-02 08:09:45 +01:00
} ) ;
}
2018-09-07 19:07:10 +02:00
2019-01-21 22:13:02 +01:00
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 \n You can also join my support server over here: ${ supportServer } come and say hi :) ` ;
2019-06-23 03:41:59 +02:00
if ( args . here ) {
2019-01-21 22:13:02 +01:00
message . channel . send ( invMessage ) ;
} else {
message . channel . send ( 'Check your dm' ) ;
return message . author . send ( invMessage ) ;
}
2019-01-02 08:09:45 +01:00
}
2018-12-30 01:20:24 +01:00
}
module . exports = InviteCommand ;