This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
anitrox/commands/ping.js

22 lines
573 B
JavaScript

module.exports = {
name: "ping",
description: "Gets bot ping",
execute(client, message) {
const {footerTxt, locations} = require('../config.json');
const index = Math.floor(Math.random() * (locations.length -1 ) + 1);
PingLocation = locations[index]
const embed = {
"title": ":ping_pong: Ping",
"description": "**Pong!** We pinged **" + PingLocation + "** and got " + client.ws.ping + " ms.",
"color": 9442302,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
}
message.channel.send({ embed });
}
};