6.1 PRE-0.2

This commit is contained in:
ItzEmerald committed 2020-12-18 13:37:56 +00:00
1 parent b6ccf30ae4
commit f6d4383ff6
31 files changed
+145 -42

No files matched your search

Vendored
BIN
View File
Binary file not shown.
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
Regular → Executable
+13 -5
View File
@@ -1,7 +1,15 @@
# SupportBot
A self hosted discord support bot.
![SupportBot](https://i.imgur.com/OFO3XB2.png)
SupportBot the #1 self-hosted discord ticket system with any customizations and features to help make your support system look clean, tidy and professional. It's self-hosted! No need to use someone's public discord bot thats used in a handful of servers. Create, Configure & Use your own discord bot installed with SupportBot.
### SupportBot Compatibility
> Anything older than v6 we will no longer be supporting, However our terms & conditions still remain valid for all copies of our product "SupportBot".
|---------|---------|
| Version | |
|---------|---------|
| 6.0. | ✅ |
|---------|---------|
SupportBot is a free discord application that can be easily customised to your own brand.
Yes you heard me. This documentation will explain you how to setup & install SupportBot.[
[**Documentation**](https://docs.emeraldsrv.dev/)
BIN
View File
Binary file not shown.
Regular → Executable
View File
File mode changed.
BIN
View File
Binary file not shown.
Regular → Executable
View File
File mode changed.
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Add User
const Discord = require("discord.js");
Regular → Executable
+2 -2
View File
@@ -1,5 +1,5 @@
// SupportBot Created by Emerald Services
// Announce User
// SupportBot, Created by Emerald Services
// Announce
const Discord = require("discord.js");
const fs = require("fs");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Close Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Help Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Links Command
const Discord = require("discord.js");
Regular → Executable
+2 -2
View File
@@ -1,5 +1,5 @@
// SupportBot Created by Emerald Services
// Create Ticket
// SupportBot, Created by Emerald Services
// Ticket Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Ping Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot 6.0, Created by Emerald Services
// SupportBot, Created by Emerald Services
// Remove User
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot, Created by Emerald Services
// Suggest Command
const Discord = require("discord.js");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
Regular → Executable
+2 -2
View File
@@ -1,5 +1,5 @@
// SupportBot Created by Emerald Services
// Member Remove Event
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
Regular → Executable
+1 -1
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot 6.0, Created by Emerald Services
// Message Event
const Discord = require("discord.js");
+49
View File
@@ -0,0 +1,49 @@
// SupportBot 6.0, Created by Emerald Services
// Message Reaction Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
const reacted = [];
module.exports = async (bot, message) => {
// Ticket Creation Panel
// This is an embed message where users are able to react and a ticket is created in return.
bot.on('messageReactionAdd', async (reaction, user) => {
if (supportbot.ReactionTickets === "true") {
if (reaction.message.id === tickets.ReactionMessage_ID) {
let user = await reaction.message.guild.members.fetch(user);
switch (reaction.emoji.id) {
case supportbot.ReactionEmoji: {
reaction.message.guild.members.fetch(user).then(r => {
reaction.users.remove(r.id)
});
const cmd = bot.commands.get(supportbot.NewTicket);
if(!cmd) return;
console.log("1")
cmd.execute(bot, message, args);
}
}
}
}
})
};
Regular → Executable
+33 -2
View File
@@ -1,4 +1,4 @@
// SupportBot Created by Emerald Services
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
@@ -6,6 +6,7 @@ const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
module.exports = async (bot) => {
@@ -16,4 +17,34 @@ module.exports = async (bot) => {
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`)
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
};
if (supportbot.ReactionTickets === "true") {
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
if (!chan1) {
console.log('\u001b[33m', "[WARN] Ticket reaction panel is not setup, You can do so via the configuration file!")
return false;
}
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(r => {
let embed = new Discord.MessageEmbed()
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
.setColor(supportbot.SuccessColour)
.setFooter(supportbot.EmbedFooter);
bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel).send({
embed: embed
}).then(r => {
let data = {
"ReactionMessage_ID": `${r.id}`
}
let yamlStr = yaml.dump(data);
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
r.react(supportbot.ReactionEmoji)
}).catch(e => {
console.log(e)
})
})
}
};
Regular → Executable
+1 -1
View File
@@ -87,4 +87,4 @@ fs.readdir("./addons/", (err, files) => {
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
});
bot.login(supportbot.Token);
bot.login(supportbot.Token);
Generated Regular → Executable
+13 -13
View File
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@discordjs/collection": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.5.tgz",
"integrity": "sha512-CU1q0UXQUpFNzNB7gufgoisDHP7n+T3tkqTsp3MNUkVJ5+hS3BCvME8uCXAUFlz+6T2FbTCu75A+yQ7HMKqRKw=="
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
"integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
},
"@discordjs/form-data": {
"version": "3.0.1",
@@ -54,18 +54,18 @@
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"discord.js": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.2.0.tgz",
"integrity": "sha512-Ueb/0SOsxXyqwvwFYFe0msMrGqH1OMqpp2Dpbplnlr4MzcRrFWwsBM9gKNZXPVBHWUKiQkwU8AihXBXIvTTSvg==",
"version": "12.5.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz",
"integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==",
"requires": {
"@discordjs/collection": "^0.1.5",
"@discordjs/collection": "^0.1.6",
"@discordjs/form-data": "^3.0.1",
"abort-controller": "^3.0.0",
"node-fetch": "^2.6.0",
"prism-media": "^1.2.0",
"node-fetch": "^2.6.1",
"prism-media": "^1.2.2",
"setimmediate": "^1.0.5",
"tweetnacl": "^1.0.3",
"ws": "^7.2.1"
"ws": "^7.3.1"
}
},
"esprima": {
@@ -126,9 +126,9 @@
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
},
"ws": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz",
"integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ=="
}
}
}
Regular → Executable
+1 -1
View File
@@ -4,7 +4,7 @@
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
"main": "index.js",
"dependencies": {
"discord.js": "^12.2.0",
"discord.js": "^12.5.1",
"js-yaml": "^3.14.0"
},
"devDependencies": {
Regular → Executable
View File
File mode changed.
Regular → Executable
View File
File mode changed.
+1
View File
@@ -0,0 +1 @@
ReactionMessage_ID: '789248228406198313'
Regular → Executable
+18 -4
View File
@@ -11,7 +11,7 @@
# General Bot Configuration
Token: "BOT_TOKEN_HERE"
Token: "BOT TOKEN"
Prefix: "-"
Bot_Name: "SupportBot"
@@ -37,8 +37,8 @@ AutoRole: "true"
AutoRole_Role: "Member"
LockdownRole: "@everyone"
Staff: "Support"
Admin: "Admin"
Staff: "Staff"
Admin: "Administration Team"
# Ticket Configuration
@@ -47,7 +47,12 @@ TicketCategory: "Tickets"
TicketLog: "ticket-logs"
TranscriptLog: "transcripts"
TicketSubject: "description"
# TicketSuvject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
# TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
ReactionTickets: "true"
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
ReactionChannel: "open-a-ticket"
ReactionEmoji: "📩"
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
Ticket_Title: "Server Support | %ticketusername%"
@@ -124,6 +129,15 @@ SuggestionStarter: "What would you like to suggest?"
SuggestReact_1: 👍
SuggestReact_2: 👎
# Poll Configuration
PollChannel: "polls"
PollTitle: "Suggestion"
PollStarter: "What would you like to create a poll about?"
PollReact_1: 👍
PollReact_2: 👎
# Announcement Configuration
AnnouncementChannel: "announcements"
Regular → Executable
View File
File mode changed.