From d47a280bad1b0b0e79a80818810e4a1ce8713b0a Mon Sep 17 00:00:00 2001 From: IDeletedSystem64 Date: Sat, 19 Mar 2022 10:43:33 -0500 Subject: [PATCH] Now pinging locations. --- commands/ping.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commands/ping.js b/commands/ping.js index bff4bc0..bfd0020 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -2,11 +2,13 @@ module.exports = { name: "ping", description: "Gets bot ping", execute(client, message) { - const {footerTxt} = require('../config.json'); + const {footerTxt, locations} = require('../config.json'); - const embed = { + const index = Math.floor(Math.random() * (locations.length -1 ) + 1); + PingLocation = locations[index] + const embed = { "title": ":ping_pong: Ping", - "description": "**Pong!** " + client.ws.ping + " ms.", + "description": "**Pong!** We pinged **" + PingLocation + "** and got " + client.ws.ping + " ms.", "color": 9442302, "footer": { "icon_url": message.author.displayAvatarURL(),