create-discord-forge
Version:
A CLI made with Commander to create a Discord and easily add advanced features to your bot made with discord.js in TypeScript or JavaScript
16 lines (12 loc) • 415 B
text/typescript
import { SlashCommandBuilder } from 'discord.js';
import type { ChatInputCommandInteraction } from 'discord.js';
export const data = new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!');
export async function execute(interaction: ChatInputCommandInteraction) {
if (!interaction.isCommand()) return;
interaction.reply({
content: 'Pong!',
ephemeral: true,
});
}