help :poggersfish:

Мелкие правки
This commit is contained in:
JonnyBro 2022-08-01 20:06:09 +05:00
parent 0f6bf647fb
commit 34193eea44
27 changed files with 304 additions and 193 deletions

View file

@ -1,139 +0,0 @@
const Command = require("../../base/Command"),
{ PermissionsBitField, EmbedBuilder } = require("discord.js");
class Help extends Command {
constructor(client) {
super(client, {
name: "help",
dirname: __dirname,
enabled: true,
guildOnly: false,
aliases: ["h", "commands"],
memberPermissions: [],
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
nsfw: false,
ownerOnly: false,
cooldown: 1000
});
}
async run(message, args, data) {
if (args[0]) {
const isCustom = (message.guild && data.guild.customCommands ? data.guild.customCommands.find((c) => c.name === args[0]) : false);
const cmd = this.client.commands.get(args[0]) || this.client.commands.get(this.client.aliases.get(args[0]));
if (!cmd && isCustom) {
return message.error("general/help:CUSTOM", {
cmd: args[0]
});
} else if (!cmd) {
return message.error("general/help:NOT_FOUND", {
search: args[0]
});
}
const description = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`);
const usage = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, {
prefix: message.guild ? data.guild.prefix : ""
});
const examples = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:EXAMPLES`, {
prefix: message.guild ? data.guild.prefix : ""
});
const groupEmbed = new EmbedBuilder()
.setAuthor({
name: message.translate("general/help:CMD_TITLE", {
cmd: cmd.help.name
})
})
.addFields([
{
name: message.translate("general/help:FIELD_DESCRIPTION"),
value: description
},
{
name: message.translate("general/help:FIELD_USAGE"),
value: usage
},
{
name: message.translate("general/help:FIELD_EXAMPLES"),
value: examples
},
{
name: message.translate("general/help:FIELD_ALIASES"),
value: cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") : message.translate("general/help:NO_ALIAS")
},
{
name: message.translate("general/help:FIELD_PERMISSIONS"),
value: cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => `\`${p}\``).join("\n") : message.translate("general/help:NO_REQUIRED_PERMISSION")
}
])
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
return message.reply({
embeds: [groupEmbed]
});
}
const categories = [];
const commands = this.client.commands;
commands.forEach((command) => {
if (!categories.includes(command.help.category)) {
if (command.help.category === "Owner" && message.author.id !== data.config.owner.id) return;
categories.push(command.help.category);
}
});
const emojis = this.client.customEmojis;
const embed = new EmbedBuilder()
.setDescription(message.translate("general/help:INFO", {
prefix: message.guild ? data.guild.prefix : ""
}))
.setColor(data.config.embed.color)
.setFooter({
text: data.config.embed.footer
});
categories.sort().forEach((cat) => {
const tCommands = commands.filter((cmd) => cmd.help.category === cat);
embed.addFields([
{
name: `${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`,
value: `${tCommands.map((cmd) => `\`${cmd.help.name}\``).join(", ")}`
}
]);
});
embed.addFields([
{
name: "\u200B",
value: message.translate("misc:STATS_FOOTER", {
dashboardLink: this.client.config.dashboard.baseURL,
docsLink: `${this.client.config.dashboard.baseURL}/docs/`,
inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator] }),
donateLink: "https://qiwi.com/n/JONNYBRO/",
owner: data.config.owner.id
})
}
]);
embed.setAuthor({
name: message.translate("general/help:TITLE", {
name: this.client.user.username
}),
iconURL: this.client.user.displayAvatarURL({
size: 512,
format: "png"
})
});
return message.reply({
embeds: [embed]
});
}
}
module.exports = Help;

View file

@ -31,7 +31,7 @@ class Announcement extends Command {
time: 240000 time: 240000
}); });
collector.on("collect", async (tmsg) => { collector.on("collect", async tmsg => {
if (tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) { if (tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) {
tmsg.delete(); tmsg.delete();
msg.delete(); msg.delete();

View file

@ -30,7 +30,7 @@ class Poll extends Command {
time: 240000 time: 240000
}); });
collector.on("collect", async (tmsg) => { collector.on("collect", async tmsg => {
if (tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) { if (tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) {
tmsg.delete(); tmsg.delete();
msg.delete(); msg.delete();

View file

@ -118,12 +118,27 @@ class JaBa extends Client {
}); });
} }
async init() {
this.login(this.config.token);
mongoose.connect(this.config.mongoDB, {
useNewUrlParser: true,
useUnifiedTopology: true
}).then(() => {
this.logger.log("Connected to the Mongodb database.", "log");
}).catch((err) => {
this.logger.log(`Unable to connect to the Mongodb database. Error: ${err}`, "error");
});
const autoUpdateDocs = require("../helpers/autoUpdateDocs");
autoUpdateDocs.update(this);
}
/** /**
* *
* @param {String} dir * @param {String} dir
* @returns * @returns
*/ */
async loadCommands(dir) { async loadCommands(dir) {
const filePath = path.join(__dirname, dir); const filePath = path.join(__dirname, dir);
var folders = await fs.readdir(filePath); folders = folders.map(file => path.join(filePath, file)).filter(async (path) => { path = await fs.lstat(path); path.isDirectory(); }); var folders = await fs.readdir(filePath); folders = folders.map(file => path.join(filePath, file)).filter(async (path) => { path = await fs.lstat(path); path.isDirectory(); });
@ -244,22 +259,6 @@ class JaBa extends Client {
} }
} }
async init() {
this.login(this.config.token);
mongoose.connect(this.config.mongoDB, {
useNewUrlParser: true,
useUnifiedTopology: true
}).then(() => {
this.logger.log("Connected to the Mongodb database.", "log");
}).catch((err) => {
this.logger.log(`Unable to connect to the Mongodb database. Error: ${err}`, "error");
});
const autoUpdateDocs = require("../helpers/autoUpdateDocs");
autoUpdateDocs.update(this);
}
get defaultLanguage() { get defaultLanguage() {
return this.languages.find(language => language.default).name; return this.languages.find(language => language.default).name;
} }

View file

@ -31,7 +31,7 @@ class Eightball extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {

View file

@ -31,7 +31,7 @@ class LMGTFY extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {

View file

@ -35,7 +35,7 @@ class Lovecalc extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {

View file

@ -28,7 +28,7 @@ class Memes extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
@ -58,7 +58,7 @@ class Memes extends BaseCommand {
idle: 60 * 1000 idle: 60 * 1000
}); });
collector.on("collect", async (msg) => { collector.on("collect", async msg => {
const tag = msg?.values[0]; const tag = msg?.values[0];
const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json());

View file

@ -28,7 +28,7 @@ class Activity extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
@ -64,7 +64,7 @@ class Activity extends BaseCommand {
idle: 60 * 1000 idle: 60 * 1000
}); });
collector.on("collect", async (msg) => { collector.on("collect", async msg => {
const activity = msg?.values[0]; const activity = msg?.values[0];
const invite = await client.discordTogether.createTogetherCode(voice.id, activity); const invite = await client.discordTogether.createTogetherCode(voice.id, activity);
@ -78,7 +78,8 @@ class Activity extends BaseCommand {
.setTimestamp(); .setTimestamp();
msg.update({ msg.update({
embeds: [embed] embeds: [embed],
components: []
}); });
}); });
} }

166
commands/General/help.js Normal file
View file

@ -0,0 +1,166 @@
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, InteractionCollector, PermissionsBitField } = require("discord.js");
const BaseCommand = require("../../base/BaseCommand");
class Help extends BaseCommand {
/**
*
* @param {import("../base/JaBa")} client
*/
constructor(client) {
super({
command: new SlashCommandBuilder()
.setName("help")
.setDescription(client.translate("general/help:DESCRIPTION"))
.addStringOption(option =>
option.setName("command")
.setDescription(client.translate("owner/reload:COMMAND"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}
/**
*
* @param {import("../../base/JaBa")} client
*/
async onLoad() {
//...
}
/**
*
* @param {import("../../base/JaBa")} client
* @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data
*/
async execute(client, interaction) {
const commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()];
const categories = [];
const command = interaction.options.getString("command");
if (command) {
const embed = generateCommandHelp(client, interaction, command);
return interaction.reply({
embeds: [embed]
});
}
commands.forEach(c => {
if (!categories.includes(c.category)) {
if (c.category === "Owner" && interaction.user.id !== client.config.owner.id) return;
categories.push(c.category);
}
});
const categoriesRows = categories.sort().map(c => {
return {
label: `${c} (${commands.filter(cmd => cmd.category === c).length})`,
value: c
};
});
const row = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId("help_category_select")
.setPlaceholder(client.translate("common:NOTHING_SELECTED"))
.addOptions(categoriesRows)
);
const msg = await interaction.reply({
content: interaction.translate("common:AVAILABLE_CATEGORIES"),
components: [row],
fetchReply: true
});
const collector = new InteractionCollector(client, {
message: msg,
idle: 60 * 1000
});
collector.on("collect", async msg => {
const arg = msg?.values[0];
if (categories.find(c => c === arg)) {
const categoryCommands = commands.filter(cmd => cmd.category === arg).map(c => {
return {
label: c.command.name,
value: c.command.name
};
});
const commandsRow = new ActionRowBuilder()
.addComponents(
new SelectMenuBuilder()
.setCustomId("help_commands_select")
.setPlaceholder(client.translate("common:NOTHING_SELECTED"))
.addOptions(categoryCommands)
);
await msg.update({
content: interaction.translate("general/help:COMMANDS_IN", {
category: arg
}),
components: [commandsRow],
fetchReply: true
});
} else {
const embed = generateCommandHelp(client, interaction, arg);
return msg.update({
content: null,
components: [],
embeds: [embed]
});
}
});
}
}
function getPermName(bitfield = 0) {
for (const key in PermissionsBitField.Flags)
if (PermissionsBitField.Flags[key] === BigInt(bitfield)) return key;
return null;
}
function generateCommandHelp(client, interaction, command) {
const cmd = client.commands.get(command);
if (!cmd) return interaction.error("general/help:NOT_FOUND", { search: command });
const embed = new EmbedBuilder()
.setAuthor({
name: interaction.translate("general/help:CMD_TITLE", {
cmd: cmd.command.name
})
})
.addFields([
{
name: interaction.translate("general/help:FIELD_DESCRIPTION"),
value: interaction.translate(`${cmd.category.toLowerCase()}/${cmd.command.name}:DESCRIPTION`)
},
{
name: interaction.translate("general/help:FIELD_USAGE"),
value: interaction.translate(`${cmd.category.toLowerCase()}/${cmd.command.name}:USAGE`)
},
{
name: interaction.translate("general/help:FIELD_EXAMPLES"),
value: interaction.translate(`${cmd.category.toLowerCase()}/${cmd.command.name}:EXAMPLES`)
},
{
name: interaction.translate("general/help:FIELD_ALIASES"),
value: cmd.aliases.length > 0 ? cmd.aliases.map(a => `${a}`).join("\n") : interaction.translate("general/help:NO_ALIAS")
},
{
name: interaction.translate("general/help:FIELD_PERMISSIONS"),
value: cmd.command.default_member_permissions > 0 ? interaction.translate(`misc:PERMISSIONS:${getPermName(cmd.command.default_member_permissions)}`) : interaction.translate("general/help:NO_REQUIRED_PERMISSION")
}
])
.setColor(client.config.embed.color)
.setFooter({
text: client.config.embed.footer
});
return embed;
}
module.exports = Help;

View file

@ -27,7 +27,7 @@ class Ping extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {

View file

@ -32,19 +32,17 @@ class Warn extends BaseCommand {
*/ */
async execute(client, interaction, data) { async execute(client, interaction, data) {
const member = interaction.targetMember; const member = interaction.targetMember;
const memberPosition = member.roles.highest.position;
const moderationPosition = interaction.member.roles.highest.position;
if (member.user.bot) return; if (member.user.bot) return;
if (member.id === interaction.user.id) return interaction.error("moderation/warn:YOURSELF");
if (interaction.guild.ownerId !== interaction.user.id && !(moderationPosition > memberPosition)) return interaction.error("moderation/ban:SUPERIOR");
const memberData = await client.findOrCreateMember({ const memberData = await client.findOrCreateMember({
id: member.id, id: member.id,
guildID: interaction.guildId guildID: interaction.guildId
}); });
if (member.id === interaction.user.id) return interaction.error("moderation/warn:YOURSELF");
const memberPosition = member.roles.highest.position;
const moderationPosition = interaction.member.roles.highest.position;
if (interaction.guild.ownerId !== interaction.user.id && !(moderationPosition > memberPosition)) return interaction.error("moderation/ban:SUPERIOR");
const modal = new ModalBuilder() const modal = new ModalBuilder()
.setCustomId("warn_modal") .setCustomId("warn_modal")
.setTitle(interaction.translate("moderation/warn:MODAL_TITLE")); .setTitle(interaction.translate("moderation/warn:MODAL_TITLE"));

View file

@ -28,7 +28,7 @@ class NSFW extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
@ -61,7 +61,7 @@ class NSFW extends BaseCommand {
idle: 60 * 1000 idle: 60 * 1000
}); });
collector.on("collect", async (msg) => { collector.on("collect", async msg => {
const tag = msg?.values[0]; const tag = msg?.values[0];
const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json());

View file

@ -73,7 +73,7 @@ class Debug extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction, data) { async execute(client, interaction, data) {

View file

@ -32,7 +32,7 @@ class Eval extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction, data) { async execute(client, interaction, data) {

View file

@ -33,13 +33,13 @@ class Reload extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
const command = interaction.options.getString("command"); const command = interaction.options.getString("command");
const cmd = client.commands.get(command); const cmd = client.commands.get(command);
if (!cmd) return interaction.error("owner/reload:NOT_FOUND", { search: command }, { ephemeral: true }); if (!cmd) return interaction.error("general/help:NOT_FOUND", { search: command }, { ephemeral: true });
await client.unloadCommand(`../commands/${cmd.category}`, cmd.command.name); await client.unloadCommand(`../commands/${cmd.category}`, cmd.command.name);
await client.loadCommand(`../commands/${cmd.category}`, cmd.command.name); await client.loadCommand(`../commands/${cmd.category}`, cmd.command.name);

View file

@ -34,7 +34,7 @@ class Say extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {

View file

@ -27,7 +27,7 @@ class Servers extends BaseCommand {
/** /**
* *
* @param {import("../../base/JaBa")} client * @param {import("../../base/JaBa")} client
* @param {import("discord.js").CommandInteraction} interaction * @param {import("discord.js").ChatInputCommandInteraction} interaction
* @param {Array} data * @param {Array} data
*/ */
async execute(client, interaction) { async execute(client, interaction) {
@ -72,7 +72,7 @@ class Servers extends BaseCommand {
time: 60 * 1000 time: 60 * 1000
}); });
collector.on("collect", async (reaction) => { collector.on("collect", async reaction => {
if (reaction._emoji.name === "⬅") { if (reaction._emoji.name === "⬅") {
i0 = i0 - 10; i0 = i0 - 10;
i1 = i1 - 10; i1 = i1 - 10;

View file

@ -11,7 +11,6 @@ async function fetchUser(userData, client, query) {
if (userData.guilds) { if (userData.guilds) {
userData.guilds.forEach((guild) => { userData.guilds.forEach((guild) => {
if (!client.guilds.cache.get(guild.id)) return; if (!client.guilds.cache.get(guild.id)) return;
// eslint-disable-next-line no-undef
const perms = new PermissionsBitField(BigInt(guild.permissions)); const perms = new PermissionsBitField(BigInt(guild.permissions));
if (perms.has(PermissionsBitField.Flags.ManageGuild)) guild.admin = true; if (perms.has(PermissionsBitField.Flags.ManageGuild)) guild.admin = true;

View file

@ -18,11 +18,11 @@ module.exports.update = function (client) {
// else return 1; // else return 1;
// }) // })
categories.sort().forEach((cat) => { categories.sort().forEach(cat => {
const categoriesArray = [ const categoriesArray = [
["Название", "Описание", "Использование", "Разрешено использование"] ["Название", "Описание", "Использование", "Разрешено использование"]
]; ];
const cmds = [...new Map(commands.filter((cmd) => cmd.category === cat).map(v => [v.constructor.name, v])).values()]; const cmds = [...new Map(commands.filter(cmd => cmd.category === cat).map(v => [v.constructor.name, v])).values()];
text += `### ${cat} (${cmds.length} ${client.getNoun(cmds.length, "команда", "команды", "команд")})\n\n`; text += `### ${cat} (${cmds.length} ${client.getNoun(cmds.length, "команда", "команды", "команд")})\n\n`;
cmds.sort(function (a, b) { cmds.sort(function (a, b) {

View file

@ -2,8 +2,8 @@
"DESCRIPTION": "Показать список команд или помощь по данной команде", "DESCRIPTION": "Показать список команд или помощь по данной команде",
"USAGE": "help (команда)", "USAGE": "help (команда)",
"EXAMPLES": "help\nhelp ping", "EXAMPLES": "help\nhelp ping",
"CUSTOM": "У добавленных команд нет описания.", "NOT_FOUND": "Команды `{{search}}` не существует.",
"NOT_FOUND": "Команды `{{search}}` не существует", "COMMANDS_IN": "Доступные команды в категории `{{category}}`:",
"FIELD_USAGE": "Использование", "FIELD_USAGE": "Использование",
"FIELD_DESCRIPTION": "Описание", "FIELD_DESCRIPTION": "Описание",
"FIELD_ALIASES": "Сокращения", "FIELD_ALIASES": "Сокращения",
@ -11,7 +11,6 @@
"NO_ALIAS": "Нет сокращений", "NO_ALIAS": "Нет сокращений",
"CMD_TITLE": "Помощь по {{cmd}}", "CMD_TITLE": "Помощь по {{cmd}}",
"INFO": "● Чтобы получить помощь по определённой команде используйте `help <команда>`!", "INFO": "● Чтобы получить помощь по определённой команде используйте `help <команда>`!",
"CUSTOM_COMMANDS": "Добавленные команды",
"FIELD_PERMISSIONS": "Необходимые права", "FIELD_PERMISSIONS": "Необходимые права",
"NO_REQUIRED_PERMISSION": "Никаких особых прав не нужно для использования данной команды.", "NO_REQUIRED_PERMISSION": "Никаких особых прав не нужно для использования данной команды.",
"TITLE": "{{name}} | Команды" "TITLE": "{{name}} | Команды"

View file

@ -25,6 +25,49 @@
"COOLDOWNED": "Подождите **{{seconds}}**, чтобы снова использовать эту команду!", "COOLDOWNED": "Подождите **{{seconds}}**, чтобы снова использовать эту команду!",
"CANNOT_DM": "Я не могу отправить вам личное сообщение... Проверьте свои настройки конфиденциальности!", "CANNOT_DM": "Я не могу отправить вам личное сообщение... Проверьте свои настройки конфиденциальности!",
"PERMISSIONS": {
"CreateInstantInvite": "Создание приглашения",
"KickMembers": "Выгонять участников",
"BanMembers": "Банить участников",
"Administrator": "Администратор",
"ManageChannels": "Управлять каналами",
"ManageGuild": "Управлять сервером",
"AddReactions": "Добавлять реакции",
"ViewAuditLog": "Просматривать журнал аудита",
"PrioritySpeaker": "Приоритетный режим",
"Stream": "Видео",
"ViewChannel": "Просматривать каналы",
"SendMessages": "Отправлять сообщения",
"SendTTSMessages": "Отправка сообщений text-to-speech",
"ManageMessages": "Управлять сообщениями",
"EmbedLinks": "Встраивать ссылки",
"AttachFiles": "Прикреплять файлы",
"ReadMessageHistory": "Читать историю сообщений",
"MentionEveryone": "Упоминание *@*everyone, *@*here и всех ролей",
"UseExternalEmojis": "Использовать внешние эмодзи",
"ViewGuildInsights": "Просматривать статистику сервера",
"Connect": "Подключаться",
"Speak": "Говорить",
"MuteMembers": "Отключать участникам микрофон",
"DeafenMembers": "Отключать участникам звук",
"MoveMembers": "Перемещать участников",
"UseVAD": "Использовать режим активации по голосу",
"ChangeNickname": "Изменить никнейм",
"ManageNicknames": "Управлять никнеймами",
"ManageRoles": "Управлять ролями",
"ManageWebhooks": "Управлять вебхуками (webhooks)",
"ManageEmojisAndStickers": "Управлять эмодзи и стикерами",
"UseApplicationCommands": "Использовать команды приложения",
"ManageEvents": "Управление событиями",
"ManageThreads": "Управление ветками",
"CreatePublicThreads": "Создать публичные ветки",
"CreatePrivateThreads": "Создание приватных веток",
"UseExternalStickers": "Использовать внешние стикеры",
"SendMessagesInThreads": "Отправлять сообщения в ветках",
"UseEmbeddedActivities": "Начать активность",
"ModerateMembers": "Отправить участников подумать о своём поведении"
},
"NOUNS": { "NOUNS": {
"CREDIT": { "CREDIT": {
"1": "кредит", "1": "кредит",

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Выдать предупреждение пользователю", "DESCRIPTION": "Выдать предупреждение пользователю",
"USAGE": "warn [@пользователь] (причина)", "USAGE": "ПКМ на пользователя - Приложения - warn",
"EXAMPLES": "warn @Jonny_Bro#4226 stupid", "EXAMPLES": "",
"YOURSELF": "Вы не можете подать жалобу на себя!", "YOURSELF": "Вы не можете подать жалобу на себя!",
"MODAL_TITLE": "Выдать предупреждение {{nickname}}", "MODAL_TITLE": "Выдать предупреждение {{nickname}}",
"REASON": "Причина предупреждения", "REASON": "Причина предупреждения",

View file

@ -1,7 +1,7 @@
{ {
"DESCRIPTION": "Показать список нарушений пользователя!", "DESCRIPTION": "Показать список нарушений пользователя!",
"USAGE": "sanctions [@пользователь]", "USAGE": "ПКМ на пользователя - Приложения - warns",
"EXAMPLES": "sanctions @Jonny_Bro#4226", "EXAMPLES": "",
"SANCTIONS_OF": "Нарушения {{member}}", "SANCTIONS_OF": "Нарушения {{member}}",
"NO_SANCTION": "У **{{member}}** нет нарушений." "NO_SANCTION": "У **{{member}}** нет нарушений."
} }

View file

@ -2,6 +2,5 @@
"DESCRIPTION": "Перезагрузить команду!", "DESCRIPTION": "Перезагрузить команду!",
"COMMAND": "Команда", "COMMAND": "Команда",
"EXAMPLES": "reload help", "EXAMPLES": "reload help",
"NOT_FOUND": "Команды `{{search}}` не существует!",
"SUCCESS": "Команда `{{command}}` успешно перезагружена!" "SUCCESS": "Команда `{{command}}` успешно перезагружена!"
} }

View file

@ -27,6 +27,51 @@
"COOLDOWNED": "Зачекайте **{{seconds}}**, щоб знову використати цю команду!", "COOLDOWNED": "Зачекайте **{{seconds}}**, щоб знову використати цю команду!",
"CANNOT_DM": "Я не можу надіслати вам особисте повідомлення... Перевірте налаштування конфіденційності!", "CANNOT_DM": "Я не можу надіслати вам особисте повідомлення... Перевірте налаштування конфіденційності!",
"PERMISSIONS": {
"CREATE_INSTANT_INVITE": "Створення запрошення",
"KICK_MEMBERS": "Виганяти учасників",
"BAN_MEMBERS": "Банити учасників",
"ADMINISTRATOR": "Адміністратор",
"MANAGE_CHANNELS": "Керувати каналами",
"MANAGE_GUILD": "Керувати сервером",
"ADD_REACTIONS": "Додавати реакції",
"VIEW_AUDIT_LOG": "Перегляд журналу аудиту",
"PRIORITY_SPEAKER": "Пріоритетний режим",
"STREAM": "Відео",
"VIEW_CHANNEL": "Перегляд каналів",
"SEND_MESSAGES": "Надсилати повідомлення",
"SEND_TTS_MESSAGES": "Надсилання повідомлень text-to-speech",
"MANAGE_MESSAGES": "Керувати повідомленнями",
"EMBED_LINKS": "Вбудовувати посилання",
"ATTACH_FILES": "Прикріплювати файли",
"READ_MESSAGE_HISTORY": "Читати історію повідомлень",
"MENTION_EVERYONE": "Згадка *@*everyone, *@*here та всіх ролей",
"USE_EXTERNAL_EMOJIS": "Використовувати зовнішні емодзі",
"VIEW_GUILD_INSIGHTS": "Перегляд статистики сервера",
"CONNECT": "Підключатися",
"SPEAK": "Говорити",
"MUTE_MEMBERS": "Вимкнути учасникам мікрофон",
"DEAFEN_MEMBERS": "Вимкнути учасникам звук",
"MOVE_MEMBERS": "Переміщувати учасників",
"USE_VAD": "Використовувати режим активації за голосом",
"CHANGE_NICKNAME": "Змінити нікнейм",
"MANAGE_NICKNAMES": "Керувати нікнеймами",
"MANAGE_ROLES": "Керувати ролями",
"MANAGE_WEBHOOKS": "Керувати вебхуками (webhooks)",
"MANAGE_EMOJIS_AND_STICKERS": "Керувати емодзі та стікерами",
"USE_APPLICATION_COMMANDS": "Використовувати команди програми",
"MANAGE_EVENTS": "Управління подіями",
"MANAGE_THREADS": "Керування гілками",
"USE_PUBLIC_THREADS": "Використовувати публічні гілки",
"CREATE_PUBLIC_THREADS": "Створити публічні гілки",
"USE_PRIVATE_THREADS": "Використання приватних гілок",
"CREATE_PRIVATE_THREADS": "Створення приватних гілок",
"USE_EXTERNAL_STICKERS": "Використовувати зовнішні стікери",
"SEND_MESSAGES_IN_THREADS": "Надсилати повідомлення у гілках",
"START_EMBEDDED_ACTIVITIES": "Почати активність",
"MODERATE_MEMBERS": "Надіслати учасників подумати про свою поведінку"
},
"NOUNS": { "NOUNS": {
"CREDIT": { "CREDIT": {
"1": "кредит", "1": "кредит",

View file

@ -54,6 +54,7 @@
"env": { "env": {
"commonjs": true, "commonjs": true,
"es6": true, "es6": true,
"es2020": true,
"node": true "node": true
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended",