const { EmbedBuilder, SlashCommandBuilder, Integration } = require('discord.js');
const wait = require('node:timers/promises').setTimeout;
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Gets Bot and API ping'),
async execute(interaction) {
const pingEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Calculating Bot Ping...')
await interaction.reply({ embeds: [pingEmbed]})
const apiPing = client.ws.ping;
const botPing = interaction.createdTimestamp - message.createdTimestamp;
const pingFinalEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Ping')
.setDescription(`**API Ping:** ${apiPing}ms\n**Bot Ping:** ${botPing}ms`)
await wait(2000);
await interaction.editReply({ embeds: [pingFinalEmbed]});
}
}
const { EmbedBuilder, SlashCommandBuilder, Integration } = require('discord.js');
const wait = require('node:timers/promises').setTimeout;
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Gets Bot and API ping'),
async execute(interaction) {
const pingEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Calculating Bot Ping...')
await interaction.reply({ embeds: [pingEmbed]})
const apiPing = client.ws.ping;
const botPing = interaction.createdTimestamp - message.createdTimestamp;
const pingFinalEmbed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('Ping')
.setDescription(`**API Ping:** ${apiPing}ms\n**Bot Ping:** ${botPing}ms`)
await wait(2000);
await interaction.editReply({ embeds: [pingFinalEmbed]});
}
}