Slash Commands
Slash commands are a new feature implemented into Discord and CDHandler, so they can have some "bugs"
Slash Command Options
Examples
// File Name - ping.js
const { MessageEmbed } = require('discord.js')
module.exports = {
name: "ping",
slash: true,
servers: ['814832821125775420'],
description: "poggers",
run: ({ message, args, client, handler, interaction }) => {
return "Pong!" // message which will be sent, always include return to don't crash
},
};// File Name - ping.ts
import { MessageEmbed } from 'discord.js'
export default {
name: "ping",
slash: true,
servers: ['814832821125775420'],
description: "yo cannon is cool",
run: ({ message, args, client, handler, interaction }: any) => {
return "Pong!" // message which will be sent, always include return to don't crash
},
};Last updated
Was this helpful?