fix bad code

This commit is contained in:
Noah committed 2022-02-11 23:47:06 -06:00
1 parent 9b6263e583
commit 3aa373c33c
7 files changed
+11 -11

No files matched your search

+4 -4
View File
@@ -67,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(
@@ -86,10 +86,10 @@ 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) {
await interaction.channel.setParent(parent.id);
@@ -121,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] });
+2 -2
View File
@@ -164,7 +164,7 @@ module.exports = new Event("ready", async (client) => {
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
let embed = new Discord.MessageEmbed()
.setTitle(`${panelconfig.PanelTitle}`)
.setTitle(panelconfig.PanelTitle)
.setColor(supportbot.SuccessColour)
.setFooter(supportbot.EmbedFooter);
@@ -205,7 +205,7 @@ module.exports = new Event("ready", async (client) => {
.then((r) => {
let data = {
id: panelid.id,
TicketPanelID: `${r.id}`,
TicketPanelID: r.id,
};
fs.writeFileSync(
"./Data/ticket-panel-id.json",