Обновление команды Minecraft

This commit is contained in:
JonnyBro 2022-05-24 21:41:52 +05:00
parent d956fc56a2
commit 8f0a064ff0
4 changed files with 13 additions and 16 deletions

View file

@ -62,19 +62,13 @@ class Minecraft extends Command {
const embed = new Discord.MessageEmbed()
.setAuthor({
name: message.translate("general/minecraft:FIELD_NAME", {
ip: json.name
name: json.name
})
})
.addField(message.translate("general/minecraft:FIELD_VERSION"), json.raw.vanilla.raw.version.name)
.addField(message.translate("general/minecraft:FIELD_CONNECTED"), message.translate("general/minecraft:PLAYERS", {
count: (json.raw.players ? json.raw.players.online : json.players.length)
}))
.addField(message.translate("general/minecraft:FIELD_MAX"), message.translate("general/minecraft:PLAYERS", {
count: (json.raw.players ? json.raw.players.max : json.maxplayers)
}))
.addField(message.translate("general/minecraft:FIELD_STATUS"), message.translate("general/minecraft:ONLINE"))
.addField(message.translate("general/minecraft:FIELD_IP"), json.connect)
.addField(message.translate("general/minecraft:FIELD_CONNECTED"), `**${(json.raw.players ? json.raw.players.online : json.players.length)}** ${message.getNoun((json.raw.players ? json.raw.players.online : json.players.length), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))} / **${(json.raw.players ? json.raw.players.max : json.maxplayers)}** ${message.getNoun((json.raw.players ? json.raw.players.max : json.maxplayers), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))}`)
.addField(message.translate("general/minecraft:FIELD_IP"), json.connect, true)
.addField(message.translate("general/minecraft:FIELD_VERSION"), json.raw.vanilla.raw.version.name, true)
.addField(message.translate("general/minecraft:FIELD_PING"), json.raw.vanilla.ping.toString())
.setColor(data.config.embed.color)
.setThumbnail(favicon)
.setFooter({

View file

@ -7,10 +7,9 @@
"ONLINE": "Онлайн",
"OFFLINE": "Оффлайн",
"PLAYERS": "{{count}} игрок(а/ов)",
"FIELD_NAME": "Информация об {{ip}}",
"FIELD_VERSION": "Версия",
"FIELD_CONNECTED": "Игроков на сервере",
"FIELD_MAX": "Максимум",
"FIELD_STATUS": "Статус",
"FIELD_PING": "Пинг",
"FIELD_IP": "Полный IP"
}

View file

@ -105,6 +105,11 @@
"2": "пользователя",
"5": "пользователей"
},
"PLAYERS": {
"1": "игрок",
"2": "игрока",
"5": "игроков"
},
"BOTS": {
"1": "бот",
"2": "бота",

View file

@ -7,10 +7,9 @@
"ONLINE": "Онлайн",
"OFFLINE": "Оффлайн",
"PLAYERS": "{{count}} гравець(я/ів)",
"FIELD_NAME": "Інформація про {{ip}}",
"FIELD_VERSION": "Версія",
"FIELD_CONNECTED": "Гравців на сервері",
"FIELD_MAX": "Максимум",
"FIELD_STATUS": "Статус",
"FIELD_PING": "Пінг",
"FIELD_IP": "Повний IP"
}
}