mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Новый вид для ping
This commit is contained in:
parent
167268423a
commit
0ae13edd23
3 changed files with 20 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
const { SlashCommandBuilder } = require("discord.js");
|
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
|
||||||
const BaseCommand = require("../../base/BaseCommand");
|
const BaseCommand = require("../../base/BaseCommand");
|
||||||
|
|
||||||
class Ping extends BaseCommand {
|
class Ping extends BaseCommand {
|
||||||
|
@ -31,8 +31,21 @@ class Ping extends BaseCommand {
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
*/
|
*/
|
||||||
async execute(client, interaction) {
|
async execute(client, interaction) {
|
||||||
interaction.replyT("general/ping:CONTENT", {
|
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),
|
ping: Math.round(client.ws.ping),
|
||||||
|
}));
|
||||||
|
|
||||||
|
interaction.reply({
|
||||||
|
embeds: [embed],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
"DESCRIPTION": "Показать пинг бота",
|
"DESCRIPTION": "Показать пинг бота",
|
||||||
"USAGE": "",
|
"USAGE": "",
|
||||||
"EXAMPLES": "ping",
|
"EXAMPLES": "ping",
|
||||||
"CONTENT": "Понг! Мой пинг - **{{ping}}**ms."
|
"PONG": "Понг!",
|
||||||
|
"PING": "Мой пинг - **{{ping}}**ms"
|
||||||
}
|
}
|
|
@ -2,5 +2,6 @@
|
||||||
"DESCRIPTION": "Показати пінг бота",
|
"DESCRIPTION": "Показати пінг бота",
|
||||||
"USAGE": "",
|
"USAGE": "",
|
||||||
"EXAMPLES": "ping",
|
"EXAMPLES": "ping",
|
||||||
"CONTENT": "Понг! Мій пінг - **{{ping}}**ms."
|
"PONG": "Понг!",
|
||||||
|
"PING": "Мій пінг - **{{ping}}**ms"
|
||||||
}
|
}
|
Loading…
Reference in a new issue