From aaa0d01c542bdc607bbd164c66e7ccd9a054131a Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 7 Jul 2023 17:34:23 +0500 Subject: [PATCH] some tickets stuff --- base/Guild.js | 4 + commands/!DISABLED/ban.js | 82 +++++++ commands/!DISABLED/kick.js | 82 +++++++ commands/IAT/checkjar.js | 1 + commands/Moderation/untimeout.js | 67 ++++++ commands/Moderation/warn.js | 2 +- commands/Tickets/adduser.js | 65 ++++++ commands/Tickets/closeticket.js | 122 +++++++++++ commands/Tickets/empty.js | 10 + commands/Tickets/openTicketChannel.js | 32 +++ commands/Tickets/removeuser.js | 35 +++ commands/Tickets/rename.js | 27 +++ interactions.js | 241 +++++++++++++++++++++ languages/en-US/administration/set.json | 2 +- languages/en-US/common.json | 1 + languages/en-US/economy/achievements.json | 2 +- languages/en-US/economy/marry.json | 2 +- languages/en-US/economy/money.json | 2 +- languages/en-US/economy/pay.json | 2 +- languages/en-US/economy/profile.json | 2 +- languages/en-US/economy/rep.json | 2 +- languages/en-US/economy/rob.json | 2 +- languages/en-US/fun/lovecalc.json | 2 +- languages/en-US/fun/tictactoe.json | 2 +- languages/en-US/general/avatar.json | 2 +- languages/en-US/general/report.json | 2 +- languages/en-US/general/userinfo.json | 2 +- languages/en-US/misc.json | 1 + languages/en-US/moderation/ban.json | 8 + languages/en-US/moderation/clear.json | 2 +- languages/en-US/moderation/clearwarns.json | 2 +- languages/en-US/moderation/kick.json | 8 + languages/en-US/moderation/untimeout.json | 8 + languages/en-US/moderation/warns.json | 2 +- languages/en-US/owner/debug.json | 2 +- languages/ru-RU/administration/set.json | 2 +- languages/ru-RU/common.json | 1 + languages/ru-RU/economy/achievements.json | 2 +- languages/ru-RU/economy/marry.json | 2 +- languages/ru-RU/economy/money.json | 2 +- languages/ru-RU/economy/pay.json | 2 +- languages/ru-RU/economy/profile.json | 2 +- languages/ru-RU/economy/rep.json | 2 +- languages/ru-RU/economy/rob.json | 2 +- languages/ru-RU/fun/lovecalc.json | 2 +- languages/ru-RU/fun/tictactoe.json | 2 +- languages/ru-RU/general/avatar.json | 2 +- languages/ru-RU/general/report.json | 2 +- languages/ru-RU/general/userinfo.json | 2 +- languages/ru-RU/misc.json | 1 + languages/ru-RU/moderation/ban.json | 8 + languages/ru-RU/moderation/clear.json | 2 +- languages/ru-RU/moderation/clearwarns.json | 2 +- languages/ru-RU/moderation/kick.json | 8 + languages/ru-RU/moderation/untimeout.json | 8 + languages/ru-RU/moderation/warns.json | 2 +- languages/ru-RU/owner/debug.json | 2 +- languages/ru-RU/tickets/adduser.json | 7 + languages/ru-RU/tickets/closeticket.json | 11 + languages/uk-UA/administration/set.json | 2 +- languages/uk-UA/common.json | 1 + languages/uk-UA/dashboard.json | 8 +- languages/uk-UA/economy/achievements.json | 2 +- languages/uk-UA/economy/marry.json | 2 +- languages/uk-UA/economy/money.json | 2 +- languages/uk-UA/economy/pay.json | 2 +- languages/uk-UA/economy/profile.json | 2 +- languages/uk-UA/economy/rep.json | 2 +- languages/uk-UA/economy/rob.json | 2 +- languages/uk-UA/fun/lovecalc.json | 2 +- languages/uk-UA/fun/tictactoe.json | 2 +- languages/uk-UA/general/avatar.json | 2 +- languages/uk-UA/general/report.json | 2 +- languages/uk-UA/general/userinfo.json | 2 +- languages/uk-UA/misc.json | 1 + languages/uk-UA/moderation/ban.json | 8 + languages/uk-UA/moderation/clear.json | 2 +- languages/uk-UA/moderation/clearwarns.json | 2 +- languages/uk-UA/moderation/kick.json | 8 + languages/uk-UA/moderation/untimeout.json | 8 + languages/uk-UA/moderation/warns.json | 2 +- languages/uk-UA/owner/debug.json | 2 +- package.json | 68 +----- 83 files changed, 931 insertions(+), 113 deletions(-) create mode 100644 commands/!DISABLED/ban.js create mode 100644 commands/!DISABLED/kick.js create mode 100644 commands/Moderation/untimeout.js create mode 100644 commands/Tickets/adduser.js create mode 100644 commands/Tickets/closeticket.js create mode 100644 commands/Tickets/empty.js create mode 100644 commands/Tickets/openTicketChannel.js create mode 100644 commands/Tickets/removeuser.js create mode 100644 commands/Tickets/rename.js create mode 100644 interactions.js create mode 100644 languages/en-US/moderation/ban.json create mode 100644 languages/en-US/moderation/kick.json create mode 100644 languages/en-US/moderation/untimeout.json create mode 100644 languages/ru-RU/moderation/ban.json create mode 100644 languages/ru-RU/moderation/kick.json create mode 100644 languages/ru-RU/moderation/untimeout.json create mode 100644 languages/ru-RU/tickets/adduser.json create mode 100644 languages/ru-RU/tickets/closeticket.json create mode 100644 languages/uk-UA/moderation/ban.json create mode 100644 languages/uk-UA/moderation/kick.json create mode 100644 languages/uk-UA/moderation/untimeout.json diff --git a/base/Guild.js b/base/Guild.js index 4c585c78..3368e067 100644 --- a/base/Guild.js +++ b/base/Guild.js @@ -42,6 +42,10 @@ module.exports = mongoose.model("Guild", new Schema({ memberUpdate: null, messageUpdate: null, }, + tickets: { + ticketLogs: null, + transcriptionLogs: null, + }, suggestions: null, reports: null, birthdays: null, diff --git a/commands/!DISABLED/ban.js b/commands/!DISABLED/ban.js new file mode 100644 index 00000000..d033a596 --- /dev/null +++ b/commands/!DISABLED/ban.js @@ -0,0 +1,82 @@ +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class Ban extends BaseCommand { + /** + * + * @param {import("../../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("ban") + .setDescription(client.translate("moderation/ban:DESCRIPTION")) + .setDescriptionLocalizations({ + uk: client.translate("moderation/ban:DESCRIPTION", null, "uk-UA"), + ru: client.translate("moderation/ban:DESCRIPTION", null, "ru-RU"), + }) + .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.BanMembers) + .addUserOption(option => + option + .setName("user") + .setDescription(client.translate("common:USER")) + .setDescriptionLocalizations({ + uk: client.translate("common:USER", null, "uk-UA"), + ru: client.translate("common:USER", null, "ru-RU"), + }) + .setRequired(true), + ) + .addStringOption(option => + option + .setName("reason") + .setDescription(client.translate("common:REASON")) + .setDescriptionLocalizations({ + uk: client.translate("common:REASON", null, "uk-UA"), + ru: client.translate("common:REASON", null, "ru-RU"), + }) + .setRequired(true), + ), + aliases: [], + dirname: __dirname, + ownerOnly: false, + }); + } + + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction) { + await interaction.deferReply(); + + const member = interaction.options.getMember("user"), + reason = interaction.options.getString("reason"), + memberPosition = member.roles.highest.position, + moderationPosition = interaction.member.roles.highest.position; + + if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true, edit: true }); + if (member.id === interaction.member.id) return interaction.error("moderation/ban:YOURSELF", null, { ephemeral: true, edit: true }); + if (interaction.guild.ownerId !== interaction.member.id && !(moderationPosition > memberPosition) && member.bannable) return interaction.error("moderation/ban:SUPERIOR", null, { ephemeral: true, edit: true }); + + await member.ban({ + reason, + }); + + interaction.success("moderation/ban:SUCCESS", { + user: member.user.toString(), + reason, + }, { edit: true }); + } +} + +module.exports = Ban; diff --git a/commands/!DISABLED/kick.js b/commands/!DISABLED/kick.js new file mode 100644 index 00000000..6cf8484f --- /dev/null +++ b/commands/!DISABLED/kick.js @@ -0,0 +1,82 @@ +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class Kick extends BaseCommand { + /** + * + * @param {import("../../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("kick") + .setDescription(client.translate("moderation/kick:DESCRIPTION")) + .setDescriptionLocalizations({ + uk: client.translate("moderation/kick:DESCRIPTION", null, "uk-UA"), + ru: client.translate("moderation/kick:DESCRIPTION", null, "ru-RU"), + }) + .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.KickMembers) + .addUserOption(option => + option + .setName("user") + .setDescription(client.translate("common:USER")) + .setDescriptionLocalizations({ + uk: client.translate("common:USER", null, "uk-UA"), + ru: client.translate("common:USER", null, "ru-RU"), + }) + .setRequired(true), + ) + .addStringOption(option => + option + .setName("reason") + .setDescription(client.translate("common:REASON")) + .setDescriptionLocalizations({ + uk: client.translate("common:REASON", null, "uk-UA"), + ru: client.translate("common:REASON", null, "ru-RU"), + }) + .setRequired(true), + ), + aliases: [], + dirname: __dirname, + ownerOnly: false, + }); + } + + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction) { + await interaction.deferReply(); + + const member = interaction.options.getMember("user"), + reason = interaction.options.getString("reason"), + memberPosition = member.roles.highest.position, + moderationPosition = interaction.member.roles.highest.position; + + if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true, edit: true }); + if (member.id === interaction.member.id) return interaction.error("moderation/kick:YOURSELF", null, { ephemeral: true, edit: true }); + if (interaction.guild.ownerId !== interaction.member.id && !(moderationPosition > memberPosition) && member.kickable) return interaction.error("moderation/kick:SUPERIOR", null, { ephemeral: true, edit: true }); + + await member.kick({ + reason, + }); + + interaction.success("moderation/kick:SUCCESS", { + user: member.user.toString(), + reason, + }, { edit: true }); + } +} + +module.exports = Kick; diff --git a/commands/IAT/checkjar.js b/commands/IAT/checkjar.js index 05d783ac..b1e915ce 100644 --- a/commands/IAT/checkjar.js +++ b/commands/IAT/checkjar.js @@ -60,6 +60,7 @@ class Checkjar extends BaseCommand { .setFooter({ text: client.config.embed.footer, }) + .setTimestamp() .setDescription(`Текущий баланс: **${jar.balance / Math.pow(10, 2)}** грн\nТребуется на след. месяц: **379,18** грн (по курсу евро на 02.07.2023).\nЗдесь указаны последние 10 транзакций.`); jarTransactions.length = 10; diff --git a/commands/Moderation/untimeout.js b/commands/Moderation/untimeout.js new file mode 100644 index 00000000..c47b02c6 --- /dev/null +++ b/commands/Moderation/untimeout.js @@ -0,0 +1,67 @@ +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class Ban extends BaseCommand { + /** + * + * @param {import("../../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("untimeout") + .setDescription(client.translate("moderation/untimeout:DESCRIPTION")) + .setDescriptionLocalizations({ + uk: client.translate("moderation/untimeout:DESCRIPTION", null, "uk-UA"), + ru: client.translate("moderation/untimeout:DESCRIPTION", null, "ru-RU"), + }) + .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ModerateMembers) + .addUserOption(option => + option + .setName("user") + .setDescription(client.translate("common:USER")) + .setDescriptionLocalizations({ + uk: client.translate("common:USER", null, "uk-UA"), + ru: client.translate("common:USER", null, "ru-RU"), + }) + .setRequired(true), + ), + aliases: [], + dirname: __dirname, + ownerOnly: false, + }); + } + + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction) { + await interaction.deferReply(); + + const member = interaction.options.getMember("user"), + timedout = member.isCommunicationDisabled(); + + if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true, edit: true }); + if (member.id === interaction.member.id) return interaction.error("moderation/untimeout:YOURSELF", null, { ephemeral: true, edit: true }); + if (!timedout) return interaction.error("moderation/untimeout:NOT_TIMEDOUT", null, { ephemeral: true, edit: true }); + + await member.timeout(null); + + interaction.success("moderation/untimeout:SUCCESS", { + user: member.user.toString(), + }, { edit: true }); + } +} + +module.exports = Ban; diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index cf86f08a..9f9ce45e 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -34,7 +34,7 @@ class Warn extends BaseCommand { if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true }); if (member.id === interaction.member.id) return interaction.error("moderation/warn:YOURSELF", null, { ephemeral: true }); - if (interaction.guild.ownerId !== interaction.member.id && !(moderationPosition > memberPosition)) return interaction.error("moderation/ban:SUPERIOR", null, { ephemeral: true }); + if (interaction.guild.ownerId !== interaction.member.id && !(moderationPosition > memberPosition)) return interaction.error("moderation/warn:SUPERIOR", null, { ephemeral: true }); const memberData = await client.findOrCreateMember({ id: member.id, diff --git a/commands/Tickets/adduser.js b/commands/Tickets/adduser.js new file mode 100644 index 00000000..665177b0 --- /dev/null +++ b/commands/Tickets/adduser.js @@ -0,0 +1,65 @@ +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class Adduser extends BaseCommand { + /** + * + * @param {import("../../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("adduser") + .setDescription(client.translate("tickets/adduser:DESCRIPTION")) + .setDescriptionLocalizations({ + uk: client.translate("tickets/adduser:DESCRIPTION", null, "uk-UA"), + ru: client.translate("tickets/adduser:DESCRIPTION", null, "ru-RU"), + }) + .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) + .addUserOption(option => + option + .setName("user") + .setDescription(client.translate("common:USER")) + .setDescriptionLocalizations({ + uk: client.translate("common:USER", null, "uk-UA"), + ru: client.translate("common:USER", null, "ru-RU"), + }) + .setRequired(true), + ), + aliases: [], + dirname: __dirname, + ownerOnly: false, + }); + } + + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction) { + await interaction.deferReply(); + + const member = interaction.options.getMember("user"); + + if (member.user.bot) return interaction.error("misc:BOT_USER", null, { ephemeral: true, edit: true }); + if (!interaction.channel.name.includes("support") && !interaction.channel.name.includes("application")) return interaction.error("tickets/adduser:NOT_TICKET", null, { ephemeral: true, edit: true }); + + await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: true, SendMessages: true }); + + interaction.success("tickets/adduser:SUCCESS", { + user: member.user.toString(), + }, { edit: true }); + } +} + +module.exports = Adduser; diff --git a/commands/Tickets/closeticket.js b/commands/Tickets/closeticket.js new file mode 100644 index 00000000..c99a5e52 --- /dev/null +++ b/commands/Tickets/closeticket.js @@ -0,0 +1,122 @@ +const { SlashCommandBuilder, PermissionsBitField, EmbedBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class CloseTicket extends BaseCommand { + /** + * + * @param {import("../../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("closeticket") + .setDescription(client.translate("tickets/closeticket:DESCRIPTION")) + .setDescriptionLocalizations({ + uk: client.translate("tickets/closeticket:DESCRIPTION", null, "uk-UA"), + ru: client.translate("tickets/closeticket:DESCRIPTION", null, "ru-RU"), + }) + .setDMPermission(false) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages), + aliases: [], + dirname: __dirname, + ownerOnly: false, + }); + } + + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").ChatInputCommandInteraction} interaction + * @param {Object} data + */ + async execute(client, interaction, data) { + await interaction.deferReply(); + + if (!interaction.channel.name.includes("support") && !interaction.channel.name.includes("application")) return interaction.error("tickets/adduser:NOT_TICKET", null, { ephemeral: true, edit: true }); + + const embed = new EmbedBuilder() + .setTitle(interaction.translate("tickets/closeticket:CLOSING_TITLE")) + .setDescription(interaction.translate("tickets/closeticket:CLOSING_DESC")) + .addFields( + { + name: interaction.translate("common:TICKET"), + value: interaction.channel.name, + }, + { + name: interaction.translate("tickets/closeticket:CLOSING_BY"), + value: interaction.user.getUsetname(), + }, + ) + .setColor(client.config.embed.color) + .setFooter(client.config.embed.footer) + .setTimestamp(); + + const button = new ButtonBuilder().setCustomId("cancel").setLabel(interaction.translate("common:CANCEL")).setStyle(ButtonStyle.Danger); + const row = new ActionRowBuilder().addComponents(button); + + await interaction.reply({ + embeds: [embed], + components: [row], + }); + + const filter = i => i.customId === "cancel"; + const collector = interaction.channel.createMessageComponentCollector({ filter, time: 5000 }); + + collector.on("collect", async i => { + await i.update({ content: interaction.translate("tickets/closeticket:CLOSING_CANCELED"), components: [] }); + collector.stop("canceled"); + }); + + collector.on("end", async (_, reason) => { + if (reason === "canceled") { + const transcriptionLogs = data.guildData.plugins.tickets.transcriptionLogs; + if (transcriptionLogs) interaction.guild.channels.cache.get(transcriptionLogs).send({ content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: `<#${transcriptionLogs}>` }), files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + const reversedMessages = await interaction.channel.messages.fetch(); + + const messages = Array.from(reversedMessages.values()).reverse(); + + let transcript = ""; + messages.forEach(message => { + transcript += `${message.author.username}: ${message.content}\n`; + }); + + try { + await interaction.user.send({ content: `Here is the transcript for your ticket: ${interaction.channel.name}`, files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + } catch (error) { + console.error(error); + await interaction.reply("An error occurred while trying to send the transcript to the user."); + } + + await interaction.channel.delete(); + } + }); + + const ticketLogs = data.guildData.plugins.tickets.ticketLogs; + const logEmbed = new EmbedBuilder() + .setTitle(interaction.translate("tickets/closeticket:CLOSED_TITLE")) + .addFields( + { + name: interaction.translate("common:TICKET"), + value: interaction.channel.name, + }, + { + name: interaction.translate("tickets/closeticket:CLOSING_BY"), + value: interaction.user.getUsetname(), + }, + ) + .setColor(client.config.embed.color) + .setFooter(client.config.embed.footer) + .setTimestamp(); + + if (ticketLogs) interaction.guild.channels.cache.get(ticketLogs).send({ embeds: [logEmbed] }); + } +} + +module.exports = CloseTicket; diff --git a/commands/Tickets/empty.js b/commands/Tickets/empty.js new file mode 100644 index 00000000..fb85ae69 --- /dev/null +++ b/commands/Tickets/empty.js @@ -0,0 +1,10 @@ +const { SlashCommandBuilder } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('test') + .setDescription('Replies with test'), + async execute(interaction) { + await interaction.reply('test'); + }, +}; \ No newline at end of file diff --git a/commands/Tickets/openTicketChannel.js b/commands/Tickets/openTicketChannel.js new file mode 100644 index 00000000..03c8cbcb --- /dev/null +++ b/commands/Tickets/openTicketChannel.js @@ -0,0 +1,32 @@ +const { SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ButtonStyle, ActionRowBuilder, PermissionFlagsBits } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('openticketchannel') + .setDescription('Creates an embed with buttons to open a ticket') + .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild), + async execute(interaction) { + // create embed for ticket + const embed = new EmbedBuilder() + .setTitle('Tickets') + .setDescription('Open a ticket by choosing a category below'); + + // add button for support and application + const supportButton = new ButtonBuilder() + .setCustomId('support') + .setLabel('Support') + .setStyle(ButtonStyle.Primary); + + const applicationButton = new ButtonBuilder() + .setCustomId('application') + .setLabel('Application') + .setStyle(ButtonStyle.Primary); + + const row = new ActionRowBuilder() + .addComponents(supportButton, applicationButton); + + // send message with buttons + await interaction.channel.send({ embeds: [embed], components: [row] }); + await interaction.reply('Done'); + }, +}; \ No newline at end of file diff --git a/commands/Tickets/removeuser.js b/commands/Tickets/removeuser.js new file mode 100644 index 00000000..0c985607 --- /dev/null +++ b/commands/Tickets/removeuser.js @@ -0,0 +1,35 @@ +const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('removeuser') + .setDescription('Remove a user from a ticket') + .addMentionableOption(option => + option.setName('user') + .setDescription('The user to remove') + .setRequired(true)) + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages), + async execute(interaction) { + try { + const user = interaction.options.getMentionable('user'); + const currentChannel = interaction.channel; + + if (currentChannel) { + if (!interaction.channel.name.includes('support') && !interaction.channel.name.includes('application')) { + interaction.reply('This command can only be used in a ticket channel.'); + return; + } + const member = await interaction.guild.members.fetch(user.id); + await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false }); + interaction.reply(`Removed ${user} to the ticket.`); + } + else { + interaction.reply('This channel is not a ticket.'); + } + } + catch (error) { + console.log(error); + interaction.reply('Error adding user to ticket.'); + } + }, +}; \ No newline at end of file diff --git a/commands/Tickets/rename.js b/commands/Tickets/rename.js new file mode 100644 index 00000000..1202acbe --- /dev/null +++ b/commands/Tickets/rename.js @@ -0,0 +1,27 @@ +const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('rename') + .setDescription('Renames the ticket channel. Usage: /rename ') + .addStringOption(option => + option.setName('newname') + .setDescription('The new name for the ticket channel') + .setRequired(true)) + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages), + async execute(interaction) { + try { + const newName = interaction.options.getString('newname'); + if (!interaction.channel.name.includes('support') && !interaction.channel.name.includes('application')) { + interaction.reply('This command can only be used in a ticket channel.'); + return; + } + await interaction.channel.setName(newName + '-' + interaction.channel.name.split('-')[1]); + interaction.reply(`Renamed the ticket channel to ${newName}`); + } + catch (error) { + console.error(error); + interaction.reply('An error occurred while trying to rename the ticket channel.'); + } + }, +}; \ No newline at end of file diff --git a/interactions.js b/interactions.js new file mode 100644 index 00000000..7506082f --- /dev/null +++ b/interactions.js @@ -0,0 +1,241 @@ +if (interaction.isModalSubmit()) { + const age = interaction.fields.getTextInputValue('age'); + const location = interaction.fields.getTextInputValue('location'); + const experience = interaction.fields.getTextInputValue('experience'); + const why = interaction.fields.getTextInputValue('why'); + + const embed = new EmbedBuilder() + .setTitle('Application') + .setDescription('Thank you for applying to the server!') + .addFields( + { name: 'Age', value: age }, + { name: 'Location', value: location }, + { name: 'Experience', value: experience }, + { name: 'Why', value: why }, + ) + .setColor('#00ff00') + .setTimestamp(); + + // create ticket channel in application category + const channel = await interaction.guild.channels.create({ + name: `${interaction.user.username}-application`, + type: ChannelType.GuildText, + parent: applicationTicketCategory, + permissionOverwrites: [ + { + id: interaction.user.id, + allow: [PermissionsBitField.Flags.ViewChannel], + }, + { + id: interaction.guild.roles.everyone, + deny: [PermissionsBitField.Flags.ViewChannel], + }, + ], + }); + + // for each role in config access_to_ticket array add permission to view channel + for (const role of access_to_ticket) { + await channel.permissionOverwrites.edit(role, { ViewChannel: true }); + } + + const pingMessage = access_to_ticket.map(role => `||<@&${role}>||`).join(' ') + ` ||${interaction.user}||`; + await channel.send(pingMessage); + + + // send message to ticket log channel + const logChannel = interaction.guild.channels.cache.get(ticketLogChannel); + await logChannel.send(`Ticket created by ${interaction.user} in ${channel}`); + + await interaction.reply({ content: `Your application has been submitted. Please wait for a response from a staff member. ${channel}`, ephemeral: true }); + + const closeButton = new ButtonBuilder() + .setCustomId('close') + .setLabel('Close') + .setStyle(ButtonStyle.Danger); + + const row = new ActionRowBuilder() + .addComponents(closeButton); + + await channel.send({ embeds: [embed], components: [row] }); +} +else if (interaction.isButton()) { + // handle openTicketChannel button interactions here + + // application button ---------------------------------------------------------------------------------------- + const button = interaction.component; + if (button.customId === 'application') { + // TODO: Create application embed builder by taking user input + + const modal = new ModalBuilder() + .setCustomId('application') + .setTitle('Application'); + + const ageInput = new TextInputBuilder() + .setCustomId('age') + .setLabel('Enter your age') + .setStyle(TextInputStyle.Short); + + const locationInput = new TextInputBuilder() + .setCustomId('location') + .setLabel('Enter your time zone and country') + .setStyle(TextInputStyle.Short); + + const experienceInput = new TextInputBuilder() + .setCustomId('experience') + .setLabel('Enter your experience with Minecraft') + .setStyle(TextInputStyle.Paragraph); + + const whyInput = new TextInputBuilder() + .setCustomId('why') + .setLabel('Why do you want to join this server?') + .setStyle(TextInputStyle.Paragraph); + + const modalRow1 = new ActionRowBuilder() + .addComponents(ageInput); + + const modalRow2 = new ActionRowBuilder() + .addComponents(locationInput); + + const modalRow3 = new ActionRowBuilder() + .addComponents(experienceInput); + + const modalRow4 = new ActionRowBuilder() + .addComponents(whyInput); + + modal.addComponents(modalRow1, modalRow2, modalRow3, modalRow4); + + await interaction.showModal(modal); + } + // support button ---------------------------------------------------------------------------------------- + if (button.customId === 'support') { + const channel = await interaction.guild.channels.create({ + name: `${interaction.user.username}-support`, + type: ChannelType.GuildText, + parent: supportTicketCategory, + permissionOverwrites: [ + { + id: interaction.user.id, + allow: [PermissionsBitField.Flags.ViewChannel], + }, + { + id: interaction.guild.roles.everyone, + deny: [PermissionsBitField.Flags.ViewChannel], + }, + ], + }); + + const logChannel = interaction.guild.channels.cache.get(ticketLogChannel); + const logEmbed = new EmbedBuilder() + .setTitle('Ticket Created') + .setDescription(`Ticket created by ${interaction.user} in ${channel}`) + .setTimestamp() + .setFooter({ text: 'Bot created by dylancanada' }); + + await logChannel.send({ embeds: [logEmbed] }); + await interaction.reply({ content: `Ticket created at ${channel}`, ephemeral: true }); + + for (const role of access_to_ticket) { + await channel.permissionOverwrites.edit(role, { ViewChannel: true }); + } + + const pingMessage = access_to_ticket.map(role => `||<@&${role}>||`).join(' '); + await channel.send(pingMessage); + + const embed = new EmbedBuilder() + .setTitle('Support Ticket') + .setDescription('Ticket created, click the button below to close the ticket') + .setAuthor({ name: interaction.user.username, iconURL: interaction.user.displayAvatarURL() }) + .addFields({ name: 'Ticket', value: `Please explain your issue ${interaction.user} and someone will be with you shortly`, inline: false }) + .setTimestamp() + .setFooter({ text: 'Bot created by dylancanada' }); + + const closeButton = new ButtonBuilder() + .setCustomId('close') + .setLabel('Close') + .setStyle(ButtonStyle.Danger); + + const row = new ActionRowBuilder() + .addComponents(closeButton); + + await channel.send({ embeds: [embed], components: [row] }); + + } + + if (button.customId === 'close') { + const closeEmbed = new EmbedBuilder() + .setTitle('Closing Ticket') + .setDescription('This ticket will be closed in 5 seconds.') + .addFields( + { name: 'Ticket', value: interaction.channel.name }, + { name: 'Closed By', value: interaction.user.username }, + ) + .setColor('#ff0000'); + + const closeButton = new ButtonBuilder() + .setCustomId('cancel') + .setLabel('Cancel') + .setStyle(ButtonStyle.Danger); + + const row = new ActionRowBuilder() + .addComponents(closeButton); + + await interaction.reply({ embeds: [closeEmbed], components: [row] }); + + const filter = i => i.customId === 'cancel'; + const collector = interaction.channel.createMessageComponentCollector({ filter, time: 5000 }); + + // eslint-disable-next-line no-unused-vars + collector.on('collect', async i => { + await i.update({ content: 'Ticket close cancelled.', components: [] }); + collector.stop(); + }); + + collector.on('end', async collected => { + if (collected.size === 0) { + const transcriptChannel = interaction.guild.channels.cache.get(ticketTranscriptChannel); + const reversedMessages = await interaction.channel.messages.fetch({ limit: 100 }); + + const messages = Array.from(reversedMessages.values()).reverse(); + + let transcript = ''; + messages.forEach(message => { + transcript += `${message.author.getUsername()}: ${message.content}\n`; + }); + + transcriptChannel.send({ content: `Transcript for ${interaction.channel.name}`, files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + + try { + await interaction.user.send({ content: `Here is the transcript for your ticket: ${interaction.channel.name}`, files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + } + catch (error) { + console.error(error); + await interaction.reply('An error occurred while trying to send the transcript to the user.'); + } + + await interaction.channel.delete(); + } + }); + } + + if (button.customId === 'transcript') { + const transcriptChannel = interaction.guild.channels.cache.get(ticketTranscriptChannel); + const reversedMessages = await interaction.channel.messages.fetch({ limit: 100 }); + + const messages = Array.from(reversedMessages.values()).reverse(); + + let transcript = ''; + messages.forEach(message => { + transcript += `${message.author.username}: ${message.content}\n`; + }); + + transcriptChannel.send({ content: `Transcript for ${interaction.channel.name}`, files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + + try { + await interaction.user.send({ content: `Here is the transcript for your ticket: ${interaction.channel.name}`, files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] }); + } + catch (error) { + console.error(error); + await interaction.reply('An error occurred while trying to send the transcript to the user.'); + } + } +} \ No newline at end of file diff --git a/languages/en-US/administration/set.json b/languages/en-US/administration/set.json index ce87964c..0b31d596 100644 --- a/languages/en-US/administration/set.json +++ b/languages/en-US/administration/set.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Modify a user's experience, level, credits, or bank", "USAGE": "[type] [@user] [int]", - "EXAMPLES": "set type:Level user:@Jonny_Bro#4226 int:10", + "EXAMPLES": "set type:Level user:@jonny_bro int:10", "INVALID_NUMBER": "The value must be greater than zero" } \ No newline at end of file diff --git a/languages/en-US/common.json b/languages/en-US/common.json index b7c752dd..bee73445 100644 --- a/languages/en-US/common.json +++ b/languages/en-US/common.json @@ -60,6 +60,7 @@ "STATUS_IDLE": "Idle", "STATUS_OFFLINE": "Offline", "STATUS_ONLINE": "Online", + "TICKET": "Ticket", "UNKNOWN": "Unknown", "USER": "User", "USERNAME": "Username", diff --git a/languages/en-US/economy/achievements.json b/languages/en-US/economy/achievements.json index e9ece2c3..af28fb9b 100644 --- a/languages/en-US/economy/achievements.json +++ b/languages/en-US/economy/achievements.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Shows a user's list of achievements", "USAGE": "(@user)", - "EXAMPLES": "achievements\nachievements user:@Jonny_Bro#4226", + "EXAMPLES": "achievements\nachievements user:@jonny_bro", "SEND_CMD": "Use your first command", "CLAIM_SALARY": "Claim your salary 10 times", "MARRY": "Find a partner", diff --git a/languages/en-US/economy/marry.json b/languages/en-US/economy/marry.json index 46d5216d..d5115c84 100644 --- a/languages/en-US/economy/marry.json +++ b/languages/en-US/economy/marry.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Marry the one you love", "USAGE": "[@user]", - "EXAMPLES": "marry user:@Jonny_Bro#4226", + "EXAMPLES": "marry user:@jonny_bro", "BOT_USER": "Bots are forever alone ;(", "ALREADY_MARRIED": "You are already married! You can divorce using the `divorce` command", "ALREADY_MARRIED_USER": "You're too late! {{user}} is already married", diff --git a/languages/en-US/economy/money.json b/languages/en-US/economy/money.json index f73f9a8d..be4cd618 100644 --- a/languages/en-US/economy/money.json +++ b/languages/en-US/economy/money.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Shows the amount of credits for a user", "USAGE": "(@user)", - "EXAMPLES": "money\nmoney user:@Jonny_Bro#4226", + "EXAMPLES": "money\nmoney user:@jonny_bro", "BOT_USER": "He has too much money, I can't output that number", "TITLE": "{{user}}'s Credits" } \ No newline at end of file diff --git a/languages/en-US/economy/pay.json b/languages/en-US/economy/pay.json index 9b5ff664..85a6c8f4 100644 --- a/languages/en-US/economy/pay.json +++ b/languages/en-US/economy/pay.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Sends credits to a user", "USAGE": "[@user] [amount]", - "EXAMPLES": "pay user:@Jonny_Bro#4226 amount:1000", + "EXAMPLES": "pay user:@jonny_bro amount:1000", "BOT_USER": "Bots don't need money B)", "YOURSELF": "You cannot transfer credits to yourself", "INVALID_AMOUNT": "Please specify an amount", diff --git a/languages/en-US/economy/profile.json b/languages/en-US/economy/profile.json index 3f63b78c..b39ff692 100644 --- a/languages/en-US/economy/profile.json +++ b/languages/en-US/economy/profile.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Shows user profile", "USAGE": "(@user)", - "EXAMPLES": "profile\nprofile user:@Jonny_Bro#4226", + "EXAMPLES": "profile\nprofile user:@jonny_bro", "BOT_USER": "Bots don't have a profile", "TITLE": "{{user}}'s Profile", "LINK": "Profile", diff --git a/languages/en-US/economy/rep.json b/languages/en-US/economy/rep.json index 5dd047eb..d3f45a79 100644 --- a/languages/en-US/economy/rep.json +++ b/languages/en-US/economy/rep.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Gives reputation to a user", "USAGE": "[@user]", - "EXAMPLES": "rep user:@Jonny_Bro#4226", + "EXAMPLES": "rep user:@jonny_bro", "COOLDOWN": "You must wait **{{time}}** before using it again", "BOT_USER": "Bots are already cool B)", "YOURSELF": "You cannot give reputation to yourself", diff --git a/languages/en-US/economy/rob.json b/languages/en-US/economy/rob.json index d47e67bc..48f43bfb 100644 --- a/languages/en-US/economy/rob.json +++ b/languages/en-US/economy/rob.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Attempts to rob a user", "USAGE": "[@user] [amount]", - "EXAMPLES": "rob user:@Jonny_Bro#4226 amount:100", + "EXAMPLES": "rob user:@jonny_bro amount:100", "BOT_USER": "You cannot rob a bot", "YOURSELF": "You cannot rob yourself", "NOT_ENOUGH_AUTHOR": "You must have at least {{moneyMin}} to rob this user (you currently have {{moneyCurrent}})", diff --git a/languages/en-US/fun/lovecalc.json b/languages/en-US/fun/lovecalc.json index 195bf2f2..f504a3e5 100644 --- a/languages/en-US/fun/lovecalc.json +++ b/languages/en-US/fun/lovecalc.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Love Calculator", "USAGE": "[@first_member] (@second_member)", - "EXAMPLES": "lovecalc first_member:@Jonny_Bro#4226\nlovecalc first_member:@Jonny_Bro#4226 second_member:@JaBa#9042", + "EXAMPLES": "lovecalc first_member:@jonny_bro\nlovecalc first_member:@jonny_bro second_member:@JaBa#9042", "CONTENT": "{{firstMember}} loves {{secondMember}} at **{{percent}}%**" } \ No newline at end of file diff --git a/languages/en-US/fun/tictactoe.json b/languages/en-US/fun/tictactoe.json index 6032ebae..3ef15c04 100644 --- a/languages/en-US/fun/tictactoe.json +++ b/languages/en-US/fun/tictactoe.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Play Tic Tac Toe", "USAGE": "[@user]", - "EXAMPLES": "tictactoe user:@Jonny_Bro#4226", + "EXAMPLES": "tictactoe user:@jonny_bro", "BOT_USER": "You cannot play against a bot!", "YOURSELF": "You cannot play against yourself!", "INVITE_USER": "<@{{opponent}}>, you have been invited to play Tic Tac Toe!", diff --git a/languages/en-US/general/avatar.json b/languages/en-US/general/avatar.json index b5e2e27c..e3c977cf 100644 --- a/languages/en-US/general/avatar.json +++ b/languages/en-US/general/avatar.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Gets user's avatar", "USAGE": "(@user)", - "EXAMPLES": "avatar\navatar user:@Jonny_Bro#4226", + "EXAMPLES": "avatar\navatar user:@jonny_bro", "SERVER": "Server avatar?" } \ No newline at end of file diff --git a/languages/en-US/general/report.json b/languages/en-US/general/report.json index 0e55b683..b530f8fa 100644 --- a/languages/en-US/general/report.json +++ b/languages/en-US/general/report.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Sends a report to a designated channel", "USAGE": "[@user] (message)", - "EXAMPLES": "report user:@Jonny_Bro#4226 message:Violation of rules", + "EXAMPLES": "report user:@jonny_bro message:Violation of rules", "MISSING_CHANNEL": "The report channel is not set up", "INVALID_USER": "You cannot report yourself", "SUCCESS": "Your report has been sent to {{channel}}", diff --git a/languages/en-US/general/userinfo.json b/languages/en-US/general/userinfo.json index 427d597a..4c1afe88 100644 --- a/languages/en-US/general/userinfo.json +++ b/languages/en-US/general/userinfo.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Shows user information", "USAGE": "(@user)", - "EXAMPLES": "userinfo\nuserinfo user:@Jonny_Bro#4226", + "EXAMPLES": "userinfo\nuserinfo user:@jonny_bro", "CUSTOM": "Custom Status", "NO_ACTIVITY": "Not playing", "NO_ROLE": "No role", diff --git a/languages/en-US/misc.json b/languages/en-US/misc.json index 5cc1bdc3..7e2cbb6a 100644 --- a/languages/en-US/misc.json +++ b/languages/en-US/misc.json @@ -1,5 +1,6 @@ { "BOT_USER": "You cannot do this with the bot.", + "CANT_DM": "I cannot DM you. Please check your privacy settings.", "FORCE_STOP": "The game has been forcibly ended, {{user}}, nobody won (the number was {{number}}).", "LEVEL_UP": "You have reached the next level! Your new level is: **{{level}}**", "GUILD_ONLY": "This command can only be used on a server.", diff --git a/languages/en-US/moderation/ban.json b/languages/en-US/moderation/ban.json new file mode 100644 index 00000000..0f429e89 --- /dev/null +++ b/languages/en-US/moderation/ban.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Bans a user", + "USAGE": "[@user] [reason]", + "EXAMPLES": "ban user:@jonny_bro reason:Violation of server rules", + "YOURSELF": "You cannot ban yourself", + "SUPERIOR": "You cannot ban this user (or I am unable to do so)", + "SUCCESS": "{{user}} has been banned for **{{reason}}**" +} \ No newline at end of file diff --git a/languages/en-US/moderation/clear.json b/languages/en-US/moderation/clear.json index 7e27abd9..0e07b02b 100644 --- a/languages/en-US/moderation/clear.json +++ b/languages/en-US/moderation/clear.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Clears messages in a channel", "USAGE": "[option] (@user)", - "EXAMPLES": "clear option:10\nclear option:10 user:@Jonny_Bro#4226\nclear option:all", + "EXAMPLES": "clear option:10\nclear option:10 user:@jonny_bro\nclear option:all", "OPTION": "Integer / all", "REQUIRE_ID_USER": "Specify a user or ID", "ALL_CONFIRM": "**All messages in the channel will be deleted! Are you sure?**", diff --git a/languages/en-US/moderation/clearwarns.json b/languages/en-US/moderation/clearwarns.json index 702063c9..994b3b2a 100644 --- a/languages/en-US/moderation/clearwarns.json +++ b/languages/en-US/moderation/clearwarns.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Removes all warnings from a user", "USAGE": "[@user]", - "EXAMPLES": "clearwarns user:@Jonny_Bro#4226", + "EXAMPLES": "clearwarns user:@jonny_bro", "SUCCESS": "Warnings of user {{user}} have been cleared" } \ No newline at end of file diff --git a/languages/en-US/moderation/kick.json b/languages/en-US/moderation/kick.json new file mode 100644 index 00000000..66667609 --- /dev/null +++ b/languages/en-US/moderation/kick.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Kicks a user", + "USAGE": "[@user] [reason]", + "EXAMPLES": "kick user:@jonny_bro reason:Come back tomorrow when I stop getting offended", + "YOURSELF": "You cannot kick yourself", + "SUPERIOR": "You cannot kick this user (or I am unable to do so)", + "SUCCESS": "{{user}} has been kicked for **{{reason}}**" +} \ No newline at end of file diff --git a/languages/en-US/moderation/untimeout.json b/languages/en-US/moderation/untimeout.json new file mode 100644 index 00000000..1ac0f2cf --- /dev/null +++ b/languages/en-US/moderation/untimeout.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Removes timeout from a user", + "USAGE": "[@user]", + "EXAMPLES": "untimeout user:@jonny_bro", + "YOURSELF": "You cannot remove timeout from yourself", + "NOT_TIMEDOUT": "This user is not currently timed out", + "SUCCESS": "Timeout for {{user}} has been removed" +} \ No newline at end of file diff --git a/languages/en-US/moderation/warns.json b/languages/en-US/moderation/warns.json index da284113..01b93385 100644 --- a/languages/en-US/moderation/warns.json +++ b/languages/en-US/moderation/warns.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Shows a list of user's violations", "USAGE": "[@user]", - "EXAMPLES": "warns user:@Jonny_Bro#4226", + "EXAMPLES": "warns user:@jonny_bro", "SANCTIONS_OF": "Violations of {{member}}", "NO_SANCTIONS": "**{{member}}** has no violations" } \ No newline at end of file diff --git a/languages/en-US/owner/debug.json b/languages/en-US/owner/debug.json index ae00a579..30f809df 100644 --- a/languages/en-US/owner/debug.json +++ b/languages/en-US/owner/debug.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Allows you to modify user's data", "USAGE": "[set/add] [type] [@user] [int]", - "EXAMPLES": "debug set type:Level user:@Jonny_Bro#4226 int:100", + "EXAMPLES": "debug set type:Level user:@jonny_bro int:100", "TYPE": "Type of data", "SET": "Set the value", "ADD": "Add to the value", diff --git a/languages/ru-RU/administration/set.json b/languages/ru-RU/administration/set.json index 30ed99cb..9c8c47b7 100644 --- a/languages/ru-RU/administration/set.json +++ b/languages/ru-RU/administration/set.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Изменить пользователю опыт, уровень, кредиты или банк", "USAGE": "[type] [@user] [int]", - "EXAMPLES": "set type:Уровень user:@Jonny_Bro#4226 int:10", + "EXAMPLES": "set type:Уровень user:@jonny_bro int:10", "INVALID_NUMBER": "Значение должно быть больше нуля" } \ No newline at end of file diff --git a/languages/ru-RU/common.json b/languages/ru-RU/common.json index 853598ab..9f2d5b72 100644 --- a/languages/ru-RU/common.json +++ b/languages/ru-RU/common.json @@ -60,6 +60,7 @@ "STATUS_IDLE": "Неактивен", "STATUS_OFFLINE": "Не в сети", "STATUS_ONLINE": "В сети", + "TICKET": "Тикет", "UNKNOWN": "Неизвестно", "USER": "Пользователь", "USERNAME": "Имя пользователя", diff --git a/languages/ru-RU/economy/achievements.json b/languages/ru-RU/economy/achievements.json index 5f2e25e4..267b4692 100644 --- a/languages/ru-RU/economy/achievements.json +++ b/languages/ru-RU/economy/achievements.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показать список достижений пользователя", "USAGE": "(@user)", - "EXAMPLES": "achievements\nachievements user:@Jonny_Bro#4226", + "EXAMPLES": "achievements\nachievements user:@jonny_bro", "SEND_CMD": "Используйте свою первую команду", "CLAIM_SALARY": "Получите зарплату 10 раз", "MARRY": "Найдите вторую половинку", diff --git a/languages/ru-RU/economy/marry.json b/languages/ru-RU/economy/marry.json index 2da1632e..152b42af 100644 --- a/languages/ru-RU/economy/marry.json +++ b/languages/ru-RU/economy/marry.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Женитесь на том, кого любите", "USAGE": "[@user]", - "EXAMPLES": "marry user:@Jonny_Bro#4226", + "EXAMPLES": "marry user:@jonny_bro", "BOT_USER": "Боты вечно одиноки ;(", "ALREADY_MARRIED": "Вы уже состоите в браке! Вы можете развестить с помощью команды `divorce`", "ALREADY_MARRIED_USER": "Вы опоздали! {{user}} уже состоит в браке", diff --git a/languages/ru-RU/economy/money.json b/languages/ru-RU/economy/money.json index be1b0841..7240250a 100644 --- a/languages/ru-RU/economy/money.json +++ b/languages/ru-RU/economy/money.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показать количество кредитов у пользователя", "USAGE": "(@user)", - "EXAMPLES": "money\nmoney user:@Jonny_Bro#4226", + "EXAMPLES": "money\nmoney user:@jonny_bro", "BOT_USER": "У него слишком много денег, я не могу вывести это число", "TITLE": "Кредиты {{user}}" } \ No newline at end of file diff --git a/languages/ru-RU/economy/pay.json b/languages/ru-RU/economy/pay.json index 93af80ac..968aee88 100644 --- a/languages/ru-RU/economy/pay.json +++ b/languages/ru-RU/economy/pay.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Отправить кредиты пользователю", "USAGE": "[@user] [amount]", - "EXAMPLES": "pay user:@Jonny_Bro#4226 amount:1000", + "EXAMPLES": "pay user:@jonny_bro amount:1000", "BOT_USER": "Ботам не нужны деньги B)", "YOURSELF": "Вы не можете перевести кредиты самому себе", "INVALID_AMOUNT": "Укажите сумму", diff --git a/languages/ru-RU/economy/profile.json b/languages/ru-RU/economy/profile.json index b93f9b60..31a8b2af 100644 --- a/languages/ru-RU/economy/profile.json +++ b/languages/ru-RU/economy/profile.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показать профиль пользователя", "USAGE": "(@user)", - "EXAMPLES": "profile\nprofile user:@Jonny_Bro#4226", + "EXAMPLES": "profile\nprofile user:@jonny_bro", "BOT_USER": "У ботов нет профиля", "TITLE": "Профиль {{user}}", "LINK": "Профиль", diff --git a/languages/ru-RU/economy/rep.json b/languages/ru-RU/economy/rep.json index a06cc6e4..e3b308fb 100644 --- a/languages/ru-RU/economy/rep.json +++ b/languages/ru-RU/economy/rep.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Дать репутацию пользователю", "USAGE": "[@user]", - "EXAMPLES": "rep user:@Jonny_Bro#4226", + "EXAMPLES": "rep user:@jonny_bro", "COOLDOWN": "Вы должны подождать **{{time}}** до следующего использования", "BOT_USER": "Боты и так крутые B)", "YOURSELF": "Вы не можете дать очко репутации самому себе", diff --git a/languages/ru-RU/economy/rob.json b/languages/ru-RU/economy/rob.json index 49302f4f..4cab2b4f 100644 --- a/languages/ru-RU/economy/rob.json +++ b/languages/ru-RU/economy/rob.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Попытаться ограбить пользователя", "USAGE": "[@user] [amount]", - "EXAMPLES": "rob user:@Jonny_Bro#4226 amount:100", + "EXAMPLES": "rob user:@jonny_bro amount:100", "BOT_USER": "Вы не можете ограбить бота", "YOURSELF": "Вы не можете ограбить себя", "NOT_ENOUGH_AUTHOR": "У вас должно быть хотя бы {{moneyMin}}, чтобы грабить данного пользователя (сейчас у вас {{moneyCurrent}})", diff --git a/languages/ru-RU/fun/lovecalc.json b/languages/ru-RU/fun/lovecalc.json index 5fc47a1a..c924bf25 100644 --- a/languages/ru-RU/fun/lovecalc.json +++ b/languages/ru-RU/fun/lovecalc.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Калькулятор любви", "USAGE": "[@first_member] (@second_member)", - "EXAMPLES": "lovecalc first_member:@Jonny_Bro#4226\nlovecalc first_member:@Jonny_Bro#4226 second_member:@JaBa#9042", + "EXAMPLES": "lovecalc first_member:@jonny_bro\nlovecalc first_member:@jonny_bro second_member:@JaBa#9042", "CONTENT": "{{firstMember}} любит {{secondMember}} на **{{percent}}%**" } \ No newline at end of file diff --git a/languages/ru-RU/fun/tictactoe.json b/languages/ru-RU/fun/tictactoe.json index 260f934c..1b0fa83f 100644 --- a/languages/ru-RU/fun/tictactoe.json +++ b/languages/ru-RU/fun/tictactoe.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Крестики-нолики", "USAGE": "[@user]", - "EXAMPLES": "tictactoe user:@Jonny_Bro#4226", + "EXAMPLES": "tictactoe user:@jonny_bro", "BOT_USER": "Вы не можете играть против бота!", "YOURSELF": "Вы не можете играть с самим собой!", "INVITE_USER": "<@{{opponent}}>, вам предложили сыграть в крестики-нолики!", diff --git a/languages/ru-RU/general/avatar.json b/languages/ru-RU/general/avatar.json index 9dd527ef..520675f1 100644 --- a/languages/ru-RU/general/avatar.json +++ b/languages/ru-RU/general/avatar.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Возвращает аватар пользователя", "USAGE": "(@user)", - "EXAMPLES": "avatar\navatar user:@Jonny_Bro#4226", + "EXAMPLES": "avatar\navatar user:@jonny_bro", "SERVER": "Аватар сервера?" } \ No newline at end of file diff --git a/languages/ru-RU/general/report.json b/languages/ru-RU/general/report.json index e562a2ab..c6c7a468 100644 --- a/languages/ru-RU/general/report.json +++ b/languages/ru-RU/general/report.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Отправить жалобу в специальный канал", "USAGE": "[@user] (message)", - "EXAMPLES": "report user:@Jonny_Bro#4226 message:Нарушение правил", + "EXAMPLES": "report user:@jonny_bro message:Нарушение правил", "MISSING_CHANNEL": "Канал для жалоб не настроен", "INVALID_USER": "Вы не можете пожаловаться на себя", "SUCCESS": "Ваша жалоба отправлена в {{channel}}", diff --git a/languages/ru-RU/general/userinfo.json b/languages/ru-RU/general/userinfo.json index dac68d28..98c3e942 100644 --- a/languages/ru-RU/general/userinfo.json +++ b/languages/ru-RU/general/userinfo.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показать информацию о пользователе", "USAGE": "(@user)", - "EXAMPLES": "userinfo\nuserinfo user:@Jonny_Bro#4226", + "EXAMPLES": "userinfo\nuserinfo user:@jonny_bro", "CUSTOM": "Пользовательский статус", "NO_ACTIVITY": "Не играет", "NO_ROLE": "Нет роли", diff --git a/languages/ru-RU/misc.json b/languages/ru-RU/misc.json index e3770d97..7a9d84e3 100644 --- a/languages/ru-RU/misc.json +++ b/languages/ru-RU/misc.json @@ -1,5 +1,6 @@ { "BOT_USER": "Вы не можете сделать это с ботом", + "CANT_DM": "Я не могу отправить Вам личное сообщение, проверьте настройки конфиденциальности", "FORCE_STOP": "Игра принудительно окончена {{user}}, никто не победил (загаданное число - {{number}})", "LEVEL_UP": "Вы достигли следующего уровня! Ваш новый уровень: **{{level}}**", "GUILD_ONLY": "Данную команду можно использовать только на сервере", diff --git a/languages/ru-RU/moderation/ban.json b/languages/ru-RU/moderation/ban.json new file mode 100644 index 00000000..32cde2a3 --- /dev/null +++ b/languages/ru-RU/moderation/ban.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Забанить пользователя", + "USAGE": "[@user] [reason]", + "EXAMPLES": "ban user:@jonny_bro reason:Нарушение правил сервера", + "YOURSELF": "Вы не можете забанить себя", + "SUPERIOR": "Вы не можете забанить данного пользователя (или я не могу сделать этого)", + "SUCCESS": "{{user}} был забанен по причине **{{reason}}**" +} \ No newline at end of file diff --git a/languages/ru-RU/moderation/clear.json b/languages/ru-RU/moderation/clear.json index e52c7a81..0ab2aeb8 100644 --- a/languages/ru-RU/moderation/clear.json +++ b/languages/ru-RU/moderation/clear.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Очистка сообщений в канале", "USAGE": "[option] (@user)", - "EXAMPLES": "clear option:10\nclear option:10 user:@Jonny_Bro#4226\nclear option:all", + "EXAMPLES": "clear option:10\nclear option:10 user:@jonny_bro\nclear option:all", "OPTION": "Целое число / all", "REQUIRE_ID_USER": "Укажите пользователя или ID", "ALL_CONFIRM": "**Все сообщения в канале будут удалены! Вы уверены?**", diff --git a/languages/ru-RU/moderation/clearwarns.json b/languages/ru-RU/moderation/clearwarns.json index a3b1e79a..5385e3e8 100644 --- a/languages/ru-RU/moderation/clearwarns.json +++ b/languages/ru-RU/moderation/clearwarns.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Снять все предупреждения с пользователя", "USAGE": "[@user]", - "EXAMPLES": "clearwarns user:@Jonny_Bro#4226", + "EXAMPLES": "clearwarns user:@jonny_bro", "SUCCESS": "Предупреждения пользователя {{user}} удалены" } \ No newline at end of file diff --git a/languages/ru-RU/moderation/kick.json b/languages/ru-RU/moderation/kick.json new file mode 100644 index 00000000..5250eac9 --- /dev/null +++ b/languages/ru-RU/moderation/kick.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Кикнуть пользователя", + "USAGE": "[@user] [reason]", + "EXAMPLES": "kick user:@jonny_bro reason:Зайдёшь завтра когда я перестану обижаться", + "YOURSELF": "Вы не можете кикнуть себя", + "SUPERIOR": "Вы не можете кикнуть данного пользователя (или я не могу сделать этого)", + "SUCCESS": "{{user}} был кикнут по причине **{{reason}}**" +} \ No newline at end of file diff --git a/languages/ru-RU/moderation/untimeout.json b/languages/ru-RU/moderation/untimeout.json new file mode 100644 index 00000000..b4bea9a1 --- /dev/null +++ b/languages/ru-RU/moderation/untimeout.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Снять таймаут с пользователя", + "USAGE": "[@user]", + "EXAMPLES": "untimeout user:@jonny_bro", + "YOURSELF": "Вы не можете снять с себя таймаут", + "NOT_TIMEDOUT": "Данный пользователь не находится в таймауте", + "SUCCESS": "Таймаут с {{user}} снят" +} \ No newline at end of file diff --git a/languages/ru-RU/moderation/warns.json b/languages/ru-RU/moderation/warns.json index 5de802bb..0be8dca2 100644 --- a/languages/ru-RU/moderation/warns.json +++ b/languages/ru-RU/moderation/warns.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показать список нарушений пользователя", "USAGE": "[@user]", - "EXAMPLES": "warns user:@Jonny_Bro#4226", + "EXAMPLES": "warns user:@jonny_bro", "SANCTIONS_OF": "Нарушения {{member}}", "NO_SANCTIONS": "У **{{member}}** нет нарушений" } \ No newline at end of file diff --git a/languages/ru-RU/owner/debug.json b/languages/ru-RU/owner/debug.json index 21f4479c..47b172f7 100644 --- a/languages/ru-RU/owner/debug.json +++ b/languages/ru-RU/owner/debug.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Позволяет изменять данные пользователя", "USAGE": "[set/add] [type] [@user] [int]", - "EXAMPLES": "debug set type:Уровень user:@Jonny_Bro#4226 int:100", + "EXAMPLES": "debug set type:Уровень user:@jonny_bro int:100", "TYPE": "Тип данных", "SET": "Установить значение", "ADD": "Добавить к значению", diff --git a/languages/ru-RU/tickets/adduser.json b/languages/ru-RU/tickets/adduser.json new file mode 100644 index 00000000..bd4dc3fe --- /dev/null +++ b/languages/ru-RU/tickets/adduser.json @@ -0,0 +1,7 @@ +{ + "DESCRIPTION": "Добавить пользователя в тикет", + "USAGE": "[@user]", + "EXAMPLES": "adduser user:@jonny_bro", + "NOT_TICKET": "Данный канал не является тикетом", + "SUCCESS": "{{user}} добавлен в тикет" +} \ No newline at end of file diff --git a/languages/ru-RU/tickets/closeticket.json b/languages/ru-RU/tickets/closeticket.json new file mode 100644 index 00000000..d808d4b7 --- /dev/null +++ b/languages/ru-RU/tickets/closeticket.json @@ -0,0 +1,11 @@ +{ + "DESCRIPTION": "Закрыть тикет", + "USAGE": "", + "EXAMPLES": "closeticket", + "CLOSING_TITLE": "Закрытие тикета", + "CLOSING_DESC": "Тикет закроется через 5 секунд", + "CLOSING_BY": "Тикет закрыл", + "CLOSING_CANCELED": "Закрытие тикета отменено", + "CLOSED_TITLE": "Тикет закрыт", + "TRANSCRIPT": "Копия сообщений из {{channel}}" +} \ No newline at end of file diff --git a/languages/uk-UA/administration/set.json b/languages/uk-UA/administration/set.json index dfc9eae9..d2d92d62 100644 --- a/languages/uk-UA/administration/set.json +++ b/languages/uk-UA/administration/set.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Змінити користувачу досвід, рівень, кредити або банк", "USAGE": "[type] [@user] [int]", - "EXAMPLES": "set type:Рівень user:@Jonny_Bro#4226 int:10", + "EXAMPLES": "set type:Рівень user:@jonny_bro int:10", "INVALID_NUMBER": "Значення має бути більшим за нуль" } \ No newline at end of file diff --git a/languages/uk-UA/common.json b/languages/uk-UA/common.json index 28f092cf..34ff3166 100644 --- a/languages/uk-UA/common.json +++ b/languages/uk-UA/common.json @@ -59,6 +59,7 @@ "STATUS_IDLE": "Неактивний", "STATUS_OFFLINE": "Не в мережі", "STATUS_ONLINE": "У мережі", + "TICKET": "Тікет", "UNKNOWN": "Невідомо", "USER": "Користувач", "USERNAME": "Ім'я користувача", diff --git a/languages/uk-UA/dashboard.json b/languages/uk-UA/dashboard.json index 4399f1a4..9996ddfb 100644 --- a/languages/uk-UA/dashboard.json +++ b/languages/uk-UA/dashboard.json @@ -70,12 +70,12 @@ }, "sweetalert": { "errors": { - "settingsSave": "Произошла ошибка при сохранении настроек." + "settingsSave": "Сталася помилка при збереженні налаштувань." }, "success": { - "settingsSave": "Настройки успешно сохранены.", - "login": "Вход успешно выполнен.", - "logout": "Выход успешно выполнен." + "settingsSave": "Налаштування успішно збережені.", + "login": "Успішний вхід.", + "logout": "Успішний вихід." } }, "preloader": { diff --git a/languages/uk-UA/economy/achievements.json b/languages/uk-UA/economy/achievements.json index 5455de93..be5caa78 100644 --- a/languages/uk-UA/economy/achievements.json +++ b/languages/uk-UA/economy/achievements.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показати список досягнень користувача", "USAGE": "(@user)", - "EXAMPLES": "achievements\nachievements user:@Jonny_Bro#4226", + "EXAMPLES": "achievements\nachievements user:@jonny_bro", "SEND_CMD": "Використовуйте свою першу команду", "CLAIM_SALARY": "Отримайте зарплату 10 разів", "MARRY": "Знайдіть другу половинку", diff --git a/languages/uk-UA/economy/marry.json b/languages/uk-UA/economy/marry.json index d855649e..3d4665c4 100644 --- a/languages/uk-UA/economy/marry.json +++ b/languages/uk-UA/economy/marry.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Одружуйтеся з тим, кого любите", "USAGE": "[@user]", - "EXAMPLES": "marry user:@Jonny_Bro#4226", + "EXAMPLES": "marry user:@jonny_bro", "BOT_USER": "Боти завжди самотні ;(", "ALREADY_MARRIED": "Ви вже одружені! Ви можете розвести за допомогою команди `divorce`", "ALREADY_MARRIED_USER": "Ви запізнилися! {{user}} вже одружений", diff --git a/languages/uk-UA/economy/money.json b/languages/uk-UA/economy/money.json index e7600263..3a85702e 100644 --- a/languages/uk-UA/economy/money.json +++ b/languages/uk-UA/economy/money.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показати кількість кредитів у користувача", "USAGE": "(@user)", - "EXAMPLES": "money\nmoney user:@Jonny_Bro#4226", + "EXAMPLES": "money\nmoney user:@jonny_bro", "BOT_USER": "У нього занадто багато грошей, я не можу написати це число", "TITLE": "{{user}} Кредити" } \ No newline at end of file diff --git a/languages/uk-UA/economy/pay.json b/languages/uk-UA/economy/pay.json index a8fb9903..420b0012 100644 --- a/languages/uk-UA/economy/pay.json +++ b/languages/uk-UA/economy/pay.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Надіслати кредити користувачу", "USAGE": "[@user] [amount]", - "EXAMPLES": "pay user:@Jonny_Bro#4226 amount:1000", + "EXAMPLES": "pay user:@jonny_bro amount:1000", "BOT_USER": "Ботам не потрібні гроші B)", "YOURSELF": "Ви не можете переказати кредити самому собі", "INVALID_AMOUNT": "Вкажіть суму", diff --git a/languages/uk-UA/economy/profile.json b/languages/uk-UA/economy/profile.json index 2262bd1a..d0280c11 100644 --- a/languages/uk-UA/economy/profile.json +++ b/languages/uk-UA/economy/profile.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показати профіль користувача", "USAGE": "(@user)", - "EXAMPLES": "profile\nprofile user:@Jonny_Bro#4226", + "EXAMPLES": "profile\nprofile user:@jonny_bro", "BOT_USER": "Боти не мають профілю", "TITLE": "Профіль {{user}}", "LINK": "Профіль", diff --git a/languages/uk-UA/economy/rep.json b/languages/uk-UA/economy/rep.json index 40b6c5fd..a4c6a23c 100644 --- a/languages/uk-UA/economy/rep.json +++ b/languages/uk-UA/economy/rep.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Дати репутацію користувачеві", "USAGE": "[@user]", - "EXAMPLES": "rep user:@Jonny_Bro#4226", + "EXAMPLES": "rep user:@jonny_bro", "COOLDOWN": "Ви повинні почекати **{{time}}** до наступного використання", "BOT_USER": "Боти і так круті B)", "YOURSELF": "Ви не можете дати поінт репутації самому собі", diff --git a/languages/uk-UA/economy/rob.json b/languages/uk-UA/economy/rob.json index a61aaf7a..d2ddff4f 100644 --- a/languages/uk-UA/economy/rob.json +++ b/languages/uk-UA/economy/rob.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Спробувати пограбувати користувача", "USAGE": "[@user] [amount]", - "EXAMPLES": "rob user:@Jonny_Bro#4226 amount:100", + "EXAMPLES": "rob user:@jonny_bro amount:100", "BOT_USER": "Ви не можете пограбувати бота", "YOURSELF": "Ви не можете пограбувати себе", "NOT_ENOUGH_AUTHOR": "У вас має бути хоча б {{moneyMin}}, щоб грабувати цього користувача (зараз у вас {{moneyCurrent}})", diff --git a/languages/uk-UA/fun/lovecalc.json b/languages/uk-UA/fun/lovecalc.json index 65f4e173..b4ad1ead 100644 --- a/languages/uk-UA/fun/lovecalc.json +++ b/languages/uk-UA/fun/lovecalc.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Калькулятор кохання", "USAGE": "[@first_member] (@second_member)", - "EXAMPLES": "lovecalc first_member:@Jonny_Bro#4226\nlovecalc first_member:@Jonny_Bro#4226 second_member:@JaBa#9042", + "EXAMPLES": "lovecalc first_member:@jonny_bro\nlovecalc first_member:@jonny_bro second_member:@JaBa#9042", "CONTENT": "{{firstMember}} кохає {{secondMember}} на **{{percent}}%**" } \ No newline at end of file diff --git a/languages/uk-UA/fun/tictactoe.json b/languages/uk-UA/fun/tictactoe.json index 02b0a71e..27fcf37c 100644 --- a/languages/uk-UA/fun/tictactoe.json +++ b/languages/uk-UA/fun/tictactoe.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Хрестики-нуліки", "USAGE": "[@user]", - "EXAMPLES": "tictactoe user:@Jonny_Bro#4226", + "EXAMPLES": "tictactoe user:@jonny_bro", "BOT_USER": "Ви не можете грати проти бота", "YOURSELF": "Ви не можете грати із самим собою", "INVITE_USER": "<@{{opponent}}>, вам запропонували зіграти в хрестики-нуліки", diff --git a/languages/uk-UA/general/avatar.json b/languages/uk-UA/general/avatar.json index dc24bade..ed1ffb1c 100644 --- a/languages/uk-UA/general/avatar.json +++ b/languages/uk-UA/general/avatar.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Повертає аватар користувача", "USAGE": "(@user)", - "EXAMPLES": "avatar\navatar user:@Jonny_Bro#4226", + "EXAMPLES": "avatar\navatar user:@jonny_bro", "SERVER": "Аватар сервера?" } \ No newline at end of file diff --git a/languages/uk-UA/general/report.json b/languages/uk-UA/general/report.json index a386a281..932e5ac9 100644 --- a/languages/uk-UA/general/report.json +++ b/languages/uk-UA/general/report.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Надіслати скаргу до спеціального каналу", "USAGE": "[@user] (message)", - "EXAMPLES": "report user:@Jonny_Bro#4226 message:Порушення правил", + "EXAMPLES": "report user:@jonny_bro message:Порушення правил", "MISSING_CHANNEL": "Канал для скарг не налаштований", "INVALID_USER": "Ви не можете поскаржитися на себе", "SUCCESS": "Ваша скарга надіслана в {{channel}}", diff --git a/languages/uk-UA/general/userinfo.json b/languages/uk-UA/general/userinfo.json index 00594efb..735aa26a 100644 --- a/languages/uk-UA/general/userinfo.json +++ b/languages/uk-UA/general/userinfo.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показати інформацію про користувача", "USAGE": "(@user)", - "EXAMPLES": "userinfo\nuserinfo user:@Jonny_Bro#4226", + "EXAMPLES": "userinfo\nuserinfo user:@jonny_bro", "CUSTOM": "Стан користувача", "NO_ACTIVITY": "Не грає", "NO_ROLE": "Немає ролі", diff --git a/languages/uk-UA/misc.json b/languages/uk-UA/misc.json index 02902900..6cb6a532 100644 --- a/languages/uk-UA/misc.json +++ b/languages/uk-UA/misc.json @@ -1,5 +1,6 @@ { "BOT_USER": "Ви не можете зробити це з ботом", + "CANT_DM": "Я не можу надіслати Вам особисте повідомлення, перевірте налаштування конфіденційності.", "FORCE_STOP": "Гра примусово закінчена, {{user}}, ніхто не переміг (загадане число - {{number}}).", "LEVEL_UP": "Ви досягли наступного рівня! Ваш новий рівень: **{{level}}**", "GUILD_ONLY": "Цю команду можна використовувати лише на сервері", diff --git a/languages/uk-UA/moderation/ban.json b/languages/uk-UA/moderation/ban.json new file mode 100644 index 00000000..4366834a --- /dev/null +++ b/languages/uk-UA/moderation/ban.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Забанити користувача", + "USAGE": "[@user] [reason]", + "EXAMPLES": "ban user:@jonny_bro reason:Порушення правил сервера", + "YOURSELF": "Ви не можете забанити себе", + "SUPERIOR": "Ви не можете забанити даного користувача (або я не можу цього зробити)", + "SUCCESS": "{{user}} був забанений з причини **{{reason}}**" +} \ No newline at end of file diff --git a/languages/uk-UA/moderation/clear.json b/languages/uk-UA/moderation/clear.json index 7a91eba5..af1f8b27 100644 --- a/languages/uk-UA/moderation/clear.json +++ b/languages/uk-UA/moderation/clear.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Очищення повідомлень у каналі", "USAGE": "[option] (@user)", - "EXAMPLES": "clear option:10\nclear option:10 user:@Jonny_Bro#4226\nclear option:all", + "EXAMPLES": "clear option:10\nclear option:10 user:@jonny_bro\nclear option:all", "OPTION": "Ціле число / all", "REQUIRE_ID_USER": "Вкажіть користувача або ID", "ALL_CONFIRM": "**Всі повідомлення в каналі будуть видалені! Ви впевнені?**", diff --git a/languages/uk-UA/moderation/clearwarns.json b/languages/uk-UA/moderation/clearwarns.json index ddd2d512..5acae0f6 100644 --- a/languages/uk-UA/moderation/clearwarns.json +++ b/languages/uk-UA/moderation/clearwarns.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Зняти усі попередження з користувача", "USAGE": "[@user]", - "EXAMPLES": "clearwarns user:@Jonny_Bro#4226", + "EXAMPLES": "clearwarns user:@jonny_bro", "SUCCESS": "Попередження користувача {{user}} видалено" } \ No newline at end of file diff --git a/languages/uk-UA/moderation/kick.json b/languages/uk-UA/moderation/kick.json new file mode 100644 index 00000000..b36f6a77 --- /dev/null +++ b/languages/uk-UA/moderation/kick.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Вигнати користувача", + "USAGE": "[@user] [reason]", + "EXAMPLES": "kick user:@jonny_bro reason:Зайдеш завтра коли я перестану ображатись", + "YOURSELF": "Ви не можете вигнати себе", + "SUPERIOR": "Ви не можете вигнати даного користувача (або я не можу цього зробити)", + "SUCCESS": "{{user}} був вигнаний з причини **{{reason}}**" +} \ No newline at end of file diff --git a/languages/uk-UA/moderation/untimeout.json b/languages/uk-UA/moderation/untimeout.json new file mode 100644 index 00000000..9ecd4f6a --- /dev/null +++ b/languages/uk-UA/moderation/untimeout.json @@ -0,0 +1,8 @@ +{ + "DESCRIPTION": "Зняти таймаут з користувача", + "USAGE": "[@user]", + "EXAMPLES": "untimeout user:@jonny_bro", + "YOURSELF": "Ви не можете зняти таймаут з себе", + "NOT_TIMEDOUT": "Даний користувач не перебуває у таймауті", + "SUCCESS": "Таймаут з {{user}} знятий" +} \ No newline at end of file diff --git a/languages/uk-UA/moderation/warns.json b/languages/uk-UA/moderation/warns.json index 543a844b..539893c1 100644 --- a/languages/uk-UA/moderation/warns.json +++ b/languages/uk-UA/moderation/warns.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Показати список порушень користувача", "USAGE": "[@user]", - "EXAMPLES": "warns user:@Jonny_Bro#4226", + "EXAMPLES": "warns user:@jonny_bro", "SANCTIONS_OF": "Порушення {{member}}", "NO_SANCTIONS": "**{{member}}** не має порушень" } \ No newline at end of file diff --git a/languages/uk-UA/owner/debug.json b/languages/uk-UA/owner/debug.json index c4606799..75ef9bb5 100644 --- a/languages/uk-UA/owner/debug.json +++ b/languages/uk-UA/owner/debug.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Дозволяє змінювати дані користувача", "USAGE": "[set/add] [type] [@user] [int]", - "EXAMPLES": "debug set type:Рівень user:@Jonny_Bro#4226 int:100", + "EXAMPLES": "debug set type:Рівень user:@jonny_bro int:100", "TYPE": "Тип даних", "SET": "Встановити значення", "ADD": "Додати до значення", diff --git a/package.json b/package.json index 27f25701..87dc15c6 100644 --- a/package.json +++ b/package.json @@ -51,71 +51,25 @@ "ecmaVersion": 2020 }, "rules": { - "arrow-spacing": [ - "warn", - { - "before": true, - "after": true - } - ], - "comma-dangle": [ - "error", - "always-multiline" - ], + "arrow-spacing": ["warn", { "before": true, "after": true }], + "comma-dangle": ["error", "always-multiline"], "comma-spacing": "error", "comma-style": "error", - "dot-location": [ - "error", - "property" - ], + "dot-location": ["error", "property"], "handle-callback-err": "off", - "indent": [ - "error", - "tab", - { - "SwitchCase": 1 - } - ], + "indent": ["error", "tab", { "SwitchCase": 1 }], "keyword-spacing": "error", - "max-nested-callbacks": [ - "error", - { - "max": 4 - } - ], - "max-statements-per-line": [ - "error", - { - "max": 2 - } - ], + "max-nested-callbacks": ["error", { "max": 4 }], + "max-statements-per-line": ["error", { "max": 2 }], "no-console": "off", "no-multi-spaces": "error", - "no-multiple-empty-lines": [ - "error", - { - "max": 2, - "maxEOF": 1, - "maxBOF": 0 - } - ], - "no-trailing-spaces": [ - "error" - ], + "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], + "no-trailing-spaces": ["error"], "no-var": "error", - "object-curly-spacing": [ - "error", - "always" - ], + "object-curly-spacing": ["error", "always"], "prefer-const": "error", - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ], + "quotes": ["error", "double"], + "semi": ["error", "always"], "space-in-parens": "error", "space-infix-ops": "error", "space-unary-ops": "error",