mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-12-04 19:06:25 +05:00
v4.6.3
This commit is contained in:
parent
9af053061d
commit
5dceb1abd4
19 changed files with 872 additions and 708 deletions
|
@ -48,7 +48,7 @@ class JaBaClient extends Client {
|
||||||
await this.player.extractors.register(YoutubeiExtractor, {
|
await this.player.extractors.register(YoutubeiExtractor, {
|
||||||
authentication: this.config.youtubeCookie,
|
authentication: this.config.youtubeCookie,
|
||||||
streamOptions: {
|
streamOptions: {
|
||||||
useClient: "ANDROID",
|
useClient: "WEB",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Addemoji extends BaseCommand {
|
||||||
})
|
})
|
||||||
.then(emoji =>
|
.then(emoji =>
|
||||||
interaction.success("administration/stealemoji:SUCCESS", {
|
interaction.success("administration/stealemoji:SUCCESS", {
|
||||||
emoji: emoji.name,
|
emoji: emoji.toString(),
|
||||||
}, { ephemeral: true }),
|
}, { ephemeral: true }),
|
||||||
)
|
)
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Stealemoji extends BaseCommand {
|
||||||
})
|
})
|
||||||
.then(emoji =>
|
.then(emoji =>
|
||||||
interaction.success("administration/stealemoji:SUCCESS", {
|
interaction.success("administration/stealemoji:SUCCESS", {
|
||||||
emoji: emoji.name,
|
emoji: emoji.toString(),
|
||||||
}, { ephemeral: true }),
|
}, { ephemeral: true }),
|
||||||
)
|
)
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -23,8 +23,7 @@ class Birthdate extends BaseCommand {
|
||||||
.setDescriptionLocalizations({
|
.setDescriptionLocalizations({
|
||||||
uk: client.translate("economy/birthdate:DAY", null, "uk-UA"),
|
uk: client.translate("economy/birthdate:DAY", null, "uk-UA"),
|
||||||
ru: client.translate("economy/birthdate:DAY", null, "ru-RU"),
|
ru: client.translate("economy/birthdate:DAY", null, "ru-RU"),
|
||||||
})
|
}),
|
||||||
.setRequired(true),
|
|
||||||
)
|
)
|
||||||
.addIntegerOption(option =>
|
.addIntegerOption(option =>
|
||||||
option
|
option
|
||||||
|
@ -34,20 +33,19 @@ class Birthdate extends BaseCommand {
|
||||||
uk: client.translate("economy/birthdate:MONTH", null, "uk-UA"),
|
uk: client.translate("economy/birthdate:MONTH", null, "uk-UA"),
|
||||||
ru: client.translate("economy/birthdate:MONTH", null, "ru-RU"),
|
ru: client.translate("economy/birthdate:MONTH", null, "ru-RU"),
|
||||||
})
|
})
|
||||||
.setRequired(true)
|
|
||||||
.setChoices(
|
.setChoices(
|
||||||
{ name: client.translate("economy/birthdate:JANUARY"), value: 1 },
|
{ name: client.translate("misc:MONTHS:JANUARY"), value: 1 },
|
||||||
{ name: client.translate("economy/birthdate:FEBRUARY"), value: 2 },
|
{ name: client.translate("misc:MONTHS:FEBRUARY"), value: 2 },
|
||||||
{ name: client.translate("economy/birthdate:MARCH"), value: 3 },
|
{ name: client.translate("misc:MONTHS:MARCH"), value: 3 },
|
||||||
{ name: client.translate("economy/birthdate:APRIL"), value: 4 },
|
{ name: client.translate("misc:MONTHS:APRIL"), value: 4 },
|
||||||
{ name: client.translate("economy/birthdate:MAY"), value: 5 },
|
{ name: client.translate("misc:MONTHS:MAY"), value: 5 },
|
||||||
{ name: client.translate("economy/birthdate:JUNE"), value: 6 },
|
{ name: client.translate("misc:MONTHS:JUNE"), value: 6 },
|
||||||
{ name: client.translate("economy/birthdate:JULY"), value: 7 },
|
{ name: client.translate("misc:MONTHS:JULY"), value: 7 },
|
||||||
{ name: client.translate("economy/birthdate:AUGUST"), value: 8 },
|
{ name: client.translate("misc:MONTHS:AUGUST"), value: 8 },
|
||||||
{ name: client.translate("economy/birthdate:SEPTEMBER"), value: 9 },
|
{ name: client.translate("misc:MONTHS:SEPTEMBER"), value: 9 },
|
||||||
{ name: client.translate("economy/birthdate:OCTOBER"), value: 10 },
|
{ name: client.translate("misc:MONTHS:OCTOBER"), value: 10 },
|
||||||
{ name: client.translate("economy/birthdate:NOVEMBER"), value: 11 },
|
{ name: client.translate("misc:MONTHS:NOVEMBER"), value: 11 },
|
||||||
{ name: client.translate("economy/birthdate:DECEMBER"), value: 12 },
|
{ name: client.translate("misc:MONTHS:DECEMBER"), value: 12 },
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.addIntegerOption(option =>
|
.addIntegerOption(option =>
|
||||||
|
@ -57,8 +55,16 @@ class Birthdate extends BaseCommand {
|
||||||
.setDescriptionLocalizations({
|
.setDescriptionLocalizations({
|
||||||
uk: client.translate("economy/birthdate:YEAR", null, "uk-UA"),
|
uk: client.translate("economy/birthdate:YEAR", null, "uk-UA"),
|
||||||
ru: client.translate("economy/birthdate:YEAR", null, "ru-RU"),
|
ru: client.translate("economy/birthdate:YEAR", null, "ru-RU"),
|
||||||
})
|
}),
|
||||||
.setRequired(true),
|
)
|
||||||
|
.addBooleanOption(option =>
|
||||||
|
option
|
||||||
|
.setName("clear")
|
||||||
|
.setDescription(client.translate("economy/birthdate:CLEAR"))
|
||||||
|
.setDescriptionLocalizations({
|
||||||
|
uk: client.translate("economy/birthdate:CLEAR", null, "uk-UA"),
|
||||||
|
ru: client.translate("economy/birthdate:CLEAR", null, "ru-RU"),
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
dirname: __dirname,
|
dirname: __dirname,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
|
@ -71,8 +77,18 @@ class Birthdate extends BaseCommand {
|
||||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||||
*/
|
*/
|
||||||
async execute(client, interaction) {
|
async execute(client, interaction) {
|
||||||
const userData = interaction.data.user,
|
const userData = interaction.data.user;
|
||||||
day = interaction.options.getInteger("day"),
|
|
||||||
|
if (interaction.options.getBoolean("clear")) {
|
||||||
|
userData.birthdate = null;
|
||||||
|
await userData.save();
|
||||||
|
|
||||||
|
return interaction.success("economy/birthdate:SUCCESS", {
|
||||||
|
date: "none",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const day = interaction.options.getInteger("day"),
|
||||||
month = interaction.options.getInteger("month"),
|
month = interaction.options.getInteger("month"),
|
||||||
year = interaction.options.getInteger("year"),
|
year = interaction.options.getInteger("year"),
|
||||||
date = new Date(year, month - 1, day);
|
date = new Date(year, month - 1, day);
|
||||||
|
|
|
@ -28,88 +28,112 @@ class Reminds extends BaseCommand {
|
||||||
async onLoad(client) {
|
async onLoad(client) {
|
||||||
client.on("interactionCreate", async interaction => {
|
client.on("interactionCreate", async interaction => {
|
||||||
if (!interaction.isButton()) return;
|
if (!interaction.isButton()) return;
|
||||||
|
if (!interaction.customId.startsWith("reminds_")) return;
|
||||||
|
|
||||||
if (interaction.customId.startsWith("reminds_")) {
|
interaction.data = [];
|
||||||
interaction.data = [];
|
interaction.data.guild = await client.getGuildData(interaction.guildId);
|
||||||
interaction.data.guild = await client.getGuildData(interaction.guildId);
|
interaction.data.user = await client.getUserData(interaction.user.id);
|
||||||
interaction.data.user = await client.getUserData(interaction.user.id);
|
|
||||||
|
|
||||||
const reminds = interaction.data.user.reminds,
|
const reminds = interaction.data.user.reminds,
|
||||||
embeds = generateRemindsEmbeds(interaction, reminds);
|
embeds = generateRemindsEmbeds(interaction, reminds);
|
||||||
|
|
||||||
const row = new ActionRowBuilder().addComponents(
|
const row = new ActionRowBuilder().addComponents(
|
||||||
new ButtonBuilder().setCustomId("reminds_prev_page").setStyle(ButtonStyle.Primary).setEmoji("⬅️"),
|
new ButtonBuilder().setCustomId("reminds_prev_page").setStyle(ButtonStyle.Primary).setEmoji("⬅️"),
|
||||||
new ButtonBuilder().setCustomId("reminds_next_page").setStyle(ButtonStyle.Primary).setEmoji("➡️"),
|
new ButtonBuilder().setCustomId("reminds_next_page").setStyle(ButtonStyle.Primary).setEmoji("➡️"),
|
||||||
new ButtonBuilder().setCustomId("reminds_jump_page").setStyle(ButtonStyle.Secondary).setEmoji("↗️"),
|
new ButtonBuilder().setCustomId("reminds_jump_page").setStyle(ButtonStyle.Secondary).setEmoji("↗️"),
|
||||||
new ButtonBuilder().setCustomId("reminds_stop").setStyle(ButtonStyle.Danger).setEmoji("❌"),
|
new ButtonBuilder().setCustomId("reminds_stop").setStyle(ButtonStyle.Danger).setEmoji("❌"),
|
||||||
|
);
|
||||||
|
|
||||||
|
let currentPage = Number(interaction.message.content.match(/\d+/g)[0]) - 1 ?? 0;
|
||||||
|
|
||||||
|
const row2 = new ActionRowBuilder();
|
||||||
|
|
||||||
|
for (const key in reminds) {
|
||||||
|
row2.addComponents(
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setCustomId(`reminds_delete_${key}`)
|
||||||
|
.setLabel(interaction.translate("general/reminds:DELETE", { pos: parseInt(key) + 1 }))
|
||||||
|
.setStyle(ButtonStyle.Danger),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let currentPage = Number(interaction.message.content.match(/\d+/g)[0]) - 1 ?? 0;
|
if (interaction.customId === "reminds_prev_page") {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
if (interaction.customId === "reminds_prev_page") {
|
if (currentPage !== 0) {
|
||||||
await interaction.deferUpdate();
|
--currentPage;
|
||||||
|
interaction.editReply({
|
||||||
if (currentPage !== 0) {
|
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
||||||
--currentPage;
|
embeds: [embeds[currentPage]],
|
||||||
interaction.editReply({
|
components: [row, row2],
|
||||||
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
|
||||||
embeds: [embeds[currentPage]],
|
|
||||||
components: [row],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (interaction.customId === "reminds_next_page") {
|
|
||||||
await interaction.deferUpdate();
|
|
||||||
|
|
||||||
if (currentPage < embeds.length - 1) {
|
|
||||||
currentPage++;
|
|
||||||
interaction.editReply({
|
|
||||||
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
|
||||||
embeds: [embeds[currentPage]],
|
|
||||||
components: [row],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (interaction.customId === "reminds_jump_page") {
|
|
||||||
await interaction.deferUpdate();
|
|
||||||
|
|
||||||
const msg = await interaction.followUp({
|
|
||||||
content: interaction.translate("misc:JUMP_TO_PAGE", {
|
|
||||||
length: embeds.length,
|
|
||||||
}),
|
|
||||||
fetchReply: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
const filter = res => {
|
|
||||||
return res.author.id === interaction.user.id && !isNaN(res.content);
|
|
||||||
};
|
|
||||||
|
|
||||||
interaction.channel.awaitMessages({ filter, max: 1, time: 10 * 1000 }).then(collected => {
|
|
||||||
if (embeds[collected.first().content - 1]) {
|
|
||||||
currentPage = collected.first().content - 1;
|
|
||||||
interaction.editReply({
|
|
||||||
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
|
||||||
embeds: [embeds[currentPage]],
|
|
||||||
components: [row],
|
|
||||||
});
|
|
||||||
|
|
||||||
if (collected.first().deletable) collected.first().delete();
|
|
||||||
if (msg.deletable) msg.delete();
|
|
||||||
} else {
|
|
||||||
if (collected.first().deletable) collected.first().delete();
|
|
||||||
if (msg.deletable) msg.delete();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (interaction.customId === "reminds_stop") {
|
|
||||||
await interaction.deferUpdate();
|
|
||||||
|
|
||||||
row.components.forEach(component => {
|
|
||||||
component.setDisabled(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
return interaction.editReply({
|
|
||||||
components: [row],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (interaction.customId === "reminds_next_page") {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
|
if (currentPage < embeds.length - 1) {
|
||||||
|
currentPage++;
|
||||||
|
interaction.editReply({
|
||||||
|
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
||||||
|
embeds: [embeds[currentPage]],
|
||||||
|
components: [row, row2],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (interaction.customId === "reminds_jump_page") {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
|
const msg = await interaction.followUp({
|
||||||
|
content: interaction.translate("misc:JUMP_TO_PAGE", {
|
||||||
|
length: embeds.length,
|
||||||
|
}),
|
||||||
|
fetchReply: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const filter = res => {
|
||||||
|
return res.author.id === interaction.user.id && !isNaN(res.content);
|
||||||
|
};
|
||||||
|
|
||||||
|
interaction.channel.awaitMessages({ filter, max: 1, time: 10 * 1000 }).then(collected => {
|
||||||
|
if (embeds[collected.first().content - 1]) {
|
||||||
|
currentPage = collected.first().content - 1;
|
||||||
|
interaction.editReply({
|
||||||
|
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
|
||||||
|
embeds: [embeds[currentPage]],
|
||||||
|
components: [row, row2],
|
||||||
|
});
|
||||||
|
|
||||||
|
if (collected.first().deletable) collected.first().delete();
|
||||||
|
if (msg.deletable) msg.delete();
|
||||||
|
} else {
|
||||||
|
if (collected.first().deletable) collected.first().delete();
|
||||||
|
if (msg.deletable) msg.delete();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (interaction.customId === "reminds_stop") {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
|
row.components.forEach(component => {
|
||||||
|
component.setDisabled(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
return interaction.editReply({
|
||||||
|
components: [row, row2],
|
||||||
|
});
|
||||||
|
} else if (interaction.customId.startsWith("reminds_delete_")) {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
|
const id = parseInt(interaction.customId.split("_")[2]);
|
||||||
|
const remindToDelete = reminds[id];
|
||||||
|
|
||||||
|
interaction.data.user.reminds = reminds.filter(r => r.sendAt !== remindToDelete.sendAt);
|
||||||
|
|
||||||
|
await interaction.data.user.save();
|
||||||
|
|
||||||
|
return interaction.followUp({
|
||||||
|
content: `${client.customEmojis.success} | ${interaction.translate("general/reminds:DELETED", { pos: id + 1 })}`,
|
||||||
|
ephemeral: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -134,10 +158,21 @@ class Reminds extends BaseCommand {
|
||||||
new ButtonBuilder().setCustomId("reminds_stop").setStyle(ButtonStyle.Danger).setEmoji("❌"),
|
new ButtonBuilder().setCustomId("reminds_stop").setStyle(ButtonStyle.Danger).setEmoji("❌"),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const row2 = new ActionRowBuilder();
|
||||||
|
|
||||||
|
for (const key in reminds) {
|
||||||
|
row2.addComponents(
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setCustomId(`reminds_delete_${key}`)
|
||||||
|
.setLabel(interaction.translate("general/reminds:DELETE", { pos: parseInt(key) + 1 }))
|
||||||
|
.setStyle(ButtonStyle.Danger),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
content: `${interaction.translate("common:PAGE")}: **1**/**${embeds.length}**`,
|
content: `${interaction.translate("common:PAGE")}: **1**/**${embeds.length}**`,
|
||||||
embeds: [embeds[0]],
|
embeds: [embeds[0]],
|
||||||
components: [row],
|
components: [row, row2],
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,7 @@ class Skip extends BaseCommand {
|
||||||
.setDescriptionLocalizations({
|
.setDescriptionLocalizations({
|
||||||
uk: client.translate("music/skip:POSITION", null, "uk-UA"),
|
uk: client.translate("music/skip:POSITION", null, "uk-UA"),
|
||||||
ru: client.translate("music/skip:POSITION", null, "ru-RU"),
|
ru: client.translate("music/skip:POSITION", null, "ru-RU"),
|
||||||
})
|
}),
|
||||||
.setRequired(false),
|
|
||||||
),
|
),
|
||||||
dirname: __dirname,
|
dirname: __dirname,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { SlashCommandBuilder, PermissionsBitField, ButtonBuilder, ButtonStyle, ActionRowBuilder, ChannelType } = require("discord.js");
|
const { SlashCommandBuilder, PermissionsBitField, ButtonBuilder, ButtonStyle, ActionRowBuilder } = require("discord.js");
|
||||||
const BaseCommand = require("../../base/BaseCommand");
|
const BaseCommand = require("../../base/BaseCommand");
|
||||||
|
|
||||||
class CreateTicketEmbed extends BaseCommand {
|
class CreateTicketEmbed extends BaseCommand {
|
||||||
|
@ -22,186 +22,6 @@ class CreateTicketEmbed extends BaseCommand {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {import("../../base/Client")} client
|
|
||||||
*/
|
|
||||||
async onLoad(client) {
|
|
||||||
client.on("interactionCreate", async interaction => {
|
|
||||||
if (!interaction.isButton()) return;
|
|
||||||
|
|
||||||
interaction.data = [];
|
|
||||||
interaction.data.guild = await client.getGuildData(interaction.guildId);
|
|
||||||
|
|
||||||
const button = interaction.component;
|
|
||||||
|
|
||||||
if (button.customId === "support_ticket") {
|
|
||||||
const guildData = interaction.data.guild,
|
|
||||||
ticketsCategory = guildData.plugins.tickets.ticketsCategory,
|
|
||||||
ticketLogs = guildData.plugins.tickets.ticketLogs;
|
|
||||||
|
|
||||||
if (interaction.guild.channels.cache.get(ticketsCategory).children.cache.size >= 50) {
|
|
||||||
const sorted = interaction.guild.channels.cache.get(ticketsCategory).children.cache.sort((ch1, ch2) => ch1.createdTimestamp - ch2.createdTimestamp);
|
|
||||||
|
|
||||||
await sorted.first().delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (guildData.plugins.tickets.count === undefined) guildData.plugins.tickets.count = 0;
|
|
||||||
|
|
||||||
guildData.plugins.tickets.count++;
|
|
||||||
|
|
||||||
const channel = await interaction.guild.channels.create({
|
|
||||||
name: `${interaction.user.username}-support-${guildData.plugins.tickets.count}`,
|
|
||||||
topic: interaction.user.id,
|
|
||||||
type: ChannelType.GuildText,
|
|
||||||
parent: ticketsCategory,
|
|
||||||
permissionOverwrites: [
|
|
||||||
{
|
|
||||||
id: interaction.user.id,
|
|
||||||
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: interaction.guild.roles.everyone,
|
|
||||||
deny: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
const logChannel = interaction.guild.channels.cache.get(ticketLogs);
|
|
||||||
const logEmbed = client.embed({
|
|
||||||
title: interaction.translate("tickets/createticketembed:TICKET_CREATED_TITLE"),
|
|
||||||
description: `${interaction.user.toString()} (${channel.toString()})`,
|
|
||||||
});
|
|
||||||
|
|
||||||
await logChannel.send({ embeds: [logEmbed] });
|
|
||||||
await interaction.success("tickets/createticketembed:TICKET_CREATED", {
|
|
||||||
channel: channel.toString(),
|
|
||||||
}, { ephemeral: true });
|
|
||||||
|
|
||||||
await channel.send(`<@${interaction.user.id}>`);
|
|
||||||
|
|
||||||
const embed = client.embed({
|
|
||||||
author: {
|
|
||||||
name: interaction.user.getUsername(),
|
|
||||||
iconURL: interaction.user.displayAvatarURL(),
|
|
||||||
},
|
|
||||||
title: "Support Ticket",
|
|
||||||
description: interaction.translate("tickets/createticketembed:TICKET_CREATED_DESC"),
|
|
||||||
});
|
|
||||||
|
|
||||||
const closeButton = new ButtonBuilder()
|
|
||||||
.setCustomId("close_ticket")
|
|
||||||
.setLabel(interaction.translate("tickets/closeticket:CLOSE_TICKET"))
|
|
||||||
.setStyle(ButtonStyle.Danger);
|
|
||||||
const transcriptButton = new ButtonBuilder()
|
|
||||||
.setCustomId("transcript_ticket")
|
|
||||||
.setLabel(interaction.translate("tickets/closeticket:TRANSCRIPT_TICKET"))
|
|
||||||
.setStyle(ButtonStyle.Secondary);
|
|
||||||
const row = new ActionRowBuilder().addComponents(closeButton, transcriptButton);
|
|
||||||
|
|
||||||
await guildData.save();
|
|
||||||
|
|
||||||
await channel.send({ embeds: [embed], components: [row] });
|
|
||||||
} else if (button.customId === "close_ticket") {
|
|
||||||
const embed = client.embed({
|
|
||||||
title: interaction.translate("tickets/closeticket:CLOSING_TITLE"),
|
|
||||||
description: interaction.translate("tickets/closeticket:CLOSING_DESC"),
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: interaction.translate("common:TICKET"),
|
|
||||||
value: interaction.channel.name,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: interaction.translate("tickets/closeticket:CLOSING_BY"),
|
|
||||||
value: interaction.user.getUsername(),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
const button = new ButtonBuilder().setCustomId("cancel_closing").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_closing";
|
|
||||||
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 reversedMessages = (await interaction.channel.messages.fetch()).filter(m => !m.author.bot),
|
|
||||||
messages = Array.from(reversedMessages.values()).reverse(),
|
|
||||||
transcriptionLogs = interaction.data.guild.plugins.tickets.transcriptionLogs,
|
|
||||||
ticketLogs = interaction.data.guild.plugins.tickets.ticketLogs;
|
|
||||||
|
|
||||||
if (messages.length > 1) {
|
|
||||||
let transcript = "---- TICKET CREATED ----\n";
|
|
||||||
messages.forEach(message => {
|
|
||||||
transcript += `[${client.functions.printDate(client, message.createdTimestamp, null, interaction.getLocale())}] ${message.author.getUsername()}: ${message.content}\n`;
|
|
||||||
});
|
|
||||||
transcript += "---- TICKET CLOSED ----\n";
|
|
||||||
|
|
||||||
if (transcriptionLogs !== null) interaction.guild.channels.cache.get(transcriptionLogs).send({ content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: `<#${interaction.channelId}>` }), files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] });
|
|
||||||
|
|
||||||
try {
|
|
||||||
await interaction.user.send({
|
|
||||||
content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: interaction.channel.name }),
|
|
||||||
files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }],
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
interaction.followUp({ content: interaction.translate("misc:CANT_DM"), ephemeral: true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const logChannel = interaction.guild.channels.cache.get(ticketLogs);
|
|
||||||
const logEmbed = client.embed({
|
|
||||||
title: interaction.translate("tickets/createticketembed:TICKET_CLOSED_TITLE"),
|
|
||||||
description: `${interaction.user.toString()} (${interaction.channel.toString()})`,
|
|
||||||
});
|
|
||||||
|
|
||||||
logChannel.send({ embeds: [logEmbed] });
|
|
||||||
|
|
||||||
interaction.channel.send("Closed!");
|
|
||||||
|
|
||||||
const member = interaction.guild.members.cache.find(u => u.user.id === interaction.channel.topic);
|
|
||||||
|
|
||||||
await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null });
|
|
||||||
await interaction.channel.setName(`${interaction.channel.name}-closed`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (button.customId === "transcript_ticket") {
|
|
||||||
await interaction.deferUpdate();
|
|
||||||
|
|
||||||
const reversedMessages = (await interaction.channel.messages.fetch()).filter(m => !m.author.bot);
|
|
||||||
const messages = Array.from(reversedMessages.values()).reverse();
|
|
||||||
|
|
||||||
if (messages.length > 1) {
|
|
||||||
let transcript = "---- TICKET CREATED ----\n";
|
|
||||||
messages.forEach(message => {
|
|
||||||
transcript += `[${client.functions.printDate(client, message.createdTimestamp, null, interaction.getLocale())}] ${message.author.getUsername()}: ${message.content}\n`;
|
|
||||||
});
|
|
||||||
transcript += "---- TICKET CLOSED ----\n";
|
|
||||||
|
|
||||||
try {
|
|
||||||
await interaction.user.send({
|
|
||||||
content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: `<#${interaction.channelId}>` }),
|
|
||||||
files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }],
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
interaction.followUp({ content: interaction.translate("misc:CANT_DM"), ephemeral: true });
|
|
||||||
}
|
|
||||||
} else return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {import("../../base/Client")} client
|
* @param {import("../../base/Client")} client
|
||||||
|
|
|
@ -14,13 +14,7 @@ module.exports = {
|
||||||
clientSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
clientSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||||
},
|
},
|
||||||
/* YouTube Cookie */
|
/* YouTube Cookie */
|
||||||
youtubeCookie: {
|
youtubeCookie: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||||
access_token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
||||||
refresh_token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
||||||
scope: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
||||||
token_type: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
||||||
expiry_date: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
||||||
},
|
|
||||||
/* Support server */
|
/* Support server */
|
||||||
support: {
|
support: {
|
||||||
id: "123456789098765432", // The ID of the support server
|
id: "123456789098765432", // The ID of the support server
|
||||||
|
|
192
events/TicketsButton.js
Normal file
192
events/TicketsButton.js
Normal file
|
@ -0,0 +1,192 @@
|
||||||
|
const { ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType, PermissionsBitField } = require("discord.js");
|
||||||
|
const BaseEvent = require("../base/BaseEvent");
|
||||||
|
|
||||||
|
class CommandHandler extends BaseEvent {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "interactionCreate",
|
||||||
|
once: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {import("../base/Client")} client
|
||||||
|
* @param {import("discord.js").ButtonInteraction} interaction
|
||||||
|
*/
|
||||||
|
async execute(client, interaction) {
|
||||||
|
if (!interaction.isButton()) return;
|
||||||
|
if (!interaction.customId.startsWith("ticket_")) return;
|
||||||
|
|
||||||
|
const button = interaction.component;
|
||||||
|
|
||||||
|
interaction.data = [];
|
||||||
|
interaction.data.guild = await client.getGuildData(interaction.guildId);
|
||||||
|
|
||||||
|
if (button.customId === "ticket_create") {
|
||||||
|
const guildData = interaction.data.guild,
|
||||||
|
ticketsCategory = guildData.plugins.tickets.ticketsCategory,
|
||||||
|
ticketLogs = guildData.plugins.tickets.ticketLogs;
|
||||||
|
|
||||||
|
if (interaction.guild.channels.cache.get(ticketsCategory).children.cache.size >= 50) {
|
||||||
|
const sorted = interaction.guild.channels.cache.get(ticketsCategory).children.cache.sort((ch1, ch2) => ch1.createdTimestamp - ch2.createdTimestamp);
|
||||||
|
|
||||||
|
await sorted.first().delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (guildData.plugins.tickets.count === undefined) guildData.plugins.tickets.count = 0;
|
||||||
|
|
||||||
|
const channel = await interaction.guild.channels.create({
|
||||||
|
name: `${interaction.user.username}-support-${guildData.plugins.tickets.count}`,
|
||||||
|
topic: interaction.user.id,
|
||||||
|
type: ChannelType.GuildText,
|
||||||
|
parent: ticketsCategory,
|
||||||
|
permissionOverwrites: [
|
||||||
|
{
|
||||||
|
id: interaction.user.id,
|
||||||
|
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: interaction.guild.roles.everyone,
|
||||||
|
deny: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const logChannel = interaction.guild.channels.cache.get(ticketLogs);
|
||||||
|
const logEmbed = client.embed({
|
||||||
|
title: interaction.translate("tickets/createticketembed:TICKET_CREATED_TITLE"),
|
||||||
|
description: `${interaction.user.toString()} (${channel.toString()})`,
|
||||||
|
});
|
||||||
|
|
||||||
|
await logChannel.send({ embeds: [logEmbed] });
|
||||||
|
await interaction.success("tickets/createticketembed:TICKET_CREATED", {
|
||||||
|
channel: channel.toString(),
|
||||||
|
}, { ephemeral: true });
|
||||||
|
|
||||||
|
await channel.send(`<@${interaction.user.id}>`);
|
||||||
|
|
||||||
|
const embed = client.embed({
|
||||||
|
author: {
|
||||||
|
name: interaction.user.getUsername(),
|
||||||
|
iconURL: interaction.user.displayAvatarURL(),
|
||||||
|
},
|
||||||
|
title: "Support Ticket",
|
||||||
|
description: interaction.translate("tickets/createticketembed:TICKET_CREATED_DESC"),
|
||||||
|
});
|
||||||
|
|
||||||
|
const closeButton = new ButtonBuilder()
|
||||||
|
.setCustomId("close_ticket")
|
||||||
|
.setLabel(interaction.translate("tickets/closeticket:CLOSE_TICKET"))
|
||||||
|
.setStyle(ButtonStyle.Danger);
|
||||||
|
const transcriptButton = new ButtonBuilder()
|
||||||
|
.setCustomId("transcript_ticket")
|
||||||
|
.setLabel(interaction.translate("tickets/closeticket:TRANSCRIPT_TICKET"))
|
||||||
|
.setStyle(ButtonStyle.Secondary);
|
||||||
|
const row = new ActionRowBuilder().addComponents(closeButton, transcriptButton);
|
||||||
|
|
||||||
|
guildData.plugins.tickets.count++;
|
||||||
|
await guildData.save();
|
||||||
|
|
||||||
|
await channel.send({ embeds: [embed], components: [row] });
|
||||||
|
} else if (button.customId === "ticket_close") {
|
||||||
|
const embed = client.embed({
|
||||||
|
title: interaction.translate("tickets/closeticket:CLOSING_TITLE"),
|
||||||
|
description: interaction.translate("tickets/closeticket:CLOSING_DESC"),
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: interaction.translate("common:TICKET"),
|
||||||
|
value: interaction.channel.name,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: interaction.translate("tickets/closeticket:CLOSING_BY"),
|
||||||
|
value: interaction.user.getUsername(),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const button = new ButtonBuilder().setCustomId("cancel_closing").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_closing";
|
||||||
|
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 reversedMessages = (await interaction.channel.messages.fetch()).filter(m => !m.author.bot),
|
||||||
|
messages = Array.from(reversedMessages.values()).reverse(),
|
||||||
|
transcriptionLogs = interaction.data.guild.plugins.tickets.transcriptionLogs,
|
||||||
|
ticketLogs = interaction.data.guild.plugins.tickets.ticketLogs;
|
||||||
|
|
||||||
|
if (messages.length > 1) {
|
||||||
|
let transcript = "---- TICKET CREATED ----\n";
|
||||||
|
messages.forEach(message => {
|
||||||
|
transcript += `[${client.functions.printDate(client, message.createdTimestamp, null, interaction.getLocale())}] ${message.author.getUsername()}: ${message.content}\n`;
|
||||||
|
});
|
||||||
|
transcript += "---- TICKET CLOSED ----\n";
|
||||||
|
|
||||||
|
if (transcriptionLogs !== null) interaction.guild.channels.cache.get(transcriptionLogs).send({ content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: `<#${interaction.channelId}>` }), files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }] });
|
||||||
|
|
||||||
|
try {
|
||||||
|
await interaction.user.send({
|
||||||
|
content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: interaction.channel.name }),
|
||||||
|
files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }],
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
interaction.followUp({ content: interaction.translate("misc:CANT_DM"), ephemeral: true });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const logChannel = interaction.guild.channels.cache.get(ticketLogs);
|
||||||
|
const logEmbed = client.embed({
|
||||||
|
title: interaction.translate("tickets/createticketembed:TICKET_CLOSED_TITLE"),
|
||||||
|
description: `${interaction.user.toString()} (${interaction.channel.toString()})`,
|
||||||
|
});
|
||||||
|
|
||||||
|
logChannel.send({ embeds: [logEmbed] });
|
||||||
|
|
||||||
|
interaction.channel.send("Closed!");
|
||||||
|
|
||||||
|
const member = interaction.guild.members.cache.find(u => u.user.id === interaction.channel.topic);
|
||||||
|
|
||||||
|
await interaction.channel.permissionOverwrites.edit(member, { ViewChannel: false, SendMessages: null });
|
||||||
|
await interaction.channel.setName(`${interaction.channel.name}-closed`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (button.customId === "ticket_transcript") {
|
||||||
|
await interaction.deferUpdate();
|
||||||
|
|
||||||
|
const reversedMessages = (await interaction.channel.messages.fetch()).filter(m => !m.author.bot);
|
||||||
|
const messages = Array.from(reversedMessages.values()).reverse();
|
||||||
|
|
||||||
|
if (messages.length > 1) {
|
||||||
|
let transcript = "---- TICKET CREATED ----\n";
|
||||||
|
messages.forEach(message => {
|
||||||
|
transcript += `[${client.functions.printDate(client, message.createdTimestamp, null, interaction.getLocale())}] ${message.author.getUsername()}: ${message.content}\n`;
|
||||||
|
});
|
||||||
|
transcript += "---- TICKET CLOSED ----\n";
|
||||||
|
|
||||||
|
try {
|
||||||
|
await interaction.user.send({
|
||||||
|
content: interaction.translate("tickets/closeticket:TRANSCRIPT", { channel: `<#${interaction.channelId}>` }),
|
||||||
|
files: [{ attachment: Buffer.from(transcript), name: `${interaction.channel.name}.txt` }],
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
interaction.followUp({ content: interaction.translate("misc:CANT_DM"), ephemeral: true });
|
||||||
|
}
|
||||||
|
} else return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = CommandHandler;
|
|
@ -8,7 +8,7 @@
|
||||||
"MODLOGS": "Moderation Logs",
|
"MODLOGS": "Moderation Logs",
|
||||||
"REPORTS": "Reports",
|
"REPORTS": "Reports",
|
||||||
"SUGGESTIONS": "Suggestions",
|
"SUGGESTIONS": "Suggestions",
|
||||||
"TICKETSCATEGORY": "Category For Tickets (They have folder icon)",
|
"TICKETSCATEGORY": "Category For Tickets (They have a 'folder' icon)",
|
||||||
"TICKETS_NOT_CATEGORY": "Please select a **category** channel",
|
"TICKETS_NOT_CATEGORY": "Please select a **category** channel",
|
||||||
"TICKETLOGS": "Tickets Logs",
|
"TICKETLOGS": "Tickets Logs",
|
||||||
"TRANSCRIPTIONLOGS": "Transcripts Logs",
|
"TRANSCRIPTIONLOGS": "Transcripts Logs",
|
||||||
|
|
|
@ -5,23 +5,11 @@
|
||||||
"DAY": "Day",
|
"DAY": "Day",
|
||||||
"MONTH": "Month",
|
"MONTH": "Month",
|
||||||
"YEAR": "Year",
|
"YEAR": "Year",
|
||||||
|
"CLEAR": "Clear date?",
|
||||||
"INVALID_DATE": "Invalid date provided",
|
"INVALID_DATE": "Invalid date provided",
|
||||||
"DATE_TOO_LOW": "Are you over 80 years old? :eyes:",
|
"DATE_TOO_LOW": "Are you over 80 years old? :eyes:",
|
||||||
"DATE_TOO_HIGH": "Hmm... You haven't been born yet",
|
"DATE_TOO_HIGH": "Hmm... You haven't been born yet",
|
||||||
"HAPPY_BIRTHDAY": "Happy Birthday",
|
"HAPPY_BIRTHDAY": "Happy Birthday",
|
||||||
"HAPPY_BIRTHDAY_MESSAGE": "Happy birthday to <@{{user}}>! Today, they have turned {{age}}!",
|
"HAPPY_BIRTHDAY_MESSAGE": "Happy birthday to <@{{user}}>! Today, they have turned {{age}}!",
|
||||||
"SUCCESS": "Your date of birth has been set to **{{date}}**",
|
"SUCCESS": "Your date of birth has been set to **{{date}}**"
|
||||||
|
|
||||||
"JANUARY": "January",
|
|
||||||
"FEBRUARY": "February",
|
|
||||||
"MARCH": "March",
|
|
||||||
"APRIL": "April",
|
|
||||||
"MAY": "May",
|
|
||||||
"JUNE": "June",
|
|
||||||
"JULY": "July",
|
|
||||||
"AUGUST": "August",
|
|
||||||
"SEPTEMBER": "September",
|
|
||||||
"OCTOBER": "October",
|
|
||||||
"NOVEMBER": "November",
|
|
||||||
"DECEMBER": "December"
|
|
||||||
}
|
}
|
|
@ -3,5 +3,7 @@
|
||||||
"USAGE": "",
|
"USAGE": "",
|
||||||
"EXAMPLES": "reminds",
|
"EXAMPLES": "reminds",
|
||||||
"NO_REMINDS": "No reminds found",
|
"NO_REMINDS": "No reminds found",
|
||||||
"REMINDS_LIST": "Reminds List"
|
"REMINDS_LIST": "Reminds List",
|
||||||
|
"DELETE": "Delete {{pos}}",
|
||||||
|
"DELETED": "Deleted remind №{{pos}}"
|
||||||
}
|
}
|
|
@ -22,6 +22,21 @@
|
||||||
"QUOTE_JUMP": "Jump to",
|
"QUOTE_JUMP": "Jump to",
|
||||||
"QUOTE_FOOTER": "Quoted by {{user}}",
|
"QUOTE_FOOTER": "Quoted by {{user}}",
|
||||||
|
|
||||||
|
"MONTHS": {
|
||||||
|
"JANUARY": "January",
|
||||||
|
"FEBRUARY": "February",
|
||||||
|
"MARCH": "March",
|
||||||
|
"APRIL": "April",
|
||||||
|
"MAY": "May",
|
||||||
|
"JUNE": "June",
|
||||||
|
"JULY": "July",
|
||||||
|
"AUGUST": "August",
|
||||||
|
"SEPTEMBER": "September",
|
||||||
|
"OCTOBER": "October",
|
||||||
|
"NOVEMBER": "November",
|
||||||
|
"DECEMBER": "December"
|
||||||
|
},
|
||||||
|
|
||||||
"MONITORING": {
|
"MONITORING": {
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
"TITLE": "{{user}} deleted a message!",
|
"TITLE": "{{user}} deleted a message!",
|
||||||
|
|
|
@ -5,23 +5,11 @@
|
||||||
"DAY": "День",
|
"DAY": "День",
|
||||||
"MONTH": "Месяц",
|
"MONTH": "Месяц",
|
||||||
"YEAR": "Год",
|
"YEAR": "Год",
|
||||||
|
"CLEAR": "Очистить дату?",
|
||||||
"INVALID_DATE": "Указана неверная дата",
|
"INVALID_DATE": "Указана неверная дата",
|
||||||
"DATE_TOO_LOW": "Вам больше 80 лет? :eyes:",
|
"DATE_TOO_LOW": "Вам больше 80 лет? :eyes:",
|
||||||
"DATE_TOO_HIGH": "Хммм... Вы ещё не родились",
|
"DATE_TOO_HIGH": "Хммм... Вы ещё не родились",
|
||||||
"HAPPY_BIRTHDAY": "День рождения",
|
"HAPPY_BIRTHDAY": "День рождения",
|
||||||
"HAPPY_BIRTHDAY_MESSAGE": "Поздравляем <@{{user}}> с днём рождения! Сегодня ему(ей) исполнилось {{age}}!",
|
"HAPPY_BIRTHDAY_MESSAGE": "Поздравляем <@{{user}}> с днём рождения! Сегодня ему(ей) исполнилось {{age}}!",
|
||||||
"SUCCESS": "Ваша дата рождения установлена на **{{date}}**",
|
"SUCCESS": "Ваша дата рождения установлена на **{{date}}**"
|
||||||
|
|
||||||
"JANUARY": "Январь",
|
|
||||||
"FEBRUARY": "Февраль",
|
|
||||||
"MARCH": "Март",
|
|
||||||
"APRIL": "Апрель",
|
|
||||||
"MAY": "Май",
|
|
||||||
"JUNE": "Июнь",
|
|
||||||
"JULY": "Июль",
|
|
||||||
"AUGUST": "Август",
|
|
||||||
"SEPTEMBER": "Сентябрь",
|
|
||||||
"OCTOBER": "Октябрь",
|
|
||||||
"NOVEMBER": "Ноябрь",
|
|
||||||
"DECEMBER": "Декабрь"
|
|
||||||
}
|
}
|
|
@ -22,6 +22,21 @@
|
||||||
"QUOTE_JUMP": "Перейти к",
|
"QUOTE_JUMP": "Перейти к",
|
||||||
"QUOTE_FOOTER": "Цитировал {{user}}",
|
"QUOTE_FOOTER": "Цитировал {{user}}",
|
||||||
|
|
||||||
|
"MONTHS": {
|
||||||
|
"JANUARY": "Январь",
|
||||||
|
"FEBRUARY": "Февраль",
|
||||||
|
"MARCH": "Март",
|
||||||
|
"APRIL": "Апрель",
|
||||||
|
"MAY": "Май",
|
||||||
|
"JUNE": "Июнь",
|
||||||
|
"JULY": "Июль",
|
||||||
|
"AUGUST": "Август",
|
||||||
|
"SEPTEMBER": "Сентябрь",
|
||||||
|
"OCTOBER": "Октябрь",
|
||||||
|
"NOVEMBER": "Ноябрь",
|
||||||
|
"DECEMBER": "Декабрь"
|
||||||
|
},
|
||||||
|
|
||||||
"MONITORING": {
|
"MONITORING": {
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
"TITLE": "{{user}} удалил сообщение!",
|
"TITLE": "{{user}} удалил сообщение!",
|
||||||
|
|
|
@ -5,23 +5,11 @@
|
||||||
"DAY": "День",
|
"DAY": "День",
|
||||||
"MONTH": "Місяць",
|
"MONTH": "Місяць",
|
||||||
"YEAR": "Рік",
|
"YEAR": "Рік",
|
||||||
|
"CLEAR": "Очистити дату?",
|
||||||
"INVALID_DATE": "Вказана неправильна дата",
|
"INVALID_DATE": "Вказана неправильна дата",
|
||||||
"DATE_TOO_LOW": "Вам більше 80 років? :eyes:",
|
"DATE_TOO_LOW": "Вам більше 80 років? :eyes:",
|
||||||
"DATE_TOO_HIGH": "Хммм... Ви ще не народилися",
|
"DATE_TOO_HIGH": "Хммм... Ви ще не народилися",
|
||||||
"HAPPY_BIRTHDAY": "День народження",
|
"HAPPY_BIRTHDAY": "День народження",
|
||||||
"HAPPY_BIRTHDAY_MESSAGE": "Вітаємо <@{{user}}> з днем народження! Сьогодні йому виповнилося {{age}}",
|
"HAPPY_BIRTHDAY_MESSAGE": "Вітаємо <@{{user}}> з днем народження! Сьогодні йому виповнилося {{age}}",
|
||||||
"SUCCESS": "Вашу дату народження встановлено на **{{date}}**",
|
"SUCCESS": "Вашу дату народження встановлено на **{{date}}**"
|
||||||
|
|
||||||
"JANUARY": "Січень",
|
|
||||||
"FEBRUARY": "Лютий",
|
|
||||||
"MARCH": "Березень",
|
|
||||||
"APRIL": "Квітень",
|
|
||||||
"MAY": "Травень",
|
|
||||||
"JUNE": "Червень",
|
|
||||||
"JULY": "Липень",
|
|
||||||
"AUGUST": "Серпень",
|
|
||||||
"SEPTEMBER": "Вересень",
|
|
||||||
"OCTOBER": "Жовтень",
|
|
||||||
"NOVEMBER": "Листопад",
|
|
||||||
"DECEMBER": "Грудень"
|
|
||||||
}
|
}
|
|
@ -22,6 +22,21 @@
|
||||||
"QUOTE_JUMP": "Перейти до",
|
"QUOTE_JUMP": "Перейти до",
|
||||||
"QUOTE_FOOTER": "Цитував {{user}}",
|
"QUOTE_FOOTER": "Цитував {{user}}",
|
||||||
|
|
||||||
|
"MONTHS": {
|
||||||
|
"JANUARY": "Січень",
|
||||||
|
"FEBRUARY": "Лютий",
|
||||||
|
"MARCH": "Березень",
|
||||||
|
"APRIL": "Квітень",
|
||||||
|
"MAY": "Травень",
|
||||||
|
"JUNE": "Червень",
|
||||||
|
"JULY": "Липень",
|
||||||
|
"AUGUST": "Серпень",
|
||||||
|
"SEPTEMBER": "Вересень",
|
||||||
|
"OCTOBER": "Жовтень",
|
||||||
|
"NOVEMBER": "Листопад",
|
||||||
|
"DECEMBER": "Грудень"
|
||||||
|
},
|
||||||
|
|
||||||
"MONITORING": {
|
"MONITORING": {
|
||||||
"DELETE": {
|
"DELETE": {
|
||||||
"TITLE": "{{user}} видалив повідомлення!",
|
"TITLE": "{{user}} видалив повідомлення!",
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "jaba",
|
"name": "jaba",
|
||||||
"version": "4.6.1",
|
"version": "4.6.3",
|
||||||
"description": "My Discord Bot",
|
"description": "My Discord Bot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -8,17 +8,17 @@
|
||||||
},
|
},
|
||||||
"author": "@jonny_bro",
|
"author": "@jonny_bro",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discord-player/extractor": "^4.5.0",
|
"@discord-player/extractor": "^4.5.1",
|
||||||
"@discordjs/opus": "^0.9.0",
|
"@discordjs/opus": "^0.9.0",
|
||||||
"@discordjs/rest": "^2.3.0",
|
"@discordjs/rest": "^2.3.0",
|
||||||
"@discordjs/voice": "^0.17.0",
|
"@discordjs/voice": "^0.17.0",
|
||||||
"@napi-rs/canvas": "^0.1.53",
|
"@napi-rs/canvas": "^0.1.53",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"cron": "^2.4.4",
|
"cron": "^2.4.4",
|
||||||
"discord-api-types": "^0.37.92",
|
"discord-api-types": "^0.37.93",
|
||||||
"discord-giveaways": "^6.0.1",
|
"discord-giveaways": "^6.0.1",
|
||||||
"discord-player": "^6.7.1",
|
"discord-player": "^6.7.1",
|
||||||
"discord-player-youtubei": "^1.2.4",
|
"discord-player-youtubei": "^1.2.6",
|
||||||
"discord.js": "^14.15.3",
|
"discord.js": "^14.15.3",
|
||||||
"gamedig": "^4.1.0",
|
"gamedig": "^4.1.0",
|
||||||
"i18next": "^21.10.0",
|
"i18next": "^21.10.0",
|
||||||
|
@ -27,8 +27,7 @@
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"mongoose": "^7.6.3",
|
"mongoose": "^7.6.3",
|
||||||
"ms": "^2.1.3",
|
"ms": "^2.1.3",
|
||||||
"node-fetch": "^2.7.0",
|
"node-fetch": "^2.7.0"
|
||||||
"ytdl-core": "^4.11.5"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.56.0"
|
"eslint": "^8.56.0"
|
||||||
|
|
840
pnpm-lock.yaml
840
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue