21 lines
679 B
TypeScript
21 lines
679 B
TypeScript
import { CommandInteraction, Client } from 'discord.js'
|
|
import { SlashCommandBuilder } from '@discordjs/builders'
|
|
|
|
export const data = new SlashCommandBuilder()
|
|
.setName('mark')
|
|
.setDescription('Set a mark for a card')
|
|
.addIntegerOption((option) =>
|
|
option
|
|
.setName('point')
|
|
.setDescription('Set a point for card')
|
|
.setRequired(true)
|
|
)
|
|
|
|
export async function execute(interaction: CommandInteraction, client: Client) {
|
|
if (!interaction?.channelId) return
|
|
const channel = await client.channels.fetch(interaction.channelId)
|
|
if (!channel) return
|
|
const point = interaction.options.getInteger('point')
|
|
interaction.reply(`Mark set to ${point}`)
|
|
}
|