Fixed formatting on all command files

This commit is contained in:
2024-01-20 17:19:08 +01:00
parent f34923e2c5
commit a3791d170c
25 changed files with 655 additions and 1168 deletions

View File

@@ -1,8 +1,4 @@
import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention
} from "discord.js"
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
import { color, devMessage } from "config/options.json"
import waitinglistSchema from "schemas/waitinglistSchema"
import { Command } from "interfaces"
@@ -36,8 +32,7 @@ export = {
await interaction.deferReply()
const user = interaction.options.getUser("user")!
const reason =
interaction.options.getString("reason") ?? "No reason provided."
const reason = interaction.options.getString("reason") ?? "No reason provided."
const mod = interaction.user!
const embedColor = Number(color.replace("#", "0x"))
@@ -45,14 +40,10 @@ export = {
if (!waitinglist) {
await interaction.editReply({
embeds: [
{
description:
userMention(user.id) +
" is not on the waiting list.",
color: embedColor
}
]
embeds: [{
description: userMention(user.id) + " is not on the waiting list.",
color: embedColor
}]
})
return
}
@@ -60,49 +51,40 @@ export = {
await waitinglistSchema.findOneAndDelete({ userID: user.id })
await logToChannel("mod", {
embeds: [
{
author: {
name: mod.username,
icon_url: mod.avatarURL() || undefined
},
title: "Waiting List - Remove User",
description: `
embeds: [{
author: {
name: mod.username,
icon_url: mod.avatarURL() || undefined
},
title: "Waiting List - Remove User",
description: `
**User:** ${userMention(user.id)}
**Reason:** ${reason}
**Mod:** ${userMention(mod.id)}
`,
color: embedColor,
thumbnail: {
url: mod.avatarURL() || ""
},
footer: {
icon_url: user.avatarURL() || undefined,
text: "ID: " + user.id
},
timestamp: new Date().toISOString()
}
]
color: embedColor,
thumbnail: {
url: mod.avatarURL() || ""
},
footer: {
icon_url: user.avatarURL() || undefined,
text: "ID: " + user.id
},
timestamp: new Date().toISOString()
}]
})
await interaction.editReply({
embeds: [
{
title: "Waiting List - Remove User",
description:
"**User:** " +
userMention(user.id) +
"\n" +
"**Reason:** `" +
reason +
"`",
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined
}
embeds: [{
title: "Waiting List - Remove User",
description: "**User:** " + userMention(user.id) + "\n" +
"**Reason:** `" + reason + "`",
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined
}
]
}]
})
}
} as Command