6.0-Dev Edition
This commit is contained in:
1 parent
ca7294a0e3
commit
eaa9da6d2e
35 files changed
+854
-1185
No files matched your search
+39
-42
@@ -1,52 +1,49 @@
|
||||
// SupportBot
|
||||
// Created by © 2020 Emerald Services
|
||||
// Command: Help
|
||||
// SupportBot 6.0, Created by Emerald Services
|
||||
// Help Command
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const bot = new Discord.Client()
|
||||
const fs = require("fs");
|
||||
|
||||
const fs = require("fs")
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
exports.run = (bot, message, args) => {
|
||||
module.exports = {
|
||||
name: supportbot.HelpCommand,
|
||||
|
||||
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Help_Command}`);
|
||||
execute(message, args) {
|
||||
let generalCommands = "";
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** Lists all the bot commands\n`;
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** Get some important links\n`;
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** Create a new suggestion\n`;
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** Check bot's latency\n`;
|
||||
|
||||
let supportCommands = "";
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** Create a support ticket\n`
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** Close your support ticket\n`
|
||||
|
||||
let staffCommands = "";
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.RenameTicket} <name>** Rename a valid support ticket\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** Add a user to a valid support ticket\n`
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** Remove a user from a valid support ticket\n`
|
||||
|
||||
let adminCommands = "";
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** Create a new server announcement\n`
|
||||
adminCommands += `**${supportbot.Prefix}${supportbot.SayCommand}** Send a message as the bot\n`
|
||||
|
||||
const HelpCommandEmbed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Bot_Name)
|
||||
.setThumbnail(message.author.displayAvatarURL())
|
||||
|
||||
let userCommands = "";
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Ticket_Command} <reason>**: Create a support ticket\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Close_Command}**: Close your support ticket\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Report_Command} <user> <reason>**: Report a valid user\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Link_Command}**: Get some important links!\n`;
|
||||
userCommands += `**${supportbot.Prefix}${supportbot.Ping_Command}**: Check the bots ping. Pong!\n`;
|
||||
|
||||
let supportCommands = "";
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Add_Command} <user>**: Adds a user to a ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Forceclose_Command}**: Forceclose a support ticket\n`;
|
||||
supportCommands += `**${supportbot.Prefix}${supportbot.Rename_Command}**: Rename a support ticket\n`;
|
||||
.addFields(
|
||||
{ name: '🖥️ General Commands', value: `${generalCommands}\n`, inline: false },
|
||||
{ name: '🎫 Support Commands', value: `${supportCommands}\n`, inline: false },
|
||||
{ name: '🔑 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
||||
{ name: '🔐 Admin Commands', value: `${adminCommands}`, inline: false },
|
||||
)
|
||||
|
||||
let staffCommands = "";
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Announcement_Command} <message>**: Create a bot announcement\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Say_Command} <message>**: Send a message as the bot\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Lockchat_Command}**: Lock the chat channel\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.UnLockchat_Command}**: UnLock the chat channel\n`;
|
||||
staffCommands += `**${supportbot.Prefix}${supportbot.Poll_Command}**: Create a poll\n`;
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Bot_Name)
|
||||
.addField("🟨 User Commands", userCommands)
|
||||
.addField("🎫 Support Commands", supportCommands)
|
||||
.addField("🔐 Staff Commands", staffCommands)
|
||||
.setColor(supportbot.EmbedColour)
|
||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL);
|
||||
|
||||
message.channel.send(embed);
|
||||
|
||||
}
|
||||
|
||||
exports.help = {
|
||||
name: supportbot.Help_Command,
|
||||
};
|
||||
message.channel.send({ embed: HelpCommandEmbed });
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user