mirror of
https://github.com/gabrielkheisa/discord-active-developer-badge.git
synced 2024-11-22 11:32:00 +07:00
commit
3b30bc2e7d
4
app.js
4
app.js
@ -5,7 +5,7 @@ const { Client, Routes } = require('discord.js');
|
|||||||
|
|
||||||
const ping = {
|
const ping = {
|
||||||
name: 'ping',
|
name: 'ping',
|
||||||
description: 'yes'
|
description: 'Pings the bot and shows the latency'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -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('yes');
|
interaction.reply(`Latency is ${Date.now() - message.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
|
||||||
|
Loading…
Reference in New Issue
Block a user