-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-slash.js
22 lines (21 loc) · 1 KB
/
example-slash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module.exports = {
name: 'ping',
description: 'Very simple example of a command to understand how to use this template',
usage: '<prefix>example [ping]', //OPTIONAL (for the help cmd)
examples: ['example', 'example ping:true'], //OPTIONAL (for the help cmd)
category: "public",
cooldown: 1, // Cooldown in seconds, by default it's 2 seconds | OPTIONAL
permissions: [], // OPTIONAL
// options: [
// {
// name: 'ping',
// description: "Get the bot's latency",
// type: 3, required: false,
// choices: [ { name: "yes", value: 'true' }, { name: "no", value: 'false' } ]
// }
// ], // OPTIONAL, (/) command options ; read https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
run: async (client, interaction) => {
await interaction.deferReply({ ephemeral: false });
interaction.editReply(`Pong! ${client.ws.ping}ms`)
}
}