artibot
Version:
Modern, fast and modular open-source Discord bot
18 lines • 664 B
JavaScript
/** Ping command */
export default async function execute(message, args, { config, createEmbed, localizer }) {
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() - message.createdTimestamp).toString(),
Math.round(message.client.ws.ping).toString()
]
}));
}
else {
embed.setDescription(`Pong!`);
}
await message.channel.send({ embeds: [embed] });
}
//# sourceMappingURL=ping.js.map