From 0ae13edd23f194636320a50bfa7750b9b9a5697f Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Thu, 5 Jan 2023 15:19:20 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B2=D0=B8?= =?UTF-8?q?=D0=B4=20=D0=B4=D0=BB=D1=8F=20ping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/General/ping.js | 19 ++++++++++++++++--- languages/ru-RU/general/ping.json | 3 ++- languages/uk-UA/general/ping.json | 3 ++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/commands/General/ping.js b/commands/General/ping.js index 930c86fe..89dab4fe 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder } = require("discord.js"); +const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Ping extends BaseCommand { @@ -31,8 +31,21 @@ class Ping extends BaseCommand { * @param {Object} data */ async execute(client, interaction) { - interaction.replyT("general/ping:CONTENT", { - ping: Math.round(client.ws.ping), + const embed = new EmbedBuilder() + .setColor(client.config.embed.color) + .setFooter({ + text: client.config.embed.footer, + }) + .setAuthor({ + name: interaction.translate("general/ping:PONG"), + iconURL: client.user.avatarURL(), + }) + .setDescription(interaction.translate("general/ping:PING", { + ping: Math.round(client.ws.ping), + })); + + interaction.reply({ + embeds: [embed], }); } } diff --git a/languages/ru-RU/general/ping.json b/languages/ru-RU/general/ping.json index 8f1641ea..c986d24c 100644 --- a/languages/ru-RU/general/ping.json +++ b/languages/ru-RU/general/ping.json @@ -2,5 +2,6 @@ "DESCRIPTION": "Показать пинг бота", "USAGE": "", "EXAMPLES": "ping", - "CONTENT": "Понг! Мой пинг - **{{ping}}**ms." + "PONG": "Понг!", + "PING": "Мой пинг - **{{ping}}**ms" } \ No newline at end of file diff --git a/languages/uk-UA/general/ping.json b/languages/uk-UA/general/ping.json index 9c194164..d72d30b8 100644 --- a/languages/uk-UA/general/ping.json +++ b/languages/uk-UA/general/ping.json @@ -2,5 +2,6 @@ "DESCRIPTION": "Показати пінг бота", "USAGE": "", "EXAMPLES": "ping", - "CONTENT": "Понг! Мій пінг - **{{ping}}**ms." + "PONG": "Понг!", + "PING": "Мій пінг - **{{ping}}**ms" } \ No newline at end of file