Compare commits

...
80 Commits
Author SHA1 Message Date
1tzEmerald 96a50743ac Update supportbot.yml 2022-08-20 23:02:47 +01:00
1tzEmerald 5cd759eb86 Update README.md 2022-08-03 12:00:48 +01:00
1tzEmerald fd263d1f8e Update README.md 2022-07-26 11:37:27 +01:00
Xiled Emerald df5c35642d Update README.md 2022-07-01 22:21:18 +01:00
Xiled Emerald c9d2e471b7 Update README.md 2022-07-01 21:15:22 +01:00
Xiled Emerald d1bd624723 Update README.md 2022-07-01 21:14:46 +01:00
Xiled Emerald 1f2bd9c279 Update README.md 2022-07-01 21:14:30 +01:00
Xiled Emerald ab14b17cc9 Delete .DS_Store 2022-07-01 20:59:25 +01:00
Xiled Emerald e1244f779f Delete .DS_Store 2022-07-01 20:59:18 +01:00
Xiled Emerald d474f04122 Update README.md 2022-07-01 20:56:42 +01:00
Xiled Emerald 24c4cb0dd1 Update README.md 2022-07-01 20:56:25 +01:00
Xiled Emerald d7d765d4b9 Update README.md 2022-07-01 20:54:41 +01:00
Xiled Emerald bc82bf6c55 Delete .DS_Store 2022-06-30 15:50:13 +01:00
Xiled Emerald 213f84f509 Delete package-lock.json 2022-06-30 15:49:58 +01:00
Xiled Emerald 25c6c95ec5 Update README.md 2022-06-30 15:27:23 +01:00
Xiled Emerald 9118bff570 Update README.md 2022-06-30 15:26:24 +01:00
Xiled Emerald 3f3670b4f3 Update README.md 2022-06-30 15:19:21 +01:00
Xiled Emerald d448662072 Update README.md 2022-06-30 15:17:48 +01:00
Xiled Emerald 84fa2c3078 Update README.md 2022-06-30 15:17:37 +01:00
Xiled Emerald da88fe64ba Update README.md 2022-06-30 15:16:57 +01:00
Xiled Emerald d74cd36880 Update README.md 2022-06-30 15:13:26 +01:00
Xiled Emerald b8d1361796 Update README.md 2022-06-30 15:11:39 +01:00
Xiled Emerald b205132d1a Update README.md 2022-06-30 15:10:02 +01:00
Xiled Emerald 77812967de Update README.md 2022-06-29 00:50:43 +01:00
Xiled Emerald 6103fc9f04 Update README.md 2022-06-29 00:41:00 +01:00
ItzEmerald 44fbe9f2d6 FINAL 7.7 2022-06-28 03:15:52 +01:00
ItzEmerald 29db6c7d67 7.7 FINAL BETA 2022-06-28 03:14:54 +01:00
ItzEmerald 69f0b00ed3 7.7 2022-06-23 00:05:08 +01:00
ItzEmerald c1a1839457 7.7 BETA 3 2022-06-22 23:30:59 +01:00
Xiled Emerald dd4b53800e Merge pull request #124 from Emerald-Services/add-license-1
Create LICENSE.md
2022-06-22 23:05:38 +01:00
Xiled Emerald 1fc94528fc Merge pull request #123 from SypherRed/release
embed fix and updates
2022-06-22 23:05:25 +01:00
SypherRed bb1a817980 fix previous push of embed
fixed the if-statement of embed
2022-06-22 20:59:45 +02:00
SypherRed 53305acbc7 Fixed embed command
Added a check if the field options are used, if not leave it ignored and don't add some.

This was fixed due to ticket-0038.
2022-06-22 18:21:25 +02:00
Xiled Emerald d0f1bae0bd Create LICENSE.md 2022-06-22 02:24:19 +01:00
SypherRed c0cf3b1bb7 Update several files
* added to .gitignore ".DS_Store"

* changed commented head in "suggest.js" and "translate.js"

* Removed "AboutMe" due it to being unfunctional and can be set in the Developer Portal

* Removed the icon in "ticket-panel.yml"

* Updated dependencies and changed version to match current
2022-06-21 09:54:22 +02:00
Xiled Emerald ce67b668d5 Update Client.js 2022-06-21 01:42:59 +01:00
Xiled Emerald 3273cfd0e1 Update help.js 2022-06-21 01:41:53 +01:00
Xiled Emerald fd992a6514 Update supportbot.yml 2022-06-21 01:41:17 +01:00
Xiled Emerald 550d681fe1 Merge pull request #122 from RandomTomato/release
Added 3 new settings in supportbot.yml for more customization
2022-06-21 01:39:35 +01:00
ItzEmerald 7d29226953 BETA 2 - V7.7 2022-06-21 01:38:22 +01:00
BuildTools 38da72ca91 Added 3 new settings in supportbot.yml for more customization 2022-06-18 11:19:12 +09:30
Xiled Emerald eab11361cb Update ticket-panel-id.json 2022-06-16 22:30:13 +01:00
Xiled Emerald b281bba36f Merge pull request #120 from Emerald-Services/beta
7.6 Release
2022-06-16 22:26:50 +01:00
ItzEmerald 5e38573aed 7.6 2022-06-16 22:12:14 +01:00
ItzEmerald da7b6d487c 7.6-Pre1
Whats New?
  - Ability to add as many departments as you need (Don't go to crazy 😂 )
  - Merged Sypher's Translate & UserInfo Addon into Features

------------

  - Add a role automatically when a user joins the server
  - Announce a welcome message with full cusomtization
  - Announce a leave message with full cusomtization
  - Added "ephermal" to majority messages.

Install modules use - npm install
2022-06-16 02:31:58 +01:00
Xiled Emerald 6bf4e5f4bb Update README.md 2022-06-14 23:02:12 +01:00
Xiled Emerald 213f532a3c Merge pull request #114 from Emerald-Services/dev
7.5 push
2022-02-27 04:37:24 +00:00
ItzEmerald 45bd88e4d2 7.5 commit 2022-02-27 04:30:15 +00:00
Xiled Emerald 4eb8658459 Update supportbot.yml 2022-02-27 00:39:36 +00:00
Noah b37118fee2 Fix addon handler 2022-02-25 21:57:54 -06:00
Noah 026caba68a Fix setFooters 2022-02-25 21:55:33 -06:00
Noah 2003f8801a Fixed ticket perms 2022-02-25 21:51:22 -06:00
Noah 473bacf13a Removed Guild 2022-02-17 19:57:37 -06:00
Noah 8b3f2bc61a Fix missing user or subuser 2022-02-17 19:57:11 -06:00
Noah 3aa373c33c fix bad code 2022-02-11 23:47:06 -06:00
Noah 9b6263e583 Fix DM help menu 2022-02-11 23:41:02 -06:00
Noah 3e066d08ce New Departments 2022-02-11 23:34:38 -06:00
Noah aa48e28162 Fix Typos 2022-02-04 20:00:31 -06:00
Noah dc660ed94a Bug Fixes 2022-02-04 17:56:11 -06:00
Noah e02ecf9553 Bug fixes 2022-02-04 17:55:02 -06:00
Noah 23acc0926f Fix BitField Error 2022-02-04 17:49:02 -06:00
Xiled Emerald 3fc1cd18d5 Merge pull request #109 from Emerald-Services/dev
7.4.2 Pull Request
2022-02-03 17:26:54 +00:00
Noah ebe29b403e Prettier 2022-01-30 00:07:04 -06:00
Noah dcba3312dd Misc 2022-01-29 23:57:10 -06:00
Noah 7fddeeec37 Change Max to 100 2022-01-10 17:48:31 -06:00
Noah b5341b023f Fix embed command 2021-12-29 10:20:29 -06:00
Noah bbb7443ef2 Fix suggest command 2021-12-28 19:06:35 -06:00
Noah 22df347bb9 Merge pull request #108 from astranger1k/dev
Updated Documentation URLs + Added invite URL to log upon launch.
2021-12-23 09:18:47 -06:00
Kieran Davies 9aed6b8f35 Updated Documentation URLs + Added invite URL to log upon launch. 2021-12-23 11:48:51 +00:00
Noah 9e7ec9f1bd 7.4.2 2021-12-19 13:06:32 -06:00
Noah 373f43eac5 Channel can now be id or name 2021-12-19 13:03:33 -06:00
Noah 6c91b2791a Fix users can't send messages 2021-12-19 13:02:43 -06:00
Noah bde62a431f Merge branch 'dev' into release 2021-12-18 22:59:41 -06:00
Noah 615a074540 move filter 2021-12-18 22:59:05 -06:00
Noah 09b335ac46 Update ticket.js 2021-12-18 22:42:51 -06:00
Noah 2701880c77 Merge pull request #106 from Emerald-Services/dev
v7.4.1 Release
2021-12-18 22:37:29 -06:00
Noah 24c8f2fb38 v7.4.1 2021-12-18 22:28:08 -06:00
Noah c3ec158ac3 Fix id 2021-12-18 22:23:18 -06:00
Noah b3690222d0 Fixed id 2021-12-18 22:18:05 -06:00
Noah 4d7583785b Fixed ticket id 2021-12-18 22:14:11 -06:00
32 changed files with 898 additions and 1004 deletions

No files matched your search

-40
View File
@@ -1,40 +0,0 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: "[BUG]"
labels: Bug
assignees: ""
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
@@ -1,19 +0,0 @@
---
name: "❓Suggest an Idea?"
about: Suggest an idea for SupportBot?
title: "[SUGGESTION]"
labels: Suggestion
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
-28
View File
@@ -1,28 +0,0 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [dev, release]
pull_request:
branches: [dev, release]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 17.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
+2 -1
View File
@@ -1 +1,2 @@
node_modules/
node_modules/
.DS_Store
+7 -7
View File
@@ -26,7 +26,7 @@ module.exports = new Command({
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
if (!SupportStaff || !Admin)
@@ -45,20 +45,20 @@ module.exports = new Command({
!interaction.member.roles.cache.has(SupportStaff.id) &&
!interaction.member.roles.cache.has(Admin.id)
)
return interaction.reply({ embeds: [NoPerms] });
return interaction.reply({ ephemeral: true, embeds: [NoPerms] });
let TicketData = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
);
let ticket = await TicketData.tickets.findIndex(
(t) => t.id == interaction.channel.id
(t) => t.id === interaction.channel.id
);
if (ticket == -1) {
if (ticket === -1) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setDescription(supportbot.NoValidTicket)
.setColor(supportbot.WarningColour);
return interaction.reply({ embeds: [Exists] });
return interaction.reply({ ephemeral: true, embeds: [Exists] });
}
let uMember = interaction.options.getUser("user");
@@ -71,7 +71,7 @@ module.exports = new Command({
if (!uMember) return interaction.reply({ embeds: [UserNotExist] });
interaction.channel.permissionOverwrites.edit(uMember.id, {
await interaction.channel.permissionOverwrites.edit(uMember.id, {
VIEW_CHANNEL: true,
});
const Complete = new Discord.MessageEmbed()
+42 -25
View File
@@ -25,7 +25,7 @@ module.exports = new Command({
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole, getChannel } = interaction.client;
if (supportbot.StaffOnly) {
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
@@ -49,18 +49,19 @@ module.exports = new Command({
await interaction.deferReply();
let tickets = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
).tickets.find((t) => t.id === interaction.channel.id);
let TicketData = await tickets.tickets.findIndex(
(t) => t.id == ticketChannel.id
);
if (!TicketData) {
let TicketData = await tickets.tickets.findIndex(
(t) => t.id === interaction.channel.id
);
let ticket = tickets.tickets[TicketData];
if (TicketData === -1) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setDescription(supportbot.NoValidTicket)
.setColor(supportbot.WarningColour);
return interaction.followUp({ embeds: [Exists] });
}
let tUser = interaction.client.users.cache.get(TicketData.user);
let tUser = interaction.client.users.cache.get(ticket.user);
let transcriptChannel = await getChannel(
supportbot.TranscriptLog,
interaction.guild
@@ -80,8 +81,8 @@ module.exports = new Command({
.setColor(supportbot.EmbedColour);
await interaction.followUp({ embeds: [CloseTicketRequest] });
let filter = (m) =>
m.content.toLowerCase() == supportbot.ClosingConfirmation_Word &&
m.author.id == interaction.user.id;
m.content.toLowerCase() === supportbot.ClosingConfirmation_Word &&
m.author.id === interaction.user.id;
await interaction.channel.awaitMessages({
filter,
max: 1,
@@ -102,32 +103,42 @@ module.exports = new Command({
const transcriptEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.setFooter({
text: supportbot.EmbedFooter,
iconURL: interaction.user.displayAvatarURL(),
})
.addField(
"Ticket",
`${interaction.channel.name} (${interaction.channel.id})`
)
.addField(
"User",
`${tUser.username}#${tUser.discriminator} (${tUser.id})`
`${tUser?.username || "N/A"}#${tUser?.discriminator || "N/A"} (${
tUser?.id || ticket.user
})`
)
.addField("Closed By", interaction.user.tag)
.addField("Reason", reason);
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TicketLog_Title)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.setFooter({
text: supportbot.EmbedFooter,
iconURL: interaction.user.displayAvatarURL(),
})
.addField(
"Ticket",
`${interaction.channel.name} (${interaction.channel.id})`
)
.addField(
"User",
`${tUser.username}#${tUser.discriminator} (${tUser.id})`
`${tUser?.username || "N/A"}#${tUser?.discriminator || "N/A"} (${
tUser?.id || ticket.user
})`
)
.addField("Closed By", interaction.user.tag)
.addField("Reason", reason);
let msgs = await interaction.channel.messages.fetch();
let msgs = await interaction.channel.messages.fetch({ limit: 100 });
let html = "";
msgs = msgs.sort((a, b) => a.createdTimestamp - b.createdTimestamp);
@@ -143,11 +154,11 @@ module.exports = new Command({
html += `-----<br><br>`;
}
});
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
console.error(err);
});
if (!(supportbot.DisableTicketLogChannel)) {
await logChannel.send({ embeds: [logEmbed] }).catch((err) => {
console.error(err);
});
}
let file = new Discord.MessageAttachment(
Buffer.from(html),
`${interaction.channel.name}.html`
@@ -157,18 +168,24 @@ module.exports = new Command({
.catch(async (err) => {
console.error(err);
});
await tUser
.send({ embeds: [transcriptEmbed], files: [file] })
if (supportbot.DMTranscripts) {
await tUser
?.send({ embeds: [transcriptEmbed], files: [file] })
.catch(async (err) => {
console.error(err);
});
if (TicketData.subUsers) {
TicketData.subUsers.forEach(async (subUser) => {
interaction.client.users.cache
if (ticket.subUsers) {
ticket.subUsers.forEach(async (subUser) => {
await interaction.client.users.cache
.get(subUser)
.send({ embeds: [transcriptEmbed], files: [file] });
?.send({ embeds: [transcriptEmbed], files: [file] });
});
}
}
await interaction.channel.delete().catch(async (error) => {
console.error(error);
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
+43 -3
View File
@@ -20,18 +20,49 @@ module.exports = new Command({
name: "title",
description: "Embed Title",
type: "STRING",
required: true,
},
{
name: "message",
description: "Embed Message",
type: "STRING",
required: true,
},
{
name: "color",
description: "Embed HEX Color",
type: "STRING",
required: false,
},
{
name: "fieldtitle",
description: "Add an additional Embed Field",
type: "STRING",
required: false,
},
{
name: "fieldcontent",
description: "Add an additional Embed Field",
type: "STRING",
required: false,
},
{
name: "thumbnail",
description: "Embed Thumbnail URL",
type: "STRING",
required: false,
},
{
name: "image",
description: "Embed Image URL",
type: "STRING",
required: false,
},
],
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
@@ -52,10 +83,19 @@ module.exports = new Command({
) {
const EmbedTitle = interaction.options.getString("title");
const EmbedSubject = interaction.options.getString("message");
const EmbedColour = interaction.options.getString("color");
const EmbedThumbnail = interaction.options.getString("thumbnail");
const EmbedImage = interaction.options.getString("image");
const EmbedFieldContent = interaction.options.getString("fieldcontent");
const EmbedFieldTitle = interaction.options.getString("fieldtitle");
const EmbedMsg = new Discord.MessageEmbed()
.setTitle(EmbedTitle)
.setDescription(EmbedSubject);
.setDescription(EmbedSubject)
.setColor(EmbedColour)
.setThumbnail(EmbedThumbnail)
.setImage(EmbedImage)
if (EmbedFieldTitle && EmbedFieldContent) { EmbedMsg.addField(EmbedFieldTitle, EmbedFieldContent) };
interaction.reply({
embeds: [EmbedMsg],
+13 -16
View File
@@ -12,12 +12,6 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js");
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.HelpCommand,
description: cmdconfig.HelpCommandDesc,
@@ -25,7 +19,7 @@ module.exports = new Command({
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
if (!SupportStaff || !Admin)
@@ -37,6 +31,11 @@ module.exports = new Command({
botCommands += `**/${cmdconfig.HelpCommand}** ${cmdconfig.HelpCommandDesc}\n`;
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;
botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`;
botCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`;
if (supportbot.DisableSuggestions === false) {
botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`;
}
let ticketCommands = "";
ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`;
@@ -45,6 +44,8 @@ module.exports = new Command({
let staffCommands = "";
staffCommands += `**/${cmdconfig.TicketAdd}** ${cmdconfig.TicketAddDesc}\n`;
staffCommands += `**/${cmdconfig.TicketRemove}** ${cmdconfig.TicketRemoveDesc}\n`;
staffCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`;
staffCommands += `**/${cmdconfig.TranslateCommand}** ${cmdconfig.TranslateCommandDesc}\n`;
const HelpEmbed1 = new Discord.MessageEmbed()
.setTitle(supportbot.Name + " Commands")
@@ -64,7 +65,10 @@ module.exports = new Command({
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, interaction.user.displayAvatarURL());
.setFooter({
text: supportbot.EmbedFooter,
iconURL: interaction.user.displayAvatarURL(),
});
if (
interaction.member.roles.cache.has(SupportStaff.id) ||
@@ -77,16 +81,9 @@ module.exports = new Command({
});
}
if (supportbot.SendHelpPage === "dm") {
interaction.user.reply({
embeds: [HelpEmbed1],
});
}
if (supportbot.SendHelpPage === "channel") {
interaction.reply({
ephemeral: true,
embeds: [HelpEmbed1],
});
}
},
});
+8 -14
View File
@@ -12,12 +12,6 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8"));
const Command = require("../Structures/Command.js");
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.TicketRemove,
description: cmdconfig.TicketRemoveDesc,
@@ -32,7 +26,7 @@ module.exports = new Command({
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole } = interaction.client;
let Staff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
if (!Staff || !Admin)
@@ -56,14 +50,14 @@ module.exports = new Command({
fs.readFileSync("./Data/TicketData.json", "utf8")
);
let ticket = await TicketData.tickets.findIndex(
(t) => t.id == interaction.channel.id
(t) => t.id === interaction.channel.id
);
if (ticket == -1) {
if (ticket === -1) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setDescription(supportbot.NoValidTicket)
.setColor(supportbot.WarningColour);
return interaction.reply({ embeds: [Exists] });
return interaction.reply({ ephemeral: true, embeds: [Exists] });
}
let uMember = interaction.options.getUser("user");
@@ -74,9 +68,9 @@ module.exports = new Command({
)
.setColor(supportbot.ErrorColour);
if (!uMember) return interaction.reply({ embeds: [UserNotExist] });
if (!uMember) return interaction.reply({ ephemeral: true, embeds: [UserNotExist] });
interaction.channel.permissionOverwrites.edit(uMember.id, {
await interaction.channel.permissionOverwrites.edit(uMember.id, {
VIEW_CHANNEL: false,
});
@@ -88,7 +82,7 @@ module.exports = new Command({
interaction.reply({ embeds: [Complete] });
TicketData.tickets[ticket].subUsers = TicketData.tickets[
ticket
].subUsers.filter((u) => u != uMember.id);
].subUsers.filter((u) => u !== uMember.id);
fs.writeFileSync(
"./Data/TicketData.json",
JSON.stringify(TicketData, null, 4),
+25 -7
View File
@@ -1,5 +1,5 @@
// SupportBot | Emerald Services
// Ping Command
// Suggest Command
const fs = require("fs");
@@ -20,12 +20,13 @@ module.exports = new Command({
name: "suggestion",
description: "Create a Suggestion",
type: "STRING",
required: true,
},
],
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
const { getChannel } = interaction.client;
const suggestChannel = await getChannel(
supportbot.SuggestionChannel,
interaction.guild
@@ -33,7 +34,7 @@ module.exports = new Command({
const NoChannel = new Discord.MessageEmbed()
.setTitle("Missing Channel!")
.setDescription(`${supportbot.InvalidChannel}`)
.setDescription(supportbot.InvalidChannel)
.setColor(supportbot.ErrorColour);
if (!suggestChannel) return interaction.reply({ embeds: [NoChannel] });
@@ -44,13 +45,26 @@ module.exports = new Command({
.addField("Suggestion", suggestion, true)
.addField("From", `<@${interaction.user.id}>`)
.setThumbnail(interaction.user.displayAvatarURL())
.setFooter(supportbot.EmbedFooter, interaction.user.displayAvatarURL())
.setFooter({
text: supportbot.EmbedFooter,
iconURL: interaction.user.displayAvatarURL(),
})
.setColor(supportbot.EmbedColour);
const suggestionMsg = await suggestChannel.send({ embeds: [SuggestEmbed] });
if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) {
suggestionMsg.react(supportbot.SuggestionUpvote);
suggestionMsg.react(supportbot.SuggestionDownvote);
await suggestionMsg.react(supportbot.SuggestionUpvote);
await suggestionMsg.react(supportbot.SuggestionDownvote);
if (supportbot.SuggestionThreads) {
await suggestionMsg.startThread({
name: `Suggestion-releated Thread`,
autoArchiveDuration: 60,
type: 'GUILD_PUBLIC_THREAD',
reason: 'Suggestion-releated thread',
})
}
}
const Submitted = new Discord.MessageEmbed()
@@ -61,6 +75,10 @@ module.exports = new Command({
.addField("Sent to:", `<#${suggestChannel.id}>`)
.setColor(supportbot.SuccessColour);
return interaction.reply({ embeds: [Submitted] });
return interaction.reply({
ephemeral: true,
embeds: [Submitted]
})
},
});
+86 -78
View File
@@ -31,15 +31,22 @@ module.exports = new Command({
permissions: ["SEND_MESSAGES"],
async run(interaction) {
let disableCommand = true;
if (interaction.isCommand() && disableCommand)
return interaction.reply({
content: "This command is disabled",
ephemeral: true,
});
let department = interaction.customId?.split("-")[1] || null;
let TicketData = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
);
const { getRole, getChannel, getCategory } = interaction.client;
const { getRole, getCategory } = interaction.client;
let User = interaction.guild.members.cache.get(interaction.user.id);
if (
supportbot.MaxAllowedTickets &&
TicketData.tickets.filter((t) => t.user == interaction.user.id && t.open)
TicketData.tickets.filter((t) => t.user === interaction.user.id && t.open)
.length >= supportbot.MaxAllowedTickets
) {
return interaction.reply({
@@ -73,39 +80,29 @@ module.exports = new Command({
const TicketExists = new MessageEmbed()
.setTitle("Ticket Exists!")
.setDescription(`${supportbot.TicketExists}`)
.setColor(supportbot.WarningColour);
.setDescription(supportbot.TicketExists);
if (
await interaction.guild.channels.cache.find((ticketChannel) => {
ticketChannel.name === `${supportbot.TicketPrefix}${ticketNumberID}`;
})
await interaction.guild.channels.cache.find(
(ticketChannel) =>
ticketChannel.name === `${supportbot.TicketPrefix}${ticketNumberID}`
)
) {
return await interaction.reply({ embeds: [TicketExists] });
return await interaction.reply({
embeds: [TicketExists],
ephemeral: true,
});
}
const Staff = await getRole(supportbot.Staff, interaction.guild);
const Admin = await getRole(supportbot.Admin, interaction.guild);
const DeptRole1 = await getRole(
supportbot.DepartmentRole_1,
interaction.guild
);
const DeptRole2 = await getRole(
supportbot.DepartmentRole_2,
interaction.guild
);
const DeptRole3 = await getRole(
supportbot.DepartmentRole_3,
interaction.guild
);
if (!Staff || !Admin || !DeptRole1 || !DeptRole2 || !DeptRole3)
if (!Staff || !Admin)
return interaction.reply({
content:
"Some roles seem to be missing!\nPlease check for errors when starting the bot.",
ephemeral: true,
});
const Author = interaction.user;
let TicketCategory = await getCategory(
supportbot.TicketCategory,
supportbot.Departments[department].category,
interaction.guild
);
const ticketChannel = await interaction.guild.channels.create(
@@ -119,9 +116,8 @@ module.exports = new Command({
allow: [Permissions.FLAGS.VIEW_CHANNEL],
},
{
id: Author.id,
id: interaction.user.id,
allow: [Permissions.FLAGS.VIEW_CHANNEL],
deny: [Permissions.FLAGS.SEND_MESSAGES],
},
{
id: interaction.guild.id,
@@ -130,15 +126,20 @@ module.exports = new Command({
],
}
);
if (supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff.id, {
if (supportbot.AllowAllStaff) {
await ticketChannel.permissionOverwrites.edit(Staff.id, {
VIEW_CHANNEL: true,
});
}
if (!department) {
await ticketChannel.permissionOverwrites.edit(interaction.user.id, {
SEND_MESSAGES: false,
});
}
await TicketData.tickets.push({
id: ticketChannel.id,
name: ticketChannel.name,
user: Author.id,
user: interaction.user.id,
number: ticketNumberID,
reason: TicketSubject,
open: true,
@@ -182,23 +183,23 @@ module.exports = new Command({
.setColor(supportbot.EmbedColour);
if (supportbot.TicketSubject === "embed") {
if (TicketSubject != "No Reason Provided.") {
if (TicketSubject !== "No Reason Provided.") {
TicketMessage.addFields({ name: "Reason", value: TicketSubject });
}
}
if (supportbot.TicketSubject === "description") {
if (TicketSubject != "No Reason Provided.") {
if (TicketSubject !== "No Reason Provided.") {
await ticketChannel.setTopic(
`Reason: ${TicketSubject} - User ID: ${interaction.user.id} - Ticket: ${ticketChannel.name}`
);
}
}
if (supportbot.TicketDepartments) {
if (!department) {
TicketMessage.addFields({
name: "Departments",
value: ` **${supportbot.DepartmentTitle_1}**\n **${supportbot.DepartmentTitle_2}**\n **${supportbot.DepartmentTitle_3}**`,
value: ` **${supportbot.Departments.map((X) => X.title).join("\n")}**`,
});
}
const CloseButton = new MessageButton()
@@ -214,41 +215,24 @@ module.exports = new Command({
.setEmoji(supportbot.TicketLockEmoji);
const row2 = new MessageActionRow().addComponents(CloseButton, LockButton);
if (supportbot.TicketDepartments) {
if (!department) {
try {
const Department1Button = new MessageButton()
.setCustomId("Department1")
.setLabel(supportbot.DepartmentTitle_1)
.setStyle(supportbot.TicketDept1Colour)
.setEmoji(supportbot.TicketDept1Emoji);
const Department2Button = new MessageButton()
.setCustomId("Department2")
.setLabel(supportbot.DepartmentTitle_2)
.setStyle(supportbot.TicketDept2Colour)
.setEmoji(supportbot.TicketDept2Emoji);
const Department3Button = new MessageButton()
.setCustomId("Department3")
.setLabel(supportbot.DepartmentTitle_3)
.setStyle(supportbot.TicketDept3Colour)
.setEmoji(supportbot.TicketDept3Emoji);
const row = new MessageActionRow().addComponents(
Department1Button,
Department2Button,
Department3Button
let buttons = await supportbot.Departments.map((x) =>
new MessageButton()
.setCustomId("Department" + supportbot.Departments.indexOf(x))
.setLabel(x.title)
.setStyle(x.color)
.setEmoji(x.emoji)
);
const row = new MessageActionRow().addComponents(buttons);
const m = await ticketChannel.send({
embeds: [TicketMessage],
components: [row],
});
const filter = (i) => i.user.id === interaction.user.id;
let collector;
try {
const filter = (i) => i.user.id === interaction.user.id;
collector = await m.awaitMessageComponent({
filter,
max: 1,
@@ -256,10 +240,13 @@ module.exports = new Command({
time: supportbot.Timeout * 60000,
});
} catch (e) {
if (e.code == "INTERACTION_COLLECTOR_ERROR")
if (e.code === "INTERACTION_COLLECTOR_ERROR") {
try {
TicketData = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
);
let ticket = await TicketData.tickets.findIndex(
(t) => t.id == ticketChannel.id
(t) => t.id === ticketChannel.id
);
TicketData.tickets[ticket].open = false;
fs.writeFileSync(
@@ -273,27 +260,17 @@ module.exports = new Command({
"Your ticket has timed out. Please open a new one, and select a department."
);
} catch (e) {}
return await ticketChannel.delete();
}
let role;
let title;
if (collector.customId === "Department1") {
role = DeptRole1;
title = supportbot.DepartmentTitle_1;
}
if (collector.customId === "Department2") {
role = DeptRole2;
title = supportbot.DepartmentTitle_2;
}
if (collector.customId === "Department3") {
role = DeptRole3;
title = supportbot.DepartmentTitle_3;
return await ticketChannel.delete();
}
}
let num = collector.customId.split("Department")[1];
let role = getRole(supportbot.Departments[num].role, interaction.guild);
let title = supportbot.Departments[num].title;
ticketChannel.permissionOverwrites.edit(role.id, {
await ticketChannel.permissionOverwrites.edit(role.id, {
VIEW_CHANNEL: true,
});
ticketChannel.permissionOverwrites.edit(Author.id, {
await ticketChannel.permissionOverwrites.edit(interaction.user.id, {
SEND_MESSAGES: true,
});
@@ -315,7 +292,38 @@ module.exports = new Command({
});
} catch (error) {}
} else {
await ticketChannel.send({ embeds: [TicketMessage], components: [row2] });
await ticketChannel.send({
embeds: [TicketMessage],
components: [row2],
});
if (department) {
let role = await getRole(
supportbot.Departments[department].role,
interaction.guild
);
let title = supportbot.Departments[department].title;
await ticketChannel.permissionOverwrites.edit(role.id, {
VIEW_CHANNEL: true,
});
let TicketCat = await getCategory(
supportbot.Departments[department].category,
interaction.guild
);
await ticketChannel.setParent(TicketCat.id, { lockPermissions: false });
if (supportbot.AllowThanksForReachingOutMessage) {
await ticketChannel.send({
embeds: [
{
description: `> Thank for reaching out to the **${title} Department**. Please provide us information regarding your query.`,
color: supportbot.EmbedColour,
},
],
});
}
}
if (supportbot.AllowTicketMentions) {
await ticketChannel.send(supportbot.TicketRoleMention);
}
}
},
});
+108
View File
@@ -0,0 +1,108 @@
// SupportBot | Emerald Services
// Translate Command
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
const cmdconfig = yaml.load(
fs.readFileSync("./Configs/commands.yml", "utf8")
);
const Command = require("../Structures/Command.js");
const translate = require("@vitalets/google-translate-api");
module.exports = new Command({
name: cmdconfig.TranslateCommand, // Name of command
description: cmdconfig.TranslateCommandDesc, // Description of command
options: [
{
type: "STRING",
name: "language",
description: "A 2 letter language code",
required: true,
},
{
type: "STRING",
name: "text",
description: "The text to translate",
required: true,
}, // The input text for the translation
],
permissions: ["SEND_MESSAGES"], // The permission the user/role at least requires
async run(interaction) {
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
if (!SupportStaff || !Admin)
return interaction.reply(
"Some roles seem to be missing!\nPlease check the error logs."
);
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(
`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``
)
.setColor(supportbot.WarningColour);
if (
!interaction.member.roles.cache.has(SupportStaff.id) &&
!interaction.member.roles.cache.has(Admin.id)
)
return interaction.reply({ embeds: [NoPerms] });
const { getChannel } = interaction.client;
let lang = interaction.options.getString("language"); // Grab choice of language code by user
let url = "https://www.science.co.il/language/Codes.php"; // URL to all available language codes
let text = await interaction.options.getString("text"); // Grab the text to translate by the user
let translatelog = await getChannel(
supportbot.TranslateLogChannel,
interaction.guild
); // Grab the set logging channel for translations
// Return message if user has provided an invalid language code
const result = await translate(text, { to: lang }).catch(async (err) => {
if (err && err.code == 400) {
await interaction.reply({
embeds: [
new Discord.MessageEmbed()
.setColor(supportbot.WarningColour)
.setTitle("Valid Language Codes")
.setURL(url)
.setDescription(
"Click the title to see which 2 letter language codes are valid."
),
],
ephemeral: true,
});
}
});
if (!result) return;
// Embed containing language code, original text and translated text
let transembed = new Discord.MessageEmbed()
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) })
.setColor(supportbot.SuccessColour)
.setDescription(`**Translation to ${lang}**`)
.addFields(
{ name: "Original text", value: text },
{ name: "Translated text", value: result.text },
)
.setFooter({ text: `Author: ${interaction.user.id}` })
.setTimestamp();
// Send embed [transembed] with translated message to channel
await interaction.reply({ embeds: [transembed] });
// Send embed [transembed] to logging channel
await translatelog.send({ embeds: [transembed] });
},
})
+127
View File
@@ -0,0 +1,127 @@
// SupportBot | Emerald Services
// User Info Command
const fs = require("fs");
const moment = require("moment");
const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
const cmdconfig = yaml.load(
fs.readFileSync("./Configs/commands.yml", "utf8")
);
const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.UserInfoCommand, // Name of command
description: cmdconfig.UserInfoCommandDesc, // Description of command
options: [
{
type: "USER",
name: "user",
description: "The user you want to get info about.",
required: true,
}, // The user input
],
permissions: ["SEND_MESSAGES"], // The permission the user/role at least requires
async run(interaction) {
const { getRole } = interaction.client;
let SupportStaff = await getRole(supportbot.Staff, interaction.guild);
let Admin = await getRole(supportbot.Admin, interaction.guild);
if (!SupportStaff || !Admin)
return interaction.reply(
"Some roles seem to be missing!\nPlease check the error logs."
);
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(
`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``
)
.setColor(supportbot.WarningColour);
if (
!interaction.member.roles.cache.has(SupportStaff.id) &&
!interaction.member.roles.cache.has(Admin.id)
)
return interaction.reply({ embeds: [NoPerms] });
let user = await interaction.options.getUser("user") || interaction.author; // Grab the mentioned user
let member = await interaction.guild.members.cache.get(user.id) // Check for user and his ID
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(
`${supportbot.UserNotFound}\n\nTry Again:\`/${cmdconfig.UserInfoCommand} <@!User_ID> or @User\``
)
.setColor(supportbot.ErrorColour);
if (!user) return interaction.reply({ embeds: [UserNotExist] });
// Flags a user/bot can have
const flags = {
DISCORD_EMPLOYEE: 'Discord Employee',
DISCORD_PARTNER: 'Discord Partner',
BUGHUNTER_LEVEL_1: 'Bug Hunter (Level 1)',
BUGHUNTER_LEVEL_2: 'Bug Hunter (Level 2)',
HYPESQUAD_EVENTS: 'HypeSquad Events',
HOUSE_BRAVERY: 'House of Bravery',
HOUSE_BRILLIANCE: 'House of Brilliance',
HOUSE_BALANCE: 'House of Balance',
EARLY_SUPPORTER: 'Early Supporter',
TEAM_USER: 'Team User',
SYSTEM: 'System',
VERIFIED_BOT: 'Verified Bot',
VERIFIED_DEVELOPER: 'Verified Bot Developer'
};
// Status message with icon
let status = {
online: "🟢Online",
idle: "🟡Idle",
dnd: "🔴Do Not Disturb",
offline: "⚫Offline"
};
const userFlags = user.flags.toArray();
// Embed containing the userinfo
let userembed = new Discord.MessageEmbed()
.setTitle(`User Info for User: ${user.tag}`)
.setThumbnail(member.displayAvatarURL({ dynamic: true, size: 512 }))
.setColor(member.roles.highest.hexColor)
.addFields(
{ name: "Name:", value: `${user.tag}\n<@${member.id}>`, inline: true },
{ name: "ID:", value: `${member.id}`, inline: true },
{ name: "Is Bot:", value: user.bot ? "Yes" : "No", inline: true },
{ name: "House/Badge:", value: `${userFlags.length ? userFlags.map(flag => flags[flag]).join("\n") : "None"}`, inline: true },
{ name: "Current Status:", value: `${status[member.presence ? member.presence.status : "offline"]}`, inline: true },
{ name: "Avatar URL:", value: `[Click Here](${member.displayAvatarURL()})`, inline: true },
{ name: "\u200b", value: "\u200b", inline: false}
)
.addFields(
{ name: "Creation Date:", value: `${moment(user.createdAt).format("MMMM Do YYYY, h:mm:ss a")}\n> ${moment(user.createdAt).startOf("day").fromNow()}`, inline: true },
{ name: "Joined Date:", value: `${moment(member.joinedAt).format("MMMM Do YYYY, h:mm:ss a")}\n> ${moment(member.joinedAt).startOf("day").fromNow()}`, inline: true },
{ name: "Roles Total:", value: `${member.roles.cache.size -1}`, inline: false },
{ name: "Highest Role:", value: `${member.roles.highest.id === interaction.guild.id ? "None" : member.roles.highest.toString()}`, inline: true },
{ name: "Roles:", value: `${member.roles.cache.map(r => r).join(" ").replace("@everyone", " ") || "None"}`, inline: false },
)
.setFooter({ text: supportbot.EmbedFooter })
.setTimestamp();
// Send embed [userembed]
await interaction.reply({ embeds: [userembed] }).catch((err) => console.error("An error has occured: ", err));
},
})
/**
* @INFO
* UserInfo command by Sypher#3415 | 321332200668790786
* @INFO
* Solely created for SupportBot | https://github.com/Emerald-Services/SupportBot/
**/
+6
View File
@@ -14,6 +14,7 @@
# Command Name Configuration
# -------------------------------
Blacklist: "blacklist"
TicketAdd: "add"
TicketRemove: "remove"
OpenTicket: "ticket"
@@ -23,13 +24,17 @@ PingCommand: "ping"
HelpCommand: "help"
EmbedCommand: "embed"
SuggestCommand: "suggest"
TranslateCommand: "translate"
UserInfoCommand: "userinfo"
# ---------------------------------------
# Command Description Configuration
# ---------------------------------------
BlacklistDesc: "Blacklist a user from creating Tickets."
TicketAddDesc: "Add a user to a support ticket."
TicketRemoveDesc: "Remove a user from a support ticket."
TranslateCommandDesc: "Translates the language provided, along with the abbreviation (2 char) long language code"
OpenTicketDesc: "Open a new support ticket."
CloseTicketDesc: "Close your support ticket."
InfoCommandDesc: "Get information about the brand."
@@ -37,3 +42,4 @@ PingCommandDesc: "Pong!"
HelpCommandDesc: "Get a list of all the commands."
EmbedCommandDesc: "Send a message as an embed."
SuggestCommandDesc: "Suggest a feature for the server."
UserInfoCommandDesc: "Get info about a user."
+127 -63
View File
@@ -10,22 +10,20 @@
# Discord Support: https://emeraldsrv.dev/discord
# Community Resources: https://emeraldsrv.dev/resources
SupportBot_Version: "7.4.0"
SupportBot_Version: "v7.7"
# -------------------------
# General Configuration
# -------------------------
Name: "SupportBot"
Token: "BOT_TOKEN"
# Guild ID Ex: 123456789123456789
Guild: ""
Token: "BOT_TOKEN HTTPS://DISCORD.COM/DEVELOPERS"
# -------------------------
# Activity Configuration
# -------------------------
BotActivity: "Need Help? /ticket"
BotActivity: "Here to help!"
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The ActivityType to "STREAMING" for a streaming status!
@@ -38,40 +36,74 @@ ActivityType: "PLAYING"
# -------------------------
EmbedColour: "#f74343"
EmbedFooter: "SupportBot | An Advanced Ticket System"
EmbedFooter: "SupportBot | Developed by Emerald Services"
ErrorColour: "#d12519"
SuccessColour: "#04b545"
WarningColour: "#fca117"
# -------------------------
# Information Configuration
# -------------------------
InfoTitle: "Information"
AboutMe: "Hi, I'm SupportBot an advanced discord ticket bot with 100% customization! [Download](https://emeraldsrv.dev/download)"
InfoButtonText: "Visit Site"
InfoURL: "https://emeraldsrv.dev"
InfoColour: "#f74343"
# -------------------------
# Help Configuration
# -------------------------
SendHelpPage: "channel" # Set to channel or dm
# -------------------------
# Role Configuration
# -------------------------
AutoRole: true
AutoRole_Role: "Member"
JoinRole: "Member"
Staff: "Staff"
Admin: "Admin"
TicketBlackListRole: "Blacklisted"
# ----------------------------
# Join/Leave Configuration
# ----------------------------
Welcome: true
# set to false to disable joining logs
WelcomeChannel: "join-leave-logs"
WelcomeColour: "#f74343"
WelcomeTitle: "User Joined!"
WelcomeMessage: "%joined_user% has joined the server!"
# Available Placeholders:
# %joined_user% - Mentions the user who joined
EmbedWelcomeImage: true
EmbedWelcomeImageURL: "https://media.discordapp.net/attachments/958247876344025108/986777740738986094/unknown.png"
EmbedWelcomeThumbnail: "BOT"
# "USER" will display the user's profile picture.
# "BOT" will display the bot's profile picture.
# false to disable
Leave: true
# set to false to disable leaving logs
LeaveChannel: "join-leave-logs"
LeaveColour: "#f74343"
LeaveTitle: "User Left!"
LeaveMessage: "%joined_user% has left the server!"
# Available Placeholders:
# %joined_user% - Mentions the user who joined
EmbedLeaveImage: true
EmbedLeaveImageURL: "https://cdn.discordapp.com/attachments/958247876344025108/986778170223120384/unknown.png"
EmbedLeaveThumbnail: false
# "USER" will display the user's profile picture.
# "BOT" will display the bot's profile picture.
# false to disable
# -------------------------
# Information Configuration
# -------------------------
InfoTitle: "Information"
InfoButtonText: "Visit Site"
AboutMe: "I am SupportBot"
InfoURL: "https://emeraldsrv.dev"
InfoColour: "#f74343"
# ----------------------------
# Suggestions Configuration
# ----------------------------
@@ -80,29 +112,49 @@ SuggestionChannel: "suggestions"
SuggestionUpvote: "✅"
SuggestionDownvote: "❌"
SuggestionThreads: true
# set to false to disable threads being created from suggestions.
DisableSuggestions: false
# Set to true to disable the suggestions feature.
# -------------------------
# Translate Configuration
# -------------------------
TranslateLogChannel: "translations-log"
# -------------------------
# Tickets Configuration
# -------------------------
TicketCategory: "Tickets"
TicketPrefix: "ticket-" # The prefix for ticket channel names
TicketLog: "logs"
TranscriptLog: "transcripts"
TicketLog: "ticket-data"
TranscriptLog: "ticket-data"
DMTranscripts: true
TranscriptTitle: "Ticket Transcript"
TicketLog_Title: "Ticket Closed"
TicketBlackListMessage: "You are not allowed to open a ticket"
TicketRoleMention: "@here"
# To ping a role: <@ROLE_ID>
MaxAllowedTickets: 2
TicketSubject: "description"
# "description" will displays the ticket reason within the channel description
# "embed" will displays the ticket reason within the ticket embed
# "description" will display the ticket reason within the channel description
# "embed" will display the ticket reason within the ticket embed
AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# Set to false to dis-allow mentions within tickets.
# Set false to dis-allow mentions within tickets.
AllowThanksForReachingOutMessage: true
# Set to true to allow the "Thanks for reaching out Message" to be sent when the ticket is created
DisableTicketLogChannel: false
# Set to true to disable the requirement of the "TicketLog"
# Set to true to also disable the ticket logs to be sent in the "TicketLogs" channel
# --- Creation Config ---
# --- Start ---
@@ -124,15 +176,51 @@ TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"
# --- Buttons Config ---
# --- Start ---
# -------------------------
# Tickets Categories
# -------------------------
Timeout: 5
# Set to true to allow all staff to access the ticket
AllowAllStaff: false
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been chosen.
Departments:
- title: "Support"
role: "Staff"
color: "SECONDARY"
emoji: "1️⃣"
category: "Tickets"
- title: "Billing Support"
role: "Staff"
color: "SECONDARY"
emoji: "2️⃣"
category: "Tickets"
- title: "Admin Team"
role: "Admin"
color: "SECONDARY"
emoji: "3️⃣"
category: "Tickets"
# - title: "Other"
# role: "Staff"
# color: "SECONDARY"
# emoji: "3️⃣"
# category: "Tickets"
# Discord Button Colour Selection
# PRIMARY - Blue
# PRIMARY - Blurple
# SECONDARY - Grey
# DANGER - Red
# SUCCESS - Green
# --- Buttons Config ---
# --- Start ---
LockTicketCategory: "Archive"
TicketCloseEmoji: "❌"
@@ -143,47 +231,23 @@ TicketCloseColour: "DANGER"
TicketDeleteColour: "DANGER"
TicketLockColour: "PRIMARY"
TicketDept1Colour: "PRIMARY"
TicketDept2Colour: "PRIMARY"
TicketDept3Colour: "PRIMARY"
TicketDept1Emoji: "1️⃣"
TicketDept2Emoji: "2️⃣"
TicketDept3Emoji: "3️⃣"
# Discord Button Colour Selection
# PRIMARY - Blue
# SECONDARY - Grey
# DANGER - Red
# SUCCESS - Green
TranscriptSavedMessage: "📝 **Transcript Saved!**"
TicketLockMessage: "❌ **Ticket Locked!**"
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
# --- Departments Config ---
# --- Start ---
TicketDepartments: true
# Delete the ticket if no department selected. TIME IN MINUTES
Timeout: 5
AllowStaff: true
# If set to false users with the "Staff" role will not be able to view tickets
# without a valid department role set below.
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
DepartmentTitle_1: "General Support"
DepartmentTitle_2: "Billing Support"
DepartmentTitle_3: "Admin Team"
# Ticket department title, This is the title for a ticket department to help users know what is available.
DepartmentRole_1: "Support"
DepartmentRole_2: "Support"
DepartmentRole_3: "Admin"
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been chosen.
# --- Closing Config ---
# --- Start ---
StaffOnly: true
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: false
CloseConfirmation: true
# ---------------------------
# Error / Warning Messages
+5 -12
View File
@@ -20,22 +20,15 @@ TicketPanel: true
# Ticket Panel Message Configuration
# ----------------------------------------
Channel: "create-ticket"
ButtonEmoji: "📩"
ButtonLabel: "Open Ticket"
ButtonColour: "SUCCESS"
# Colour Options:
# -> PRIMARY - Blurple
# -> SECONDARY - Grey
# -> SUCCESS - Green
# -> DANGER - Red
Channel: "ticket-creation"
PanelTitle: "Need Help? Create a Support Ticket."
PanelColour: "#f74343"
TicketPanel_Description: true
TicketPanel_Thumbnail: false
TicketPanel_Image: false
TicketPanel_Thumbnail: true
TicketPanel_Image: true
PanelMessage: "Click the button to open a new support ticket."
PanelThumbnail: "https://i.imgur.com/ieeZejl.png"
PanelImage: "https://i.imgur.com/5NkcmDq.png"
PanelImage: "https://i.imgur.com/5NkcmDq.png"
+1 -4
View File
@@ -1,4 +1 @@
{
"id": 0,
"tickets": []
}
{"tickets": [{}]}
+4 -1
View File
@@ -1 +1,4 @@
{"TicketPanelID":""}
{
"id": 0,
"TicketPanelID": ""
}
+1 -1
View File
@@ -1,5 +1,5 @@
const Event = require("../Structures/Event.js");
module.exports = new Event("guildCreate", async (client, guild) => {
module.exports = new Event("guildCreate", async (client) => {
console.log(
`\u001b[31m`,
`${client.user.username} is not in the correct server set in your config. Please leave all other servers and restart the bot.`
+1 -1
View File
@@ -1,6 +1,6 @@
const Event = require("../Structures/Event.js");
module.exports = new Event("guildDelete", async (client, guild) => {
module.exports = new Event("guildDelete", async (client) => {
console.log(
`\u001b[31m`,
`${client.user.username} is not in the correct server set in your config. Please join the server and restart the bot.`
+46
View File
@@ -0,0 +1,46 @@
const Discord = require('discord.js');
const fs = require("fs");
const Event = require("../Structures/Event.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
module.exports = new Event("guildMemberAdd", async (client, member, interaction, guild) => {
if (supportbot.Welcome) {
const WelcomeChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.WelcomeChannel)
const WelcomeEmbed = new Discord.MessageEmbed()
.setColor(supportbot.WelcomeColour)
.setTitle(supportbot.WelcomeTitle)
.setDescription(supportbot.WelcomeMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.EmbedWelcomeThumbnail === "BOT") {
WelcomeEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeThumbnail === "USER") {
WelcomeEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeImage) {
WelcomeEmbed.setImage(supportbot.EmbedWelcomeImageURL)
}
WelcomeChannel.send({
embeds: [WelcomeEmbed]
})
if (supportbot.AutoRole) {
var role = member.guild.roles.cache.find(role => role.name === supportbot.JoinRole);
member.roles.add(role);
}
console.log(`\u001b[32m`, `[+]`, `\u001b[33m`, `${member.user.username} joined the server!`)
}
});
+41
View File
@@ -0,0 +1,41 @@
const Discord = require('discord.js');
const fs = require("fs");
const Event = require("../Structures/Event.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
module.exports = new Event("guildMemberRemove", async (client, member, interaction, guild) => {
if (supportbot.Leave) {
const LeaveChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.LeaveChannel)
const LeaveEmbed = new Discord.MessageEmbed()
.setColor(supportbot.LeaveColour)
.setTitle(supportbot.LeaveTitle)
.setDescription(supportbot.LeaveMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.EmbedLeaveThumbnail === "BOT") {
LeaveEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveThumbnail === "USER") {
LeaveEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveImage) {
LeaveEmbed.setImage(supportbot.EmbedLeaveImageURL)
}
LeaveChannel.send({
embeds: [LeaveEmbed]
})
console.log(`\u001b[31m`, `[-]`, `\u001b[33m`, `${member.user.username} joined the server!`)
}
});
+18 -13
View File
@@ -15,7 +15,7 @@ const Event = require("../Structures/Event.js");
module.exports = new Event("interactionCreate", async (client, interaction) => {
if (interaction.isCommand()) {
const command = client.commands.find(
(cmd) => cmd.name.toLowerCase() == interaction.commandName
(cmd) => cmd.name.toLowerCase() === interaction.commandName
);
if (interaction.user.bot || !interaction.guild) return;
@@ -29,7 +29,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
embeds: [NotValid],
});
const permission = interaction.member.permissions.has(command.permission);
const permission = interaction.member.permissions.has(command.permissions);
const ValidPerms = new Discord.MessageEmbed()
.setDescription(
@@ -41,11 +41,13 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
return interaction.reply({
embeds: [ValidPerms],
});
interaction.user = interaction.user;
command.run(interaction);
}
if (interaction.isButton()) {
if (interaction.customId === "openticket") {
if (
interaction.customId === "openticket" ||
interaction.customId.includes("department-")
) {
try {
const cmd = client.commands.get(cmdconfig.OpenTicket);
if (!cmd) return;
@@ -65,7 +67,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
}
}
if (interaction.customId === "ticketlock") {
if (interaction.channel.name.startsWith(`${supportbot.TicketPrefix}`)) {
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
interaction.message.fetch();
let Admin =
interaction.guild.roles.cache.find(
@@ -84,25 +86,28 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
let parent =
interaction.guild.channels.cache.find(
(c) => c.name === `${supportbot.LockTicketCategory}`
(c) => c.name === supportbot.LockTicketCategory
) ||
interaction.guild.channels.cache.find(
(c) => c.id === `${supportbot.LockTicketCategory}`
(c) => c.id === supportbot.LockTicketCategory
);
if (parent) {
interaction.channel.setParent(parent.id);
await interaction.channel.setParent(parent.id);
}
all.forEach((perm) => {
interaction.channel.permissionOverwrites.delete(perm.id);
});
interaction.channel.permissionOverwrites.create(Admin.id, {
await interaction.channel.permissionOverwrites.create(Admin.id, {
VIEW_CHANNEL: true,
});
interaction.channel.permissionOverwrites.create(interaction.guild.id, {
VIEW_CHANNEL: false,
});
await interaction.channel.permissionOverwrites.create(
interaction.guild.id,
{
VIEW_CHANNEL: false,
}
);
const ticketDeleteButton = new Discord.MessageButton()
.setCustomId("ticketclose")
@@ -116,7 +121,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
const ArchiveEmbed = new Discord.MessageEmbed()
.setTitle("Archived")
.setDescription(`Archived ${interaction.channel.name}`)
.setColor(`${supportbot.SuccessColour}`);
.setColor(supportbot.SuccessColour);
interaction.reply({ embeds: [ArchiveEmbed] });
interaction.message.edit({ components: [row] });
+62 -47
View File
@@ -14,30 +14,39 @@ const panelconfig = yaml.load(
const Event = require("../Structures/Event.js");
module.exports = new Event("ready", async (client) => {
module.exports = new Event("ready", async (client, interaction) => {
const { getRole, getChannel, getCategory } = client;
client.user.setActivity(supportbot.BotActivity, {
type: supportbot.ActivityType,
url: supportbot.StreamingURL,
});
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
console.log(`\u001b[107m`, `――――――――――――――――――――――――――――――――――――――――――――`);
console.log(`\u001b[91m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`);
console.log(`\u001b[91m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`);
console.log(`\u001b[91m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`);
console.log(`\u001b[91m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`);
console.log(`\u001b[91m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`);
console.log(`\u001b[91m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`);
console.log(`\u001b[91m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`);
console.log(`\u001b[91m`, `╋╋╋╋╋╋╋┗┛╋┗┛`);
console.log(` `);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
console.log(`\u001b[32m`, `――――――――――――――――――――――――――――――――――――――――――――`);
console.log(` `);
console.log(
`\u001b[33m`,
`${supportbot.Name} v${supportbot.SupportBot_Version}`,
`${supportbot.Name} | v${supportbot.SupportBot_Version}`,
`\u001b[36m`,
`Connected to Discord`
);
console.log(
`\u001b[33m`,
`Invite to your server:`,
`\u001b[36m`,
`https://discord.com/api/oauth2/authorize?client_id=` +
client.user.id +
`&permissions=8&scope=bot%20applications.commands`
);
console.log(
`\u001b[33m`,
`Resources:`,
@@ -48,7 +57,7 @@ module.exports = new Event("ready", async (client) => {
`\u001b[33m`,
`Documentation:`,
`\u001b[36m`,
`https://supportbot.emeraldsrv.dev`
`https://emeraldsrv.dev/wiki/supportbot`
);
console.log(
`\u001b[33m`,
@@ -66,39 +75,37 @@ module.exports = new Event("ready", async (client) => {
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`);
console.log(` `);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
if (
!supportbot.Guild ||
(await client.guilds.cache.size) !== 1 ||
(await client.guilds.cache.first().id) !== supportbot.Guild
) {
console.log(
`\u001b[31m`,
`${client.user.username} is not in the correct server set in your config. Please join the server and restart the bot.`
);
console.log(`\u001b[31m`, `${client.user.username} will now exit.`);
return process.exit(1);
}
const roles = [
supportbot.Admin,
supportbot.Staff,
supportbot.TicketBlackListRole,
supportbot.DepartmentRole_1,
supportbot.DepartmentRole_2,
supportbot.DepartmentRole_3,
];
if (supportbot.AutoRole) roles.push(supportbot.AutoRole_Role);
supportbot.Departments.forEach((department) => roles.push(department.role));
if (supportbot.AutoRole) roles.push(supportbot.JoinRole);
const channels = [
supportbot.SuggestionChannel,
supportbot.TicketLog,
supportbot.TranscriptLog,
panelconfig.Channel,
supportbot.WelcomeChannel,
supportbot.LeaveChannel,
supportbot.TranslateLogChannel
];
const categories = [supportbot.TicketCategory];
//const categories = [supportbot.TicketCategory];
const missingC = [];
const missingR = [];
const missingCat = [];
for (let c of channels) {
if ((c === supportbot.SuggestionChannel && supportbot.DisableSuggestionsChannel) || c === supportbot.TicketLog && supportbot.DisableTicketLogChannel) {
continue;
}
const find = await getChannel(c, client.guilds.cache.first());
if (!find) missingC.push(c);
}
@@ -106,10 +113,10 @@ module.exports = new Event("ready", async (client) => {
const find = await getRole(r, client.guilds.cache.first());
if (!find) missingR.push(r);
}
for (let cat of categories) {
const find = await getCategory(cat, client.guilds.cache.first());
if (!find) missingCat.push(cat);
}
// for (let cat of categories) {
// const find = await getCategory(cat, client.guilds.cache.first());
// if (!find) missingCat.push(cat);
// }
if (missingR.length > 0) {
console.log(
@@ -137,8 +144,9 @@ module.exports = new Event("ready", async (client) => {
);
}
if (panelconfig.TicketPanel) {
let chan1 = client.channels.cache.find(
(channel) => channel.name === panelconfig.Channel
let chan1 = await client.getChannel(
panelconfig.Channel,
client.guilds.cache.first()
);
if (!chan1) {
@@ -153,11 +161,14 @@ module.exports = new Event("ready", async (client) => {
fs.readFileSync("./Data/ticket-panel-id.json", "utf8")
);
chan1.messages.fetch(panelid.TicketPanelID).catch(async (r) => {
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
let embed = new Discord.MessageEmbed()
.setTitle(`${panelconfig.PanelTitle}`)
.setColor(supportbot.SuccessColour)
.setFooter(supportbot.EmbedFooter);
.setTitle(panelconfig.PanelTitle)
.setColor(panelconfig.PanelColour)
.setFooter({
text: supportbot.EmbedFooter,
iconURL: interaction.user.displayAvatarURL(),
});
if (panelconfig.TicketPanel_Description) {
embed.setDescription(panelconfig.PanelMessage);
@@ -170,12 +181,15 @@ module.exports = new Event("ready", async (client) => {
if (panelconfig.TicketPanel_Image) {
embed.setImage(panelconfig.PanelImage);
}
let button;
let button = new Discord.MessageButton()
.setLabel(panelconfig.ButtonLabel)
.setCustomId("openticket")
.setStyle(panelconfig.ButtonColour)
.setEmoji(panelconfig.ButtonEmoji);
button = supportbot.Departments.map((x) =>
new Discord.MessageButton()
.setCustomId("department-" + supportbot.Departments.indexOf(x))
.setLabel(x.title)
.setStyle(x.color)
.setEmoji(x.emoji)
);
let row = new Discord.MessageActionRow().addComponents(button);
@@ -186,7 +200,8 @@ module.exports = new Event("ready", async (client) => {
})
.then((r) => {
let data = {
TicketPanelID: `${r.id}`,
id: panelid.id,
TicketPanelID: r.id,
};
fs.writeFileSync(
"./Data/ticket-panel-id.json",
@@ -195,8 +210,8 @@ module.exports = new Event("ready", async (client) => {
);
})
.catch((e) => {
console.log("Raw" + e);
console.log("Raw: " + e);
});
});
}
});
});
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Emerald Services
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+71 -9
View File
@@ -1,13 +1,75 @@
![imgur](https://i.imgur.com/TQj40Mt.png)
<h1 align="center">
<br>
<a href="https://github.com/Emerald-Services/SupportBot"><img src="https://i.imgur.com/tzi3d7Q.png"></a>
<br>
SupportBot
<br>
</h1>
## What is SupportBot?
<div align="center">
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="shield.png">
</a>
<a href="https://github.com/discordjs">
<img src="https://img.shields.io/badge/discord.js-v13.6.x-blue.svg?style=for-the-badge&logo=javascript.svg" alt="shield.png">
</a>
<a href="https://github.com/nodejs/node">
<img src="https://img.shields.io/badge/node.js-v16.14.x-green.svg?style=for-the-badge&logo=node" alt="shield.png">
</a>
<a href="https://github.com/Emerald-Services/SupportBot/releases">
<img src="https://img.shields.io/github/downloads/Emerald-Services/SupportBot/total?style=for-the-badge" alt="shield.png">
</a>
</div>
<p align="center">
<a href="https://emeraldsrv.dev/">Website</a>
•
<a href="https://github.com/Emerald-Services/SupportBot/wiki">Wiki</a>
<br>
<a href="#about">About</a>
•
<a href="#support">Support</a>
•
<a href="#license">License</a>
•
<a href="https://github.com/Emerald-Services/SupportBot/wiki/Third-Party-Developer">Third-Party</a>
•
<a href="#contributors">Contributors</a>
</p>
## About
SupportBot is an Open-Source discord bot built with [discord.js](https://github.com/discordjs/discord.js). It's primarily focused to help servers organise and manage their support system in a unique way with full customisation to match your brand.
## Support
<a href="https://emeraldsrv.dev/discord">
<img alt="Discord" src="https://img.shields.io/discord/597779408295821323?logo=discord&logoColor=white&style=for-the-badge">
</a>
## License
Released under the [MIT](https://opensource.org/licenses/MIT) license.
## Third-Party
- [Syphers Addons](https://github.com/SypherRed/SB_Addons_Unofficial)
- [BuiltByBit](https://builtbybit.com/supportbot)
- [Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
## Contributors
<a href="https://github.com/Emerald-Services/SupportBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Emerald-Services/SupportBot">
</a>
SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customization to match your own brand.
## Quick Links
**|** [Discord](https://emeraldsrv.dev/discord) **|**
[Hosting](https://emeraldsrv.dev/hosting) **|**
[Documentation](https://docs.emeraldsrv.dev) **|**
[Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518) **|**
[Download via MC-Market](https://www.mc-market.org/resources/8940/) **|**
+13 -9
View File
@@ -37,10 +37,14 @@ class Client extends Discord.Client {
);
}
start(token) {
const commandFiles = fs
.readdirSync("./Commands")
.filter((file) => file.endsWith(".js"));
async start(token) {
var tempCommandFiles = fs.readdirSync("./Commands").filter((file) => file.endsWith(".js"));
if (supportbot.DisableSuggestions) {
tempCommandFiles = tempCommandFiles.filter(item => item !== "suggest.js");
}
const commandFiles = tempCommandFiles;
const addonFiles = fs
.readdirSync("./Addons")
@@ -76,10 +80,10 @@ class Client extends Discord.Client {
`\u001b[32;1m`,
"Loaded"
);
addon.commands.forEach((command) => {
addon.commands?.forEach((command) => {
this.commands.set(command.name, command);
});
addon.events.forEach((event) => {
addon.events?.forEach((event) => {
this.on(event.event, (...args) => event.run(this, ...args));
});
});
@@ -89,7 +93,7 @@ class Client extends Discord.Client {
// Slash Commands
this.once("ready", async () => {
await this.application?.commands.set(this.commands, supportbot.Guild);
await this.guilds.cache.first()?.commands.set(this.commands);
console.log(
`\u001b[32;1m`,
`Slash Commands Registered for ${this.guilds.cache.first().name}`
@@ -108,8 +112,8 @@ class Client extends Discord.Client {
});
console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬");
if (process.argv[2] != "test") {
this.login(token);
if (process.argv[2] !== "test") {
await this.login(token);
} else {
console.log(
`\u001b[31;1m`,
+1 -6
View File
@@ -1,19 +1,14 @@
// SupportBot | Emerald Services
// Command Structure
const fs = require("fs");
const yaml = require("js-yaml");
class Command {
constructor(options) {
this.name = options.name;
this.description = options.description;
this.permissions = options.permissions;
this.permissions = options.permissions || [];
this.options = options.options || [];
this.run = options.run;
this.defaultPermission = true;
}
}
module.exports = Command;
+14 -41
View File
@@ -5,44 +5,31 @@ const fs = require("fs");
class TicketNumberID {
static async pad() {
let n = this.get() + "";
let z = "0";
let width = 4;
await this.set(this.get() + 1);
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
let num = await this.get();
let n = num + "";
await this.set(num + 1);
return n.length >= 4 ? n : new Array(4 - n.length + 1).join("0") + n;
}
static get() {
let ticketnumberID = JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
static async get() {
let ticketnumberID = await JSON.parse(
fs.readFileSync("./Data/ticket-panel-id.json", "utf8")
);
if (!ticketnumberID.id) {
ticketnumberID.id = 0;
fs.writeFileSync(
"./Data/TicketData.json",
JSON.stringify(ticketnumberID, null, 4),
(err) => {
if (err) console.error(err);
}
);
return 0;
return this.set(0);
} else {
return ticketnumberID.id;
}
}
static set(value) {
let ticketnumberID = JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
static async set(value) {
let ticketnumberID = await JSON.parse(
fs.readFileSync("./Data/ticket-panel-id.json", "utf8")
);
ticketnumberID.id = value;
fs.writeFileSync(
"./Data/TicketData.json",
"./Data/ticket-panel-id.json",
JSON.stringify(ticketnumberID, null, 4),
(err) => {
if (err) console.error(err);
@@ -52,22 +39,8 @@ class TicketNumberID {
return value;
}
static reset() {
let ticketnumberID = JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8")
);
ticketnumberID.id = 0;
fs.writeFileSync(
"./Data/TicketData.json",
JSON.stringify(ticketnumberID, null, 4),
(err) => {
if (err) console.error(err);
}
);
return 0;
static async reset() {
return await this.set(0);
}
}
-1
View File
@@ -12,7 +12,6 @@
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
-555
View File
@@ -1,555 +0,0 @@
{
"name": "supportbot",
"version": "7.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "supportbot",
"version": "7.4.0",
"license": "MIT",
"dependencies": {
"discord.js": "^13.3.1",
"js-yaml": "^4.1.0"
}
},
"node_modules/@discordjs/builders": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
"integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
"dependencies": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.24.0",
"ow": "^0.27.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/collection": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
"integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==",
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/@sapphire/async-queue": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@sindresorhus/is": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
"integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
"node_modules/@types/node": {
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
"integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw=="
},
"node_modules/@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
}
},
"node_modules/@types/ws": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==",
"engines": {
"node": ">=12"
}
},
"node_modules/discord.js": {
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
"integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
"dependencies": {
"@discordjs/builders": "^0.8.1",
"@discordjs/collection": "^0.3.2",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.8",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"node-fetch": "^2.6.1",
"ws": "^8.2.3"
},
"engines": {
"node": ">=16.6.0",
"npm": ">=7.0.0"
}
},
"node_modules/dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"dependencies": {
"is-obj": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"engines": {
"node": ">=8"
}
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"node_modules/mime-db": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"dependencies": {
"mime-db": "1.51.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-fetch": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
}
},
"node_modules/ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"dependencies": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
"integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
},
"node_modules/tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/ws": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
"integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
}
},
"dependencies": {
"@discordjs/builders": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
"integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
"requires": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.24.0",
"ow": "^0.27.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1"
}
},
"@discordjs/collection": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
"integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg=="
},
"@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"@sapphire/async-queue": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ=="
},
"@sindresorhus/is": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
"integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw=="
},
"@types/node": {
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz",
"integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw=="
},
"@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
}
},
"@types/ws": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"requires": {
"@types/node": "*"
}
},
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A=="
},
"discord.js": {
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
"integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
"requires": {
"@discordjs/builders": "^0.8.1",
"@discordjs/collection": "^0.3.2",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.8",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"node-fetch": "^2.6.1",
"ws": "^8.2.3"
}
},
"dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"requires": {
"is-obj": "^2.0.0"
}
},
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
},
"js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"requires": {
"argparse": "^2.0.1"
}
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"mime-db": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g=="
},
"mime-types": {
"version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"requires": {
"mime-db": "1.51.0"
}
},
"node-fetch": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"requires": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
"integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
},
"tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA=="
},
"vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"ws": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
"integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
"requires": {}
}
}
}
+5 -3
View File
@@ -1,6 +1,6 @@
{
"name": "supportbot",
"version": "7.4.0",
"version": "7.7b",
"description": "SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customization to match your own brand.",
"main": "index.js",
"scripts": {
@@ -18,7 +18,9 @@
},
"homepage": "https://github.com/Emerald-Services/SupportBot#readme",
"dependencies": {
"discord.js": "^13.3.1",
"js-yaml": "^4.1.0"
"@vitalets/google-translate-api": "^8.0.0",
"discord.js": "^13.6.0",
"js-yaml": "^4.1.0",
"moment": "^2.29.3"
}
}