poixpixel-discord-bot/source/commands/ping.ts

17 lines
No EOL
463 B
TypeScript

import { SlashCommandBuilder, CommandInteraction } from 'discord.js';
interface Command {
data: Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">;
execute: (interaction: CommandInteraction) => Promise<void>;
}
const command: Command = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
execute: async (interaction) => {
await interaction.reply(`Pong!`);
},
};
export default command;