changes to how deleting tickets works, and UI when creating mod tickets
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index d81a5cc..b2cc94e 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -6,7 +6,6 @@
import confirmationMessage from "../../utils/confirmationMessage.js";
import keyValueList from "../../utils/generateKeyValueList.js";
import humanizeDuration from "humanize-duration";
-import { create, areTicketsEnabled } from "../../automations/createModActionTicket.js";
import readConfig from "../../utils/readConfig.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
diff --git a/src/commands/mod/nick.ts b/src/commands/mod/nick.ts
index cd3a7af..e8463f4 100644
--- a/src/commands/mod/nick.ts
+++ b/src/commands/mod/nick.ts
@@ -29,10 +29,10 @@
+ `The user **will${interaction.options.getString("notify") == "yes" ? '' : ' not'}** be notified\n\n`
+ `Are you sure you want to ${interaction.options.getString("name") ? "change" : "clear"} <@!${(interaction.options.getMember("user") as GuildMember).id}>'s nickname?`)
.setColor("Danger")
- .addCustomCallback(
+ .addCustomBoolean(
"Create appeal ticket", !(await areTicketsEnabled(interaction.guild.id)),
- () => { create(interaction.guild, interaction.options.getUser("user"), interaction.client)},
- "An appeal ticket was created")
+ async () => await create(interaction.guild, interaction.options.getUser("user"), interaction.user, interaction.client),
+ "An appeal ticket will be created when Confirm is clicked")
// pluralize("day", interaction.options.getInteger("delete"))
// const pluralize = (word: string, count: number) => { return count === 1 ? word : word + "s" }
.send()
@@ -96,7 +96,7 @@
await interaction.editReply({embeds: [new generateEmojiEmbed()
.setEmoji(`PUNISH.NICKNAME.${failed ? "YELLOW" : "GREEN"}`)
.setTitle(`Nickname`)
- .setDescription("The members nickname was changed" + (failed ? ", but was not notified" : ""))
+ .setDescription("The members nickname was changed" + (failed ? ", but was not notified" : "") + (confirmation.response ? ` and an appeal ticket was opened in <#${confirmation.response}>` : ``))
.setStatus(failed ? "Warning" : "Success")
], components: []})
} else {
diff --git a/src/commands/mod/purge.ts b/src/commands/mod/purge.ts
index e388ea0..924e507 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -5,7 +5,6 @@
import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
import keyValueList from "../../utils/generateKeyValueList.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
-import { create, areTicketsEnabled } from "../../automations/createModActionTicket.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
diff --git a/src/commands/mod/unnamed.ts b/src/commands/mod/unnamed.ts
index 20ebc30..ca0bcef 100644
--- a/src/commands/mod/unnamed.ts
+++ b/src/commands/mod/unnamed.ts
@@ -129,10 +129,10 @@
+ `The user **will${interaction.options.getString("notify") === "no" ? ' not' : ''}** be notified\n\n`
+ `Are you sure you want to mute <@!${(interaction.options.getMember("user") as GuildMember).id}>?`) // TODO
.setColor("Danger")
- .addCustomCallback(
+ .addCustomBoolean(
"Create appeal ticket", !(await areTicketsEnabled(interaction.guild.id)),
- () => { create(interaction.guild, interaction.options.getUser("user"), interaction.client)},
- "An appeal ticket was created")
+ async () => await create(interaction.guild, interaction.options.getUser("user"), interaction.user, interaction.client),
+ "An appeal ticket will be created when Confirm is clicked")
// pluralize("day", interaction.options.getInteger("delete"))
// const pluralize = (word: string, count: number) => { return count === 1 ? word : word + "s" }
.send()
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index 3f63cce..ce54cfb 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -30,10 +30,10 @@
+ `The user **will${interaction.options.getString("notify") === "no" ? ' not' : ''}** be notified\n\n`
+ `Are you sure you want to warn <@!${(interaction.options.getMember("user") as GuildMember).id}>?`)
.setColor("Danger")
- .addCustomCallback(
+ .addCustomBoolean(
"Create appeal ticket", !(await areTicketsEnabled(interaction.guild.id)),
- () => { create(interaction.guild, interaction.options.getUser("user"), interaction.client)},
- "An appeal ticket was created")
+ async () => await create(interaction.guild, interaction.options.getUser("user"), interaction.user, interaction.client),
+ "An appeal ticket will be created when Confirm is clicked")
// pluralize("day", interaction.options.getInteger("delete"))
// const pluralize = (word: string, count: number) => { return count === 1 ? word : word + "s" }
.send()
@@ -85,7 +85,7 @@
await interaction.editReply({embeds: [new generateEmojiEmbed()
.setEmoji(`PUNISH.WARN.GREEN`)
.setTitle(`Warn`)
- .setDescription("The user was warned")
+ .setDescription("The user was warned" + (confirmation.response ? ` and an appeal ticket was opened in <#${confirmation.response}>` : ``))
.setStatus("Success")
], components: []})
} else {
@@ -135,7 +135,7 @@
return await interaction.editReply({embeds: [new generateEmojiEmbed()
.setEmoji(`PUNISH.WARN.GREEN`)
.setTitle(`Warn`)
- .setDescription("The user was warned")
+ .setDescription("The user was warned" + (confirmation.response ? ` and an appeal ticket was opened in <#${confirmation.response}>` : ``))
.setStatus("Success")
], components: []})
} else {