Added types for subcommands

This commit is contained in:
2025-01-12 19:40:20 +01:00
parent 53914fa9dd
commit 560ad899f8
19 changed files with 81 additions and 42 deletions

View File

@@ -1,8 +1,9 @@
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
import { GuildMember, userMention } from "discord.js"
import { devMessage, embedColor } from "~/config/options.js"
import { countingBanned } from "~/config/roles.js"
import { SubCommand } from "~/typings"
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
const cmd: SubCommand = async (interaction) => {
const member = interaction.options.getMember("user")! as GuildMember
if (member.roles.cache.has(countingBanned)) {
@@ -31,3 +32,5 @@ export default async function ban(interaction: ChatInputCommandInteraction): Pro
})
}
}
export default cmd