Ping command example
Easy Setup & Options Object
const { ChatInputCommand } = require('sl-commands')
new ChatInputCommand()
// The command name (required)
.setName('ping')
// The command description (required)
.setDescription('Shows my ping')
// Only register for the testing servers
.setTestOnly(true)
// Executed whenever the command is used
.onExecute(({ client, interaction }) => {
// Replying the slash command interaction
interaction.reply(`API's ping is ${client.ws.ping}`)
})import { ChatInputCommand } from 'sl-commands'
new ChatInputCommand()
// The command name (required)
.setName('ping')
// The command description (required)
.setDescription('Shows my ping')
// Only register for the testing servers
.setTestOnly(true)
// Executed whenever the command is used
.onExecute(({ client, interaction }) => {
// Replying the slash command interaction
interaction.reply(`API's ping is ${client.ws.ping}`)
})Last updated