first commit
This commit is contained in:
20
src/commands/mark.ts
Normal file
20
src/commands/mark.ts
Normal file
@ -0,0 +1,20 @@
|
||||
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}`)
|
||||
}
|
Reference in New Issue
Block a user