SupportBot 6.0 BETA 1
This commit is contained in:
1 parent
cc5a6b7317
commit
4f05ad6546
9 files changed
+43
-48
No files matched your search
@@ -0,0 +1,19 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Help Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
// location for the addons configuration, to keep it simple we generate a settings folder within the addons directory.
|
||||||
|
const example = yaml.load(fs.readFileSync('./addons/settings/exampleaddon.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: example.ExampleAddonCommand,
|
||||||
|
description: example.ExampleAddonDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
message.channel.send(example.ExampleAddonMessage)
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# SupportBot 6.0
|
||||||
|
# Example Addon
|
||||||
|
#
|
||||||
|
|
||||||
|
ExampleAddonCommand: "exampleaddon"
|
||||||
|
ExampleAddonDesc: "This is the default/example addon for SupportBot."
|
||||||
|
|
||||||
|
ExampleAddonMessage: "> :white_check_mark: This is the **default** addon for SupportBot. You can download addons from our website, https://emeraldservices.xyz/"
|
||||||
+2
-2
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
if (!message.member.roles.cache.has(SupportStaff.id || Admins.id)) {
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
@@ -61,4 +61,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
// SupportBot 6.0, Created by Emerald Services
|
|
||||||
// Links Command
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const fs = require("fs");
|
|
||||||
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
const { execute } = require("./help");
|
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
name: supportbot.LinksCommand,
|
|
||||||
description: supportbot.LinksDesc,
|
|
||||||
|
|
||||||
execute(message, args) {
|
|
||||||
|
|
||||||
const LinksEmbed = new Discord.MessageEmbed()
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
|
|
||||||
let botLinks = supportbot.HELP;
|
|
||||||
|
|
||||||
let links = '';
|
|
||||||
|
|
||||||
for ( let name in botLinks ) {
|
|
||||||
links += `[${name}](${botLinks[ name ]})\n`;
|
|
||||||
};
|
|
||||||
|
|
||||||
LinksEmbed.addField(supportbot.HelpTitle, links)
|
|
||||||
|
|
||||||
message.channel.send({ embed: LinksEmbed });
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
if (!message.member.roles.cache.has(SupportStaff.id || Admins.id)) {
|
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
|
||||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
@@ -59,4 +59,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -78,7 +78,7 @@ fs.readdir("./addons/", (err, files) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jsfiles.forEach((f, i) => {
|
jsfiles.forEach((f, i) => {
|
||||||
let props = require(`./commands/${f}`);
|
let props = require(`./addons/${f}`);
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
bot.commands.set(props.name, props);
|
bot.commands.set(props.name, props);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"ticket": "ticket-0062",
|
"ticket": "ticket-0064",
|
||||||
"id":419821884431925260
|
"id":207937608779694080
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"716992597377286145": {
|
"716992597377286145": {
|
||||||
"id": 63
|
"id": 65
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,15 +11,13 @@
|
|||||||
|
|
||||||
# General Bot Configuration
|
# General Bot Configuration
|
||||||
|
|
||||||
Token: "NjcyMTU5MjQyNjg5NzA4MDUz.XwnBpg.6eCCVRv4m-aVPJuppHWNxpxpRs0"
|
Token: "BOT_TOKEN_HERE"
|
||||||
Prefix: "!!"
|
Prefix: "-"
|
||||||
Bot_Name: "SupportBot DEV"
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
BotActivity: "SB-6.0 dev-0.1"
|
BotActivity: "!help ~ SupportBot 6.0"
|
||||||
ActivityType: "PLAYING"
|
ActivityType: "PLAYING"
|
||||||
|
# Activity status can either be PLAYING, WATCHING or LISTENING.
|
||||||
ShowErrorCodes: "true"
|
|
||||||
# This feature will show supportbot error codes such as "SB-01"
|
|
||||||
|
|
||||||
# Embed Configuration
|
# Embed Configuration
|
||||||
|
|
||||||
@@ -98,9 +96,11 @@ SystemMessage_Icon: "USER"
|
|||||||
|
|
||||||
Welcome_Title: "User Joined!"
|
Welcome_Title: "User Joined!"
|
||||||
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
|
# %member% define the user who joined and %guildnamne% defines the server name.
|
||||||
|
|
||||||
Leave_Title: "User Left!"
|
Leave_Title: "User Left!"
|
||||||
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
|
|
||||||
SystemMessage_EmbedFooter: "false"
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user