Fixed more formatting

This commit is contained in:
2024-01-19 18:40:45 +01:00
parent 0a315b18ed
commit ee217d5f64
15 changed files with 349 additions and 633 deletions

View File

@@ -1,48 +1,34 @@
import {
ChatInputCommandInteraction,
GuildMember,
userMention,
} from "discord.js"
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
import { countingBanned } from "config/roles.json"
import { color, devMessage } from "config/options.json"
export default async function ban(
interaction: ChatInputCommandInteraction,
): Promise<void> {
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
const member = interaction.options.getMember("user")! as GuildMember
const embedColor = Number(color.replace("#", "0x"))
if (member.roles.cache.has(countingBanned)) {
await interaction.reply({
embeds: [
{
description:
userMention(member.user.id) +
" is currently banned from counting",
color: embedColor,
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
embeds: [{
description: userMention(member.user.id) + " is currently banned from counting",
color: embedColor,
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage
}
}]
})
} else {
await member.roles.add(countingBanned)
await interaction.reply({
embeds: [
{
description:
userMention(member.user.id) +
" has been banned from counting",
color: embedColor,
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
embeds: [{
description: userMention(member.user.id) + " has been banned from counting",
color: embedColor,
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage
}
}]
})
}
}