UNPKG

artibot

Version:

Modern, fast and modular open-source Discord bot

20 lines 701 B
/** Ping slash command */ export default async function execute(interaction, { config, localizer, createEmbed }) { const embed = createEmbed().setTitle("Ping"); if (config.advancedCorePing) { embed.setDescription(localizer.__("Pong!\n\nThe bot's latency is [[0]]ms.\nThe API's latency is [[1]]ms.", { placeholders: [ Math.abs(Date.now() - interaction.createdTimestamp).toString(), Math.round(interaction.client.ws.ping).toString() ] })); } else { embed.setDescription(`Pong!`); } await interaction.reply({ embeds: [embed], ephemeral: true }); } //# sourceMappingURL=ping.js.map