Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee9742d92b | ||
|
|
ec955d8dc9 | ||
|
|
bbeea5db3e | ||
|
|
6e16cec661 | ||
|
|
9245157d71 | ||
|
|
787c9e62c5 | ||
|
|
628601518b | ||
|
|
87f974e00d |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: [Emerald-Services]
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
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.
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
our discord.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
When contributing to this repository, please first discuss the change you wish to make via issue,
|
||||||
|
email, or any other method with the owners of this repository before making a change.
|
||||||
|
|
||||||
|
Please note we have a code of conduct, please follow it in all your interactions with the project.
|
||||||
|
|
||||||
|
## Pull Request Process
|
||||||
|
|
||||||
|
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
||||||
|
build.
|
||||||
|
2. Update the README.md with details of changes to the interface, this includes new environment
|
||||||
|
variables, exposed ports, useful file locations and container parameters.
|
||||||
|
3. Increase the version numbers in any examples files and the README.md to the new version that this
|
||||||
|
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
|
||||||
|
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
|
||||||
|
do not have permission to do that, you may request the second reviewer to merge it for you.
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
### Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity and
|
||||||
|
orientation.
|
||||||
|
|
||||||
|
### Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
### Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
### Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
### Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
### Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
+14
-7
@@ -10,7 +10,7 @@
|
|||||||
# Discord Support: https://emeraldsrv.dev/discord
|
# Discord Support: https://emeraldsrv.dev/discord
|
||||||
# Community Resources: https://emeraldsrv.dev/resources
|
# Community Resources: https://emeraldsrv.dev/resources
|
||||||
|
|
||||||
SupportBot_Version: "v7.7.2"
|
SupportBot_Version: "v7.7.3"
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# General Configuration
|
# General Configuration
|
||||||
@@ -47,10 +47,10 @@ WarningColour: "#fca117"
|
|||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
AutoRole: true
|
AutoRole: true
|
||||||
JoinRole: "Member"
|
JoinRole: "SupportBot Member"
|
||||||
|
|
||||||
Staff: "Staff"
|
Staff: "SupportBot Staff"
|
||||||
Admin: "Admin"
|
Admin: "SupportBot Admin"
|
||||||
TicketBlackListRole: "Blacklisted"
|
TicketBlackListRole: "Blacklisted"
|
||||||
|
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
@@ -140,6 +140,8 @@ TicketBlackListMessage: "You are not allowed to open a ticket"
|
|||||||
TicketRoleMention: "@here"
|
TicketRoleMention: "@here"
|
||||||
TicketClaimMessage: "Your ticket will be handled by" #Automaticly tags user to the end
|
TicketClaimMessage: "Your ticket will be handled by" #Automaticly tags user to the end
|
||||||
TicketClaimTitle: "Ticket Claimed"
|
TicketClaimTitle: "Ticket Claimed"
|
||||||
|
TicketUnclaimMessage: "Your ticket is now unclaimed by" #Automaticly tags user to the end
|
||||||
|
TicketUnclaimTitle: "Ticket Unclaimed"
|
||||||
# To ping a role: <@ROLE_ID>
|
# To ping a role: <@ROLE_ID>
|
||||||
|
|
||||||
MaxAllowedTickets: 2
|
MaxAllowedTickets: 2
|
||||||
@@ -191,19 +193,19 @@ AllowAllStaff: false
|
|||||||
|
|
||||||
Departments:
|
Departments:
|
||||||
- title: "Support"
|
- title: "Support"
|
||||||
role: "Staff"
|
role: "SupportBot Staff"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "1️⃣"
|
emoji: "1️⃣"
|
||||||
category: "Tickets"
|
category: "Tickets"
|
||||||
|
|
||||||
- title: "Billing Support"
|
- title: "Billing Support"
|
||||||
role: "Staff"
|
role: "SupportBot Staff"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "2️⃣"
|
emoji: "2️⃣"
|
||||||
category: "Tickets"
|
category: "Tickets"
|
||||||
|
|
||||||
- title: "Admin Team"
|
- title: "Admin Team"
|
||||||
role: "Admin"
|
role: "SupportBot Admin"
|
||||||
color: "SECONDARY"
|
color: "SECONDARY"
|
||||||
emoji: "3️⃣"
|
emoji: "3️⃣"
|
||||||
category: "Tickets"
|
category: "Tickets"
|
||||||
@@ -224,16 +226,21 @@ Departments:
|
|||||||
# --- Start ---
|
# --- Start ---
|
||||||
|
|
||||||
LockTicketCategory: "Archive"
|
LockTicketCategory: "Archive"
|
||||||
|
UnlockTicketCategory: "Tickets" #This moves the ticket back to the main category.
|
||||||
|
|
||||||
TicketCloseEmoji: "❌"
|
TicketCloseEmoji: "❌"
|
||||||
TicketDeleteEmoji: "⛔"
|
TicketDeleteEmoji: "⛔"
|
||||||
TicketLockEmoji: "🔒"
|
TicketLockEmoji: "🔒"
|
||||||
TicketClaimEmoji: "🧑💻"
|
TicketClaimEmoji: "🧑💻"
|
||||||
|
TicketUnlockEmoji: "🔓"
|
||||||
|
TicketUnclaimEmoji: "🧑💻"
|
||||||
|
|
||||||
TicketCloseColour: "DANGER"
|
TicketCloseColour: "DANGER"
|
||||||
TicketDeleteColour: "DANGER"
|
TicketDeleteColour: "DANGER"
|
||||||
TicketLockColour: "PRIMARY"
|
TicketLockColour: "PRIMARY"
|
||||||
TicketClaimColour: "SUCCESS"
|
TicketClaimColour: "SUCCESS"
|
||||||
|
TicketUnclaimColour: "DANGER"
|
||||||
|
TicketUnlockColour: "SUCCES"
|
||||||
|
|
||||||
# Discord Button Colour Selection
|
# Discord Button Colour Selection
|
||||||
# PRIMARY - Blue
|
# PRIMARY - Blue
|
||||||
|
|||||||
+166
-4
@@ -118,8 +118,14 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
.setStyle(supportbot.TicketDeleteColour)
|
.setStyle(supportbot.TicketDeleteColour)
|
||||||
.setEmoji(supportbot.TicketDeleteEmoji);
|
.setEmoji(supportbot.TicketDeleteEmoji);
|
||||||
|
|
||||||
|
const ticketUnlockButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketunlock")
|
||||||
|
.setLabel("Unlock")
|
||||||
|
.setStyle(supportbot.TicketUnlockColour)
|
||||||
|
.setEmoji(supportbot.TicketUnlockEmoji);
|
||||||
|
|
||||||
const row = new Discord.MessageActionRow().addComponents(
|
const row = new Discord.MessageActionRow().addComponents(
|
||||||
ticketDeleteButton
|
ticketDeleteButton, ticketUnlockButton
|
||||||
);
|
);
|
||||||
const ArchiveEmbed = new Discord.MessageEmbed()
|
const ArchiveEmbed = new Discord.MessageEmbed()
|
||||||
.setTitle("Archived")
|
.setTitle("Archived")
|
||||||
@@ -130,6 +136,81 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
interaction.message.edit({ components: [row] });
|
interaction.message.edit({ components: [row] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (interaction.customId === "ticketunlock") {
|
||||||
|
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
|
||||||
|
interaction.message.fetch();
|
||||||
|
let Admin =
|
||||||
|
interaction.guild.roles.cache.find(
|
||||||
|
(AdminUser) => AdminUser.name === supportbot.Admin
|
||||||
|
) ||
|
||||||
|
interaction.guild.roles.cache.find(
|
||||||
|
(AdminUser) => AdminUser.id === supportbot.Admin
|
||||||
|
);
|
||||||
|
if (!interaction.member.roles.cache.has(Admin.id)) {
|
||||||
|
return await interaction.reply({
|
||||||
|
content: "You don't have permission to do that.",
|
||||||
|
ephemeral: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let all = interaction.channel.permissionOverwrites.cache;
|
||||||
|
|
||||||
|
let parent =
|
||||||
|
interaction.guild.channels.cache.find(
|
||||||
|
(c) => c.name === supportbot.UnlockTicketCategory
|
||||||
|
) ||
|
||||||
|
interaction.guild.channels.cache.find(
|
||||||
|
(c) => c.id === supportbot.UnlockTicketCategory
|
||||||
|
);
|
||||||
|
if (parent) {
|
||||||
|
await interaction.channel.setParent(parent.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
all.forEach((perm) => {
|
||||||
|
interaction.channel.permissionOverwrites.create(perm.id, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
await interaction.channel.permissionOverwrites.create(Admin.id, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
await interaction.channel.permissionOverwrites.create(
|
||||||
|
interaction.guild.id,
|
||||||
|
{
|
||||||
|
VIEW_CHANNEL: false,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const CloseButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketclose")
|
||||||
|
.setLabel("Close")
|
||||||
|
.setStyle(supportbot.TicketCloseColour)
|
||||||
|
.setEmoji(supportbot.TicketCloseEmoji);
|
||||||
|
|
||||||
|
const LockButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketlock")
|
||||||
|
.setLabel("Lock")
|
||||||
|
.setStyle(supportbot.TicketLockColour)
|
||||||
|
.setEmoji(supportbot.TicketLockEmoji);
|
||||||
|
|
||||||
|
const TicketClaimButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketclaim")
|
||||||
|
.setLabel("Claim")
|
||||||
|
.setStyle(supportbot.TicketClaimColour)
|
||||||
|
.setEmoji(supportbot.TicketClaimEmoji);
|
||||||
|
|
||||||
|
const row = new Discord.MessageActionRow().addComponents(
|
||||||
|
CloseButton, LockButton, TicketClaimButton
|
||||||
|
);
|
||||||
|
const ArchiveEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Unarchived")
|
||||||
|
.setDescription(`Unarchived ${interaction.channel.name}`)
|
||||||
|
.setColor(supportbot.SuccessColour);
|
||||||
|
|
||||||
|
interaction.reply({ embeds: [ArchiveEmbed] });
|
||||||
|
interaction.message.edit({ components: [row] });
|
||||||
|
}
|
||||||
|
}
|
||||||
if (interaction.customId === "ticketclaim") {
|
if (interaction.customId === "ticketclaim") {
|
||||||
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
|
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
|
||||||
const Staff = await interaction.client.getRole(supportbot.Staff, interaction.guild);
|
const Staff = await interaction.client.getRole(supportbot.Staff, interaction.guild);
|
||||||
@@ -149,13 +230,35 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
let all = interaction.channel.permissionOverwrites.cache;
|
let all = interaction.channel.permissionOverwrites.cache;
|
||||||
|
|
||||||
|
const ticketUnclaimButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketunclaim")
|
||||||
|
.setLabel("Unclaim")
|
||||||
|
.setStyle(supportbot.TicketUnclaimColour)
|
||||||
|
.setEmoji(supportbot.TicketUnclaimEmoji);
|
||||||
|
|
||||||
|
const CloseButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketclose")
|
||||||
|
.setLabel("Close")
|
||||||
|
.setStyle(supportbot.TicketCloseColour)
|
||||||
|
.setEmoji(supportbot.TicketCloseEmoji);
|
||||||
|
|
||||||
|
const LockButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketlock")
|
||||||
|
.setLabel("Lock")
|
||||||
|
.setStyle(supportbot.TicketLockColour)
|
||||||
|
.setEmoji(supportbot.TicketLockEmoji);
|
||||||
|
|
||||||
|
const row = new Discord.MessageActionRow().addComponents(
|
||||||
|
CloseButton, LockButton, ticketUnclaimButton
|
||||||
|
);
|
||||||
const ArchiveEmbed = new Discord.MessageEmbed()
|
const ArchiveEmbed = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.TicketClaimTitle)
|
.setTitle(supportbot.TicketClaimTitle)
|
||||||
.setDescription(supportbot.TicketClaimMessage + " <@" + interaction.user.id + ">")
|
.setDescription(supportbot.TicketClaimMessage + " <@" + interaction.user.id + ">")
|
||||||
.setColor(supportbot.EmbedColour);
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
interaction.reply({ embeds: [ArchiveEmbed] });
|
interaction.reply({ embeds: [ArchiveEmbed]});
|
||||||
|
interaction.message.edit({ components: [row] });
|
||||||
await interaction.channel.permissionOverwrites.edit(Staff.id, {
|
await interaction.channel.permissionOverwrites.edit(Staff.id, {
|
||||||
VIEW_CHANNEL: true,
|
VIEW_CHANNEL: true,
|
||||||
SEND_MESSAGES: false,
|
SEND_MESSAGES: false,
|
||||||
@@ -167,4 +270,63 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
if (interaction.customId === "ticketunclaim") {
|
||||||
|
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
|
||||||
|
const Staff = await interaction.client.getRole(supportbot.Staff, interaction.guild);
|
||||||
|
interaction.message.fetch();
|
||||||
|
let User = interaction.guild.members.cache.get(interaction.user.id);
|
||||||
|
let Admin =
|
||||||
|
interaction.guild.roles.cache.find(
|
||||||
|
(AdminUser) => AdminUser.name === supportbot.Admin
|
||||||
|
) ||
|
||||||
|
interaction.guild.roles.cache.find(
|
||||||
|
(AdminUser) => AdminUser.id === supportbot.Admin
|
||||||
|
);
|
||||||
|
if (!interaction.member.roles.cache.has(Admin.id)) {
|
||||||
|
return await interaction.reply({
|
||||||
|
content: "You don't have permission to do that.",
|
||||||
|
ephemeral: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let all = interaction.channel.permissionOverwrites.cache;
|
||||||
|
|
||||||
|
const CloseButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketclose")
|
||||||
|
.setLabel("Close")
|
||||||
|
.setStyle(supportbot.TicketCloseColour)
|
||||||
|
.setEmoji(supportbot.TicketCloseEmoji);
|
||||||
|
|
||||||
|
const LockButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketlock")
|
||||||
|
.setLabel("Lock")
|
||||||
|
.setStyle(supportbot.TicketLockColour)
|
||||||
|
.setEmoji(supportbot.TicketLockEmoji);
|
||||||
|
|
||||||
|
const TicketClaimButton = new Discord.MessageButton()
|
||||||
|
.setCustomId("ticketclaim")
|
||||||
|
.setLabel("Claim")
|
||||||
|
.setStyle(supportbot.TicketClaimColour)
|
||||||
|
.setEmoji(supportbot.TicketClaimEmoji);
|
||||||
|
|
||||||
|
const row = new Discord.MessageActionRow().addComponents(
|
||||||
|
CloseButton, LockButton, TicketClaimButton
|
||||||
|
);
|
||||||
|
const ArchiveEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.TicketUnclaimTitle)
|
||||||
|
.setDescription(supportbot.TicketUnclaimMessage + " <@" + interaction.user.id + ">")
|
||||||
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
|
interaction.reply({ embeds: [ArchiveEmbed]});
|
||||||
|
interaction.message.edit({ components: [row] });
|
||||||
|
await interaction.channel.permissionOverwrites.edit(Staff.id, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
await interaction.channel.permissionOverwrites.edit(interaction.user.id, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
Use this section to tell people about which versions of your project are
|
||||||
|
currently being supported with security updates.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 7.7.2 | :white_check_mark: |
|
||||||
|
| 7.7.1 | :white_check_mark: |
|
||||||
|
| < 4.0 | :x: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
Use this section to tell people how to report a vulnerability.
|
||||||
|
|
||||||
|
Tell them where to go, how often they can expect to get an update on a
|
||||||
|
reported vulnerability, what to expect if the vulnerability is accepted or
|
||||||
|
declined, etc.
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "supportbot",
|
||||||
"version": "7.7.2",
|
"version": "7.7.3",
|
||||||
"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.",
|
"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",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in new issue
Block a user