import {ApplicationCommandOptionType, ApplicationCommandSubCommandData, ChatInputCommandInteraction} from "discord.js"
import {SubcommandData} from "../types"

class CharacterCreateCommandData extends SubcommandData {
    readonly definition: ApplicationCommandSubCommandData = {
        name: "create",
        type: ApplicationCommandOptionType.Subcommand,
        description: "Begins the process of creating a new character.",
        options: [
            {
                name: "name",
                type: ApplicationCommandOptionType.String,
                description: "The character's name.",
                required: false,
            },
            {
                name: "title",
                type: ApplicationCommandOptionType.String,
                description: "A title for your character, optionally starting or ending with an ellipsis (...).",
                required: false,
            },
        ],
    }

    async execute(b: ChatInputCommandInteraction) {
        await b.deferReply({ephemeral: true})
        await b.reply("Okaaaay, I'll make you a character ❤\n\nRight after this nap...")
    }
}

export const commandCharacterCreate = new CharacterCreateCommandData()