Added types for subcommands
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user