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
Raw Normal View History

2021-01-23 01:08:05 -06:00
module.exports = {
name: "ping",
description: "Gets bot ping",
2022-03-17 21:48:56 -05:00
execute(client, message) {
2022-03-19 10:43:33 -05:00
const {footerTxt, locations} = require('../config.json');
2022-03-17 21:48:56 -05:00
2022-03-19 10:43:33 -05:00
const index = Math.floor(Math.random() * (locations.length -1 ) + 1);
PingLocation = locations[index]
const embed = {
2021-01-23 01:08:05 -06:00
"title": ":ping_pong: Ping",
2022-03-19 10:43:33 -05:00
"description": "**Pong!** We pinged **" + PingLocation + "** and got " + client.ws.ping + " ms.",
2022-03-17 21:48:56 -05:00
"color": 9442302,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
}
message.channel.send({ embed });
2021-01-23 01:08:05 -06:00
}
};