This commit is contained in:
hackermon 2022-12-01 21:39:31 -05:00 committed by GitHub
parent 3b30bc2e7d
commit 337e09340d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
app.js
View File

@ -24,7 +24,7 @@ const rl = createInterface({ input: process.stdin, output: process.stdout });
client.on('interactionCreate', (interaction) => { client.on('interactionCreate', (interaction) => {
if (interaction.commandName === 'ping') { if (interaction.commandName === 'ping') {
interaction.reply(`Latency is ${Date.now() - message.createdTimestamp}ms. API Latency is ${Math.round(client.ws.ping)}ms`); interaction.reply(`Latency is ${Date.now() - interaction.createdTimestamp}ms. API Latency is ${Math.round(client.ws.ping)}ms`);
} else if(interaction.commandName === 'command2') { // This is the example command's name! } else if(interaction.commandName === 'command2') { // This is the example command's name!
interaction.reply('example command'); interaction.reply('example command');
} else { // a response if you forget to add the command here } else { // a response if you forget to add the command here