fix bad code
This commit is contained in:
1 parent
9b6263e583
commit
3aa373c33c
7 files changed
+11
-11
No files matched your search
+1
-1
@@ -56,7 +56,7 @@ module.exports = new Command({
|
||||
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] });
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ module.exports = new Command({
|
||||
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] });
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ module.exports = new Command({
|
||||
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] });
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,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] });
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ module.exports = new Command({
|
||||
|
||||
const TicketExists = new MessageEmbed()
|
||||
.setTitle("Ticket Exists!")
|
||||
.setDescription(`${supportbot.TicketExists}`);
|
||||
.setDescription(supportbot.TicketExists);
|
||||
|
||||
if (
|
||||
await interaction.guild.channels.cache.find(
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user