29 lines
No EOL
1.1 KiB
TypeScript
29 lines
No EOL
1.1 KiB
TypeScript
import { ChatInputCommandInteraction, MessageFlags, SlashCommandSubcommandBuilder } from "discord.js";
|
|
import { defineCommand } from "../command";
|
|
import { setUserSupertonicStyle } from "../db";
|
|
import { SUPERTONIC_STYLE_LIST } from "../../env";
|
|
|
|
export default defineCommand(
|
|
new SlashCommandSubcommandBuilder()
|
|
.setName("슈퍼토닉목소리")
|
|
.setDescription("예주의 슈퍼토닉 목소리 스타일을 설정해요")
|
|
.addStringOption(option =>
|
|
option
|
|
.setName("style")
|
|
.setDescription("사용할수 있는 목소리들이에요")
|
|
.setRequired(true)
|
|
.addChoices(
|
|
...SUPERTONIC_STYLE_LIST
|
|
)
|
|
),
|
|
async (interaction: ChatInputCommandInteraction): Promise<any> => {
|
|
await interaction.deferReply({
|
|
flags: [MessageFlags.Ephemeral]
|
|
});
|
|
|
|
const style = interaction.options.getString("voice") as string;
|
|
setUserSupertonicStyle(interaction.user.id, style);
|
|
|
|
await interaction.editReply("예주의 목소리 스타일을 변경했어요!");
|
|
}
|
|
) |