Fixed typing
diff --git a/src/commands/mod/warn.ts b/src/commands/mod/warn.ts
index 8408303..232219b 100644
--- a/src/commands/mod/warn.ts
+++ b/src/commands/mod/warn.ts
@@ -1,4 +1,11 @@
-import Discord, { CommandInteraction, GuildMember, ActionRowBuilder, ButtonBuilder, ButtonStyle, ButtonInteraction } from "discord.js";
+import Discord, {
+ CommandInteraction,
+ GuildMember,
+ ActionRowBuilder,
+ ButtonBuilder,
+ ButtonStyle,
+ ButtonInteraction
+} from "discord.js";
import type { SlashCommandSubcommandBuilder } from "discord.js";
import confirmationMessage from "../../utils/confirmationMessage.js";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
@@ -14,7 +21,10 @@
.setDescription("Warns a user")
.addUserOption((option) => option.setName("user").setDescription("The user to warn").setRequired(true));
-const callback = async (interaction: CommandInteraction | ButtonInteraction, member?: GuildMember): Promise<unknown> => {
+const callback = async (
+ interaction: CommandInteraction | ButtonInteraction,
+ member?: GuildMember
+): Promise<unknown> => {
if (!interaction.guild) return;
const { log, NucleusColors, renderUser, entry } = client.logger;
if (!interaction.isButton()) member = interaction.options.getMember("user") as GuildMember;
@@ -41,8 +51,7 @@
"appeal",
"Create appeal ticket",
!(await areTicketsEnabled(interaction.guild.id)),
- async () =>
- await create(interaction.guild!, member!.user, interaction.user, reason),
+ async () => await create(interaction.guild!, member!.user, interaction.user, reason),
"An appeal ticket will be created",
null,
"CONTROL.TICKET",
@@ -110,12 +119,7 @@
new ButtonBuilder()
.setStyle(ButtonStyle.Link)
.setLabel(config.moderation.warn.text)
- .setURL(
- config.moderation.warn.link.replaceAll(
- "{id}",
- member.id
- )
- )
+ .setURL(config.moderation.warn.link.replaceAll("{id}", member.id))
)
);
}
@@ -135,10 +139,7 @@
timestamp: Date.now()
},
list: {
- user: entry(
- member.user.id,
- renderUser(member.user)
- ),
+ user: entry(member.user.id, renderUser(member.user)),
warnedBy: entry(interaction.member!.user.id, renderUser(interaction.member!.user as Discord.User)),
reason: reason ? reason : "*No reason provided*"
},
@@ -151,13 +152,7 @@
guild: interaction.guild.id
}
};
- await client.database.history.create(
- "warn",
- interaction.guild.id,
- member.user,
- interaction.user,
- reason
- );
+ await client.database.history.create("warn", interaction.guild.id, member.user, interaction.user, reason);
log(data);
const failed = !dmSent && notify;
if (!failed) {
@@ -179,9 +174,7 @@
components: []
});
} else {
- const canSeeChannel = member
- .permissionsIn(interaction.channel as Discord.TextChannel)
- .has("ViewChannel");
+ const canSeeChannel = member.permissionsIn(interaction.channel as Discord.TextChannel).has("ViewChannel");
const m = (await interaction.editReply({
embeds: [
new EmojiEmbed()