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) {
|
if (ticket === -1) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(supportbot.NoValidTicket)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
return interaction.reply({ embeds: [Exists] });
|
return interaction.reply({ embeds: [Exists] });
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ module.exports = new Command({
|
|||||||
if (TicketData === -1) {
|
if (TicketData === -1) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(supportbot.NoValidTicket)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
return interaction.followUp({ embeds: [Exists] });
|
return interaction.followUp({ embeds: [Exists] });
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ module.exports = new Command({
|
|||||||
if (ticket === -1) {
|
if (ticket === -1) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(supportbot.NoValidTicket)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
return interaction.reply({ embeds: [Exists] });
|
return interaction.reply({ embeds: [Exists] });
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ module.exports = new Command({
|
|||||||
|
|
||||||
const NoChannel = new Discord.MessageEmbed()
|
const NoChannel = new Discord.MessageEmbed()
|
||||||
.setTitle("Missing Channel!")
|
.setTitle("Missing Channel!")
|
||||||
.setDescription(`${supportbot.InvalidChannel}`)
|
.setDescription(supportbot.InvalidChannel)
|
||||||
.setColor(supportbot.ErrorColour);
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
if (!suggestChannel) return interaction.reply({ embeds: [NoChannel] });
|
if (!suggestChannel) return interaction.reply({ embeds: [NoChannel] });
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@ module.exports = new Command({
|
|||||||
|
|
||||||
const TicketExists = new MessageEmbed()
|
const TicketExists = new MessageEmbed()
|
||||||
.setTitle("Ticket Exists!")
|
.setTitle("Ticket Exists!")
|
||||||
.setDescription(`${supportbot.TicketExists}`);
|
.setDescription(supportbot.TicketExists);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
await interaction.guild.channels.cache.find(
|
await interaction.guild.channels.cache.find(
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (interaction.customId === "ticketlock") {
|
if (interaction.customId === "ticketlock") {
|
||||||
if (interaction.channel.name.startsWith(`${supportbot.TicketPrefix}`)) {
|
if (interaction.channel.name.startsWith(supportbot.TicketPrefix)) {
|
||||||
interaction.message.fetch();
|
interaction.message.fetch();
|
||||||
let Admin =
|
let Admin =
|
||||||
interaction.guild.roles.cache.find(
|
interaction.guild.roles.cache.find(
|
||||||
@@ -86,10 +86,10 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
|
|
||||||
let parent =
|
let parent =
|
||||||
interaction.guild.channels.cache.find(
|
interaction.guild.channels.cache.find(
|
||||||
(c) => c.name === `${supportbot.LockTicketCategory}`
|
(c) => c.name === supportbot.LockTicketCategory
|
||||||
) ||
|
) ||
|
||||||
interaction.guild.channels.cache.find(
|
interaction.guild.channels.cache.find(
|
||||||
(c) => c.id === `${supportbot.LockTicketCategory}`
|
(c) => c.id === supportbot.LockTicketCategory
|
||||||
);
|
);
|
||||||
if (parent) {
|
if (parent) {
|
||||||
await interaction.channel.setParent(parent.id);
|
await interaction.channel.setParent(parent.id);
|
||||||
@@ -121,7 +121,7 @@ module.exports = new Event("interactionCreate", async (client, interaction) => {
|
|||||||
const ArchiveEmbed = new Discord.MessageEmbed()
|
const ArchiveEmbed = new Discord.MessageEmbed()
|
||||||
.setTitle("Archived")
|
.setTitle("Archived")
|
||||||
.setDescription(`Archived ${interaction.channel.name}`)
|
.setDescription(`Archived ${interaction.channel.name}`)
|
||||||
.setColor(`${supportbot.SuccessColour}`);
|
.setColor(supportbot.SuccessColour);
|
||||||
|
|
||||||
interaction.reply({ embeds: [ArchiveEmbed] });
|
interaction.reply({ embeds: [ArchiveEmbed] });
|
||||||
interaction.message.edit({ components: [row] });
|
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 () => {
|
chan1.messages.fetch(panelid.TicketPanelID).catch(async () => {
|
||||||
let embed = new Discord.MessageEmbed()
|
let embed = new Discord.MessageEmbed()
|
||||||
.setTitle(`${panelconfig.PanelTitle}`)
|
.setTitle(panelconfig.PanelTitle)
|
||||||
.setColor(supportbot.SuccessColour)
|
.setColor(supportbot.SuccessColour)
|
||||||
.setFooter(supportbot.EmbedFooter);
|
.setFooter(supportbot.EmbedFooter);
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ module.exports = new Event("ready", async (client) => {
|
|||||||
.then((r) => {
|
.then((r) => {
|
||||||
let data = {
|
let data = {
|
||||||
id: panelid.id,
|
id: panelid.id,
|
||||||
TicketPanelID: `${r.id}`,
|
TicketPanelID: r.id,
|
||||||
};
|
};
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
"./Data/ticket-panel-id.json",
|
"./Data/ticket-panel-id.json",
|
||||||
|
|||||||
Reference in new issue
Block a user