@ -2,21 +2,21 @@ const Discord = require('discord.js');
const UserData = require ( '../../models/user' ) ;
const UserData = require ( '../../models/user' ) ;
module . exports = {
module . exports = {
name : "support" ,
name : "supportstaff " ,
help : new Discord . MessageEmbed ( )
help : new Discord . MessageEmbed ( )
. setTitle ( "Help -> Support" )
. setTitle ( "Help -> Support" )
. setDescription ( "Make a user a Natsuki Support Team member" )
. setDescription ( "Make a user a Natsuki Support Team member" )
. addField ( "Syntax" , "`support <add|remove|check> <@user|userID>`" )
. addField ( "Syntax" , "`supportstaff <add|remove|check> <@user|userID>`" )
. addField ( "Notice" , "This command is only available to Natsuki admin." ) ,
. addField ( "Notice" , "This command is only available to Natsuki admin." ) ,
meta : {
meta : {
category : 'Developer' ,
category : 'Developer' ,
description : "Add or remove users as Natsuki support" ,
description : "Add or remove users as Natsuki support" ,
syntax : '`support <add|remove|check> <@user|userID>`' ,
syntax : '`supportstaff <add|remove|check> <@user|userID>`' ,
extra : "You can check if a user is a support member without being a developer."
extra : "You can check if a user is a support member without being a developer."
} ,
} ,
async execute ( message , msg , args , cmd , prefix , mention , client ) {
async execute ( message , msg , args , cmd , prefix , mention , client ) {
if ( ! message . guild ) { return message . reply ( "This is a guild-only command." ) ; }
if ( ! message . guild ) { return message . reply ( "This is a guild-only command." ) ; }
if ( ! args . length ) { return message . channel . send ( ` Syntax: \` ${ prefix } \` ` ) ; }
if ( ! args . length ) { return message . channel . send ( ` Syntax: \` ${ prefix } supportstaff <add|remove|check> <@user|userID> \` ` ) ; }
let person = mention ? mention : args [ 1 ] ? client . users . cache . has ( args [ 1 ] ) ? client . users . cache . get ( args [ 1 ] ) : null : null ;
let person = mention ? mention : args [ 1 ] ? client . users . cache . has ( args [ 1 ] ) ? client . users . cache . get ( args [ 1 ] ) : null : null ;
let tu = await UserData . findOne ( { uid : person ? person . id : message . author . id } ) ? await UserData . findOne ( { uid : person ? person . id : message . author . id } ) : new UserData ( { uid : person ? person . id : message . author . id } ) ;
let tu = await UserData . findOne ( { uid : person ? person . id : message . author . id } ) ? await UserData . findOne ( { uid : person ? person . id : message . author . id } ) : new UserData ( { uid : person ? person . id : message . author . id } ) ;
if ( [ 'c' , 'check' ] . includes ( args [ 0 ] ) ) { return message . reply ( ` ${ person ? person : message . member . displayName } ${ tu . support ? 'is' : 'is not' } a part of Natsuki Support. ` ) ; }
if ( [ 'c' , 'check' ] . includes ( args [ 0 ] ) ) { return message . reply ( ` ${ person ? person : message . member . displayName } ${ tu . support ? 'is' : 'is not' } a part of Natsuki Support. ` ) ; }