diff --git a/commands/ping.js b/commands/ping.js index 32c097a..b12e186 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -1,19 +1,17 @@ -const { locations } = require('../config.json'); - module.exports = { name: "ping", description: "Gets bot ping", - async execute(client, message, _, footerTxt) { - const index = Math.floor(Math.random() * locations.length); - const pingLocation = locations[index] + async execute(client, message, args, config) { + const index = Math.floor(Math.random() * config.locations.length); + const location = config.locations[index] await message.channel.send({embed:{ "title": ":ping_pong: Ping", - "description": `**Pong!** We pinged **${pingLocation}** and got ${client.ws.ping} ms.`, + "description": `**Pong!** We pinged **${location}** and got ${client.ws.ping} ms.`, "color": 9442302, "footer": { "icon_url": message.author.displayAvatarURL(), - "text": footerTxt + "text": config.footerTxt } }}); }