2019-06-09 23:52:41 +01:00
// SupportBot
// Command: Help
const Discord = require ( "discord.js" );
const bot = new Discord . Client ()
bot . settings = require ( "../settings.json" );
exports . run = ( bot , message , args ) => {
message . delete ();
let userCommands = "" ;
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Link_Command } **: Get some important links!\n` ;
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Ping_Command } **: Check the bots ping. Pong!\n` ;
2019-09-28 17:30:57 +01:00
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Ticket_Command } <reason>**: Create a support ticket\n` ;
2019-06-09 23:52:41 +01:00
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Close_Command } **: Close your support ticket\n` ;
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Suggest_Command } <suggestion>**: Create a server suggestion\n` ;
2020-01-05 21:37:08 +00:00
userCommands += `** ${ bot . settings . prefix }${ bot . settings . Report_Command } <user> <reason>**: Report a valid user\n` ;
2019-06-09 23:52:41 +01:00
let supportCommands = "" ;
2019-09-28 17:30:57 +01:00
supportCommands += `** ${ bot . settings . prefix }${ bot . settings . Add_Command } <user>**: Adds a user to a ticket\n` ;
2019-06-09 23:52:41 +01:00
supportCommands += `** ${ bot . settings . prefix }${ bot . settings . Remove_Command } <user>**: Removes a user from a ticket\n` ;
supportCommands += `** ${ bot . settings . prefix }${ bot . settings . Forceclose_Command } **: Forceclose a support ticket\n` ;
2019-09-28 17:30:57 +01:00
supportCommands += `** ${ bot . settings . prefix }${ bot . settings . Rename_Command } **: Rename a support ticket\n` ;
2019-06-09 23:52:41 +01:00
let staffCommands = "" ;
2019-07-25 00:25:40 +01:00
staffCommands += `** ${ bot . settings . prefix }${ bot . settings . Announcement_Command } <message>**: Create a bot announcement\n` ;
2019-07-25 00:25:23 +01:00
staffCommands += `** ${ bot . settings . prefix }${ bot . settings . Say_Command } <message>**: Send a message as the bot\n` ;
2019-06-09 23:52:41 +01:00
staffCommands += `** ${ bot . settings . prefix }${ bot . settings . Lockchat_Command } **: Lock the chat channel\n` ;
staffCommands += `** ${ bot . settings . prefix }${ bot . settings . UnLockchat_Command } **: UnLock the chat channel\n` ;
2019-09-28 17:30:57 +01:00
staffCommands += `** ${ bot . settings . prefix }${ bot . settings . Poll_Command } **: Create a poll\n` ;
2019-06-09 23:52:41 +01:00
const embed = new Discord . RichEmbed ()
. setTitle ( bot . settings . botname )
. addField ( ":ticket: Support Commands" , userCommands )
. addField ( ":pushpin: Support Commands" , supportCommands , true )
. addField ( ":pushpin: Staff Commands" , staffCommands , true )
. setColor ( bot . settings . colour )
. setFooter ( bot . settings . footer , message . author . displayAvatarURL );
message . channel . send ( embed )
console . log ( `\x1b[36m` , ` ${ message . author } has executed ${ bot . settings . prefix }${ bot . settings . Help_Command } ` )
2019-07-24 16:52:30 -06:00
const CMDLog = new Discord . RichEmbed ()
. setTitle ( bot . settings . Commands_Log_Title )
. addField ( `User` , `<@ ${ message . author . id } >` )
. addField ( `Command` , bot . settings . Help_Command , true )
. addField ( `Channel` , message . channel , true )
. addField ( `Executed At` , message . createdAt , true )
. setColor ( bot . settings . colour )
. setFooter ( bot . settings . footer )
let CommandLog = message . guild . channels . find ( LogsChannel => LogsChannel . name === ` ${ bot . settings . Command_Log_Channel } ` );
if ( ! CommandLog ) return message . channel . send ( `:x: Error! Could not find the logs channel. ** ${ bot . settings . Command_Log_Channel } **\nThis can be changed via settings.json` );
CommandLog . send ( CMDLog );
2019-06-09 23:52:41 +01:00
}
exports . help = {
name : bot . settings . Help_Command ,
2019-07-25 00:25:23 +01:00
}