From 5c76cac1df67c7e18d22787f0143ec5618d41a76 Mon Sep 17 00:00:00 2001 From: stolarchukboris Date: Sat, 26 Apr 2025 21:29:48 +0300 Subject: [PATCH 1/3] change to `MessageFlags`, add point commands, allow people to see their own strikes and warnings --- package.json | 2 +- src/commands/command/dm.js | 8 +- src/commands/command/points.js | 203 +++++++++++++++++++++++++++++ src/commands/command/raid.js | 4 +- src/commands/command/st.js | 4 +- src/commands/command/strikes.js | 194 ++++++++++++++++------------ src/commands/command/training.js | 4 +- src/commands/command/warnings.js | 215 ++++++++++++++++++------------- src/events/interactionCreate.js | 6 +- 9 files changed, 452 insertions(+), 188 deletions(-) create mode 100644 src/commands/command/points.js diff --git a/package.json b/package.json index a3eae19..37fe1b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cfa-manager", - "version": "1.6.3", + "version": "1.6.4", "description": "Discord bot that manages the Chaos Forces Alliance.", "main": "src/index.js", "type": "module", diff --git a/src/commands/command/dm.js b/src/commands/command/dm.js index 0cd84d0..a623f03 100644 --- a/src/commands/command/dm.js +++ b/src/commands/command/dm.js @@ -24,13 +24,13 @@ export const data = new SlashCommandBuilder() export async function execute(interaction) { await interaction.deferReply(); - const allowedIDs = ["1239137720669044766", "1255634139730935860", "1071373709157351464"]; //llasat one is astro + const allowedIDs = ["1239137720669044766", "1255634139730935860"]; - if (!(interaction.member.roles.cache.hasAny(...allowedIDs) || allowedIDs.includes(interaction.member.id))) return await interaction.editReply({ + if (!(interaction.member.roles.cache.hasAny(...allowedIDs))) return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setTitle('Access denied!') - .setDescription('You do not have the required permissions to use this command!') + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to use this command.') .setColor(Colors.Red) .setTimestamp() .setFooter({ diff --git a/src/commands/command/points.js b/src/commands/command/points.js new file mode 100644 index 0000000..a83255d --- /dev/null +++ b/src/commands/command/points.js @@ -0,0 +1,203 @@ +import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; + +export const data = new SlashCommandBuilder() + .setName('points') + .setDescription('Allows users to interact with the points module.') + .addSubcommand(sc => sc + .setName('fetch') + .setDescription(`Fetch user's CFA points.`) + .addUserOption(option => option + .setName('user') + .setDescription(`The user to fetch (defaults to the user running this command).`) + ) + ) + .addSubcommand(sc => sc + .setName('alter') + .setDescription(`Alter user's point balance.`) + .addUserOption(option => option + .setName('user') + .setDescription('The user whose point balance should be altered.') + .setRequired(true) + ) + .addStringOption(option => option + .setName('action') + .setDescription('The action to be performed.') + .setChoices( + { name: 'Add', value: 'add' }, + { name: 'Subtract', value: 'subtract' }, + { name: 'Set', value: 'set' } + ) + .setRequired(true) + ) + .addIntegerOption(option => option + .setName('amount') + .setDescription('The amount of points to add/subtract/set.') + .setRequired(true) + ) + .addStringOption(option => option + .setName('reason') + .setDescription('The reason behind this action.') + ) + ) + +export async function execute(interaction) { + await interaction.deferReply(); + + const client = interaction.client; + const subcommand = interaction.options.getSubcommand(); + const allowedIds = ['1239137720669044766', '1255634139730935860']; // command, high command + const errorEmbed = new EmbedBuilder() + .setColor(Colors.Yellow) + .setTitle('Error.') + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }); + + if (subcommand === 'fetch') { + const user = interaction.options.getUser('user') ?? interaction.user; + + if (user !== interaction.user && !interaction.member.roles.cache.hasAny(...allowedIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to view other people\'s points.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + const result = await client.knex('points') + .select('*') + .where('discord_id', user.id) + .first(); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Blurple) + .setTitle('Point stats.') + .setDescription(`${user} has ${result?.amount ?? 0} points.`) + .setThumbnail(user.avatarURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } else if (subcommand === 'alter') { + if (!interaction.member.roles.cache.hasAny(...allowedIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to use this command.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + const user = interaction.options.getUser('user', true); + const action = interaction.options.getString('action', true); + const amount = interaction.options.getInteger('amount', true); + const reason = interaction.options.getString('reason'); + const pointLogChannel = client.channels.cache.get('1365689009376071721'); + const result = await client.knex('points') + .select('*') + .where('discord_id', user.id) + .first(); + let newAmount; + + switch (action) { + case 'add': + newAmount = result ? result.amount + amount : amount; + break; + case 'subtract': + newAmount = result ? result.amount - amount : -amount; + break; + case 'set': + newAmount = amount; + break; + } + + if (newAmount === (result?.amount ?? 0)) return await interaction.editReply({ embeds: [errorEmbed.setDescription('Point balance has not been modified.')] }); + + result ? + await client.knex('points') + .update({ amount: newAmount }) + .where('discord_id', user.id) : + await client.knex('points') + .insert({ + discord_id: user.id, + amount: newAmount + }); + + await user.send({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Blurple) + .setTitle('Point balance altered.') + .setDescription(`Your point balance has been altered. If you have any questions, contact a member of CFA Command or above.`) + .setFields( + { name: 'Before', value: `${result?.amount ?? 0} pts`, inline: true }, + { name: 'After', value: `${newAmount} pts`, inline: true }, + { name: 'Reason', value: reason ?? 'No reason provided.' } + ) + .setThumbnail(interaction.guild.iconURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }) + .catch(_ => console.log()); + + await pointLogChannel.send({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Blurple) + .setTitle('Point balance altered.') + .setDescription(`${interaction.user} has altered ${user}'s point balance.`) + .setFields( + { name: 'Before', value: `${result?.amount ?? 0} pts`, inline: true }, + { name: 'After', value: `${newAmount} pts`, inline: true }, + { name: 'Reason', value: reason ?? 'No reason provided.' } + ) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Green) + .setTitle('Success.') + .setDescription(`Successfully altered ${user}'s point balance.`) + .setFields( + { name: 'Before', value: `${result?.amount ?? 0} pts`, inline: true }, + { name: 'After', value: `${newAmount} pts`, inline: true }, + { name: 'Reason', value: reason ?? 'No reason provided.' } + ) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } +} diff --git a/src/commands/command/raid.js b/src/commands/command/raid.js index dd4772b..e55bf38 100644 --- a/src/commands/command/raid.js +++ b/src/commands/command/raid.js @@ -1,6 +1,6 @@ // Made by @Danonienko && @StolarchukBoris -import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; +import { SlashCommandBuilder, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const data = new SlashCommandBuilder() .setName('raid') @@ -135,7 +135,7 @@ export const data = new SlashCommandBuilder() ); export async function execute(interaction) { - await interaction.deferReply({ ephemeral: true }); + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); const client = await interaction.client; const allowedIDs = ["1268226274401193984", "1157806062070681600", "846692755496763413", "1066470548399468644", "1248632771900084286"]; // raid hosting perms, something else, lead insurgent, strike team diff --git a/src/commands/command/st.js b/src/commands/command/st.js index 7636cd6..aa03967 100644 --- a/src/commands/command/st.js +++ b/src/commands/command/st.js @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; +import { SlashCommandBuilder, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const data = new SlashCommandBuilder() .setName('st') @@ -97,7 +97,7 @@ export const data = new SlashCommandBuilder() ); export async function execute(interaction) { - await interaction.deferReply({ ephemeral: true }); + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); const allowedIds = ['1257065226403188826']; // strike team leader const client = await interaction.client; diff --git a/src/commands/command/strikes.js b/src/commands/command/strikes.js index a0c9a87..8cca466 100644 --- a/src/commands/command/strikes.js +++ b/src/commands/command/strikes.js @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; +import { SlashCommandBuilder, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const data = new SlashCommandBuilder() .setName('strikes') @@ -39,8 +39,7 @@ export const data = new SlashCommandBuilder() .setDescription('Fetch the CFA operative\'s strikes.') .addUserOption(option => option .setName('user') - .setDescription('The user whose strikes you want to fetch.') - .setRequired(true) + .setDescription('The user whose strikes you want to fetch (default to the user running this command).') ) ) .addSubcommand(subcommand => subcommand @@ -54,11 +53,119 @@ export const data = new SlashCommandBuilder() ); export async function execute(interaction) { - await interaction.deferReply(); + const subcommand = interaction.options.getSubcommand(); + + if (subcommand === 'fetch' || subcommand === 'fromid') { + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); + } else await interaction.deferReply(); + + const elevatedAccessIds = ["1239137720669044766", "1255634139730935860"]; + const strikeLogsChannel = interaction.client.channels.cache.get(process.env.STRIKE_LOG_CHANNEL_ID); + + if (subcommand === 'fetch') { + const user = interaction.options.getUser('user') ?? interaction.user; + + if (user !== interaction.user && !interaction.member.roles.cache.hasAny(...elevatedAccessIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to view other people\'s strikes.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + const strikes = await interaction.client.knex('strikes') + .select('*') + .where('rebel_id', user.id); + + if (strikes.length === 0) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Grey) + .setTitle('No strikes found.') + .setDescription(`No strikes for ${user} have been found in the database.`) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + let desc = ``; + for (const strike of strikes) desc = desc.concat(`- **Strike ID**: ${strike.strike_id}\n - **Issued on**: \n - **Reason**: ${strike.reason}\n\n`); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Aqua) + .setTitle(`Strikes found.`) + .setDescription(`Found ${strikes.length} strike(s) for ${user}\n\n${desc}`) + .setThumbnail(interaction.guild.iconURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } else if (subcommand === 'fromid') { + const id = interaction.options.getString('strike_id', true); + const strike = await interaction.client.knex('strikes') + .select('*') + .where('strike_id', id) + .first(); - const allowedIDs = ["1239137720669044766", "1255634139730935860", "1071373709157351464"]; //llasat one is astro + if (!strike) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Grey) + .setTitle('Strike not found.') + .setDescription(`No strike with ID \`${id}\` has been found in the database.`) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + if (interaction.user.id !== strike.rebel_id && !interaction.member.roles.cache.hasAny(...elevatedAccessIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to view other people\'s strikes.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Aqua) + .setTitle('Strike found.') + .setDescription(`Successfully retrieved a strike from the database.\n\n- **Strike ID**: ${strike.strike_id}\n - **Issued on**: \n - **Reason**: ${strike.reason}`) + .setThumbnail(interaction.guild.iconURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } - if (!(interaction.member.roles.cache.hasAny(...allowedIDs) || allowedIDs.includes(interaction.member.id))) return await interaction.editReply({ + if (!(interaction.member.roles.cache.hasAny(...elevatedAccessIds))) return await interaction.editReply({ embeds: [ new EmbedBuilder() .setTitle('Access denied.') @@ -72,9 +179,6 @@ export async function execute(interaction) { ] }); - const subcommand = interaction.options.getSubcommand(); - const strikeLogsChannel = interaction.client.channels.cache.get(process.env.STRIKE_LOG_CHANNEL_ID); - if (subcommand === 'issue') { const user = interaction.options.getMember('member', true); @@ -238,77 +342,5 @@ export async function execute(interaction) { }) ] }); - } else if (subcommand === 'fetch') { - const user = interaction.options.getUser('user', true); - const strikes = await interaction.client.knex('strikes') - .select('*') - .where('rebel_id', user.id); - - if (strikes.length === 0) return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Grey) - .setTitle('No strikes found.') - .setDescription(`No strikes for ${user} have been found in the database.`) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - - let desc = ``; - for (const strike of strikes) desc = desc.concat(`- **Strike ID**: ${strike.strike_id}\n - **Issued on**: \n - **Reason**: ${strike.reason}\n\n`); - - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Aqua) - .setTitle(`Strikes found.`) - .setDescription(`Found ${strikes.length} strike(s) for ${user}\n\n${desc}`) - .setThumbnail(interaction.guild.iconURL()) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - } else if (subcommand === 'fromid') { - const id = interaction.options.getString('strike_id', true); - const strike = await interaction.client.knex('strikes') - .select('*') - .where('strike_id', id) - .first(); - - if (!strike) return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Grey) - .setTitle('Strike not found.') - .setDescription(`No strike with ID \`${id}\` has been found in the database.`) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Aqua) - .setTitle('Strike found.') - .setDescription(`Successfully retrieved a strike from the database.\n\n- **Strike ID**: ${strike.strike_id}\n - **Issued on**: \n - **Reason**: ${strike.reason}`) - .setThumbnail(interaction.guild.iconURL()) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); } } diff --git a/src/commands/command/training.js b/src/commands/command/training.js index a1c0282..66251e0 100644 --- a/src/commands/command/training.js +++ b/src/commands/command/training.js @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; +import { SlashCommandBuilder, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const data = new SlashCommandBuilder() .setName('training') @@ -84,7 +84,7 @@ export const data = new SlashCommandBuilder() ); export async function execute(interaction) { - await interaction.deferReply({ ephemeral: true }); + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); const client = await interaction.client; const allowedIDs = ["1208839121682833548"]; diff --git a/src/commands/command/warnings.js b/src/commands/command/warnings.js index 2df03fe..ff382f6 100644 --- a/src/commands/command/warnings.js +++ b/src/commands/command/warnings.js @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, EmbedBuilder, Colors } from 'discord.js'; +import { SlashCommandBuilder, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const data = new SlashCommandBuilder() .setName('warnings') @@ -8,7 +8,7 @@ export const data = new SlashCommandBuilder() .setDescription('Issue a formal warning to a CFA operative.') .addUserOption(option => option .setName('member') - .setDescription('The server member you want to issue the warning to.') + .setDescription('The server member you want to warn.') .setRequired(true) ) .addStringOption(option => option @@ -39,8 +39,7 @@ export const data = new SlashCommandBuilder() .setDescription('Fetch the CFA operative\'s formal warnings.') .addUserOption(option => option .setName('user') - .setDescription('The user whose formal warnings you want to fetch.') - .setRequired(true) + .setDescription('The user whose warnings you want to fetch (default to the user running this command).') ) ) .addSubcommand(subcommand => subcommand @@ -54,11 +53,119 @@ export const data = new SlashCommandBuilder() ); export async function execute(interaction) { - await interaction.deferReply(); + const subcommand = interaction.options.getSubcommand(); + + if (subcommand === 'fetch' || subcommand === 'fromid') { + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); + } else await interaction.deferReply(); + + const elevatedAccessIds = ["1239137720669044766", "1255634139730935860"]; + const warnLogsChannel = interaction.client.channels.cache.get(process.env.WARNING_LOG_CHANNEL_ID); + + if (subcommand === 'fetch') { + const user = interaction.options.getUser('user') ?? interaction.user; + + if (user !== interaction.user && !interaction.member.roles.cache.hasAny(...elevatedAccessIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to view other people\'s formal warnings.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); - const allowedIDs = ["1239137720669044766", "1255634139730935860", "1071373709157351464"]; //llasat one is astro + const warnings = await interaction.client.knex('warns') + .select('*') + .where('rebel_id', user.id); - if (!(interaction.member.roles.cache.hasAny(...allowedIDs) || allowedIDs.includes(interaction.member.id))) return await interaction.editReply({ + if (warnings.length === 0) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Grey) + .setTitle('No warnings found.') + .setDescription(`No formal warnings for ${user} have been found in the database.`) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + let desc = ``; + for (const warning of warnings) desc = desc.concat(`- **Warning ID**: ${warning.warning_id}\n - **Issued on**: \n - **Reason**: ${warning.reason}\n\n`); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Aqua) + .setTitle(`Warnings found.`) + .setDescription(`Found ${strikes.length} formal warning(s) for ${user}\n\n${desc}`) + .setThumbnail(interaction.guild.iconURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } else if (subcommand === 'fromid') { + const id = interaction.options.getString('warning_id', true); + const warning = await interaction.client.knex('warns') + .select('*') + .where('warning_id', id) + .first(); + + if (!warning) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Grey) + .setTitle('Warning not found.') + .setDescription(`No formal warning with ID \`${id}\` has been found in the database.`) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + if (interaction.user.id !== strike.rebel_id && !interaction.member.roles.cache.hasAny(...elevatedAccessIds)) return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setTitle('Access denied.') + .setDescription('You do not have the required permissions to view other people\'s formal warnings.') + .setColor(Colors.Red) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + + return await interaction.editReply({ + embeds: [ + new EmbedBuilder() + .setColor(Colors.Aqua) + .setTitle('Warning found.') + .setDescription(`Successfully retrieved a formal warning from the database.\n\n- **Warning ID**: ${warning.warning_id}\n - **Issued on**: \n - **Reason**: ${warning.reason}`) + .setThumbnail(interaction.guild.iconURL()) + .setTimestamp() + .setFooter({ + text: interaction.guild.name, + iconURL: interaction.guild.iconURL() + }) + ] + }); + } + + if (!(interaction.member.roles.cache.hasAny(...elevatedAccessIds))) return await interaction.editReply({ embeds: [ new EmbedBuilder() .setTitle('Access denied.') @@ -72,9 +179,6 @@ export async function execute(interaction) { ] }); - const subcommand = interaction.options.getSubcommand(); - const warnLogsChannel = interaction.client.channels.cache.get(process.env.WARNING_LOG_CHANNEL_ID); - if (subcommand === 'issue') { const user = interaction.options.getMember('member', true); @@ -150,10 +254,7 @@ export async function execute(interaction) { .setTitle('Warning issued.') .setDescription(`Successfully issued a formal warning to ${user}.`) .setColor(Colors.Green) - .setFields( - { name: 'Reason', value: reason }, - { name: 'Warning ID', value: uuid } - ) + .setFields({ name: 'Warning ID', value: uuid }) .setThumbnail(interaction.guild.iconURL()) .setTimestamp() .setFooter({ @@ -184,7 +285,7 @@ export async function execute(interaction) { ] }); - const warningReason = warning.reason; + const warnReason = warning.reason; const userId = warning.rebel_id; await interaction.client.knex('warns') @@ -192,10 +293,10 @@ export async function execute(interaction) { .where('warning_id', id); const userEmbed = new EmbedBuilder() - .setTitle('Formal warning notice.') + .setTitle('Warning notice.') .setDescription(`A formal warning with ID \`${id}\` has been removed from your record by CFA Command.`) .setColor(Colors.Green) - .setFields({ name: 'Original warning reason', value: warningReason }) + .setFields({ name: 'Original warning reason', value: warnReason }) .setThumbnail(interaction.guild.iconURL()) .setTimestamp() .setFooter({ @@ -204,10 +305,10 @@ export async function execute(interaction) { }); const logEmbed = new EmbedBuilder() - .setTitle(`Formal warning removed.`) + .setTitle(`Warning removed.`) .setDescription(`${interaction.user} has removed a formal warning from <@${userId}>'s record.`) .setColor(Colors.Green) - .setFields({ name: 'Original warning reason', value: warningReason }) + .setFields({ name: 'Original warning reason', value: warnReason }) .setThumbnail(interaction.guild.iconURL()) .setTimestamp() .setFooter({ @@ -220,7 +321,7 @@ export async function execute(interaction) { userEmbed.addFields({ name: 'Warning removal reason', value: reason }); } - const user = await interaction.client.users.cache.get(userId); + const user = interaction.client.users.cache.get(userId); if (user) await user.send({ embeds: [userEmbed] }) .catch(async _ => await warnLogsChannel.send({ content: '## ⚠️ Unable to DM the user about the warning. Please inform them manually.' })); @@ -230,7 +331,7 @@ export async function execute(interaction) { return await interaction.editReply({ embeds: [ new EmbedBuilder() - .setTitle('Formal warning removed.') + .setTitle('Warning removed.') .setDescription(`Successfully removed a formal warning from <@${userId}>'s record.`) .setColor(Colors.Green) .setThumbnail(interaction.guild.iconURL()) @@ -241,77 +342,5 @@ export async function execute(interaction) { }) ] }); - } else if (subcommand === 'fetch') { - const user = interaction.options.getUser('user', true); - const warnings = await interaction.client.knex('warns') - .select('*') - .where('rebel_id', user.id); - - if (warnings.length === 0) return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Grey) - .setTitle('No warnings found.') - .setDescription(`No formal warnings for ${user} have been found in the database.`) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - - let desc = ``; - for (const warning of warnings) desc = desc.concat(`- **Warning ID**: ${warning.warning_id}\n - **Issued on**: \n - **Reason**: ${warning.reason}\n\n`); - - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Aqua) - .setTitle(`Warnings found.`) - .setDescription(`Found ${warnings.length} formal warning(s) for ${user}\n\n${desc}`) - .setThumbnail(interaction.guild.iconURL()) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - } else if (subcommand === 'fromid') { - const id = interaction.options.getString('warning_id', true); - const warning = await interaction.client.knex('warns') - .select('*') - .where('warning_id', id) - .first(); - - if (!warning) return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Grey) - .setTitle('Warning not found.') - .setDescription(`No formal warning with ID \`${id}\` has been found in the database.`) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); - - return await interaction.editReply({ - embeds: [ - new EmbedBuilder() - .setColor(Colors.Aqua) - .setTitle('Formal warning found.') - .setDescription(`Successfully retrieved a formal warning from the database.\n\n- **Warning ID**: ${warning.warning_id}\n - **Issued on**: \n - **Reason**: ${warning.reason}`) - .setThumbnail(interaction.guild.iconURL()) - .setTimestamp() - .setFooter({ - text: interaction.guild.name, - iconURL: interaction.guild.iconURL() - }) - ] - }); } } diff --git a/src/events/interactionCreate.js b/src/events/interactionCreate.js index c094a34..c31f03a 100644 --- a/src/events/interactionCreate.js +++ b/src/events/interactionCreate.js @@ -1,4 +1,4 @@ -import { Events, EmbedBuilder, Colors } from 'discord.js'; +import { Events, EmbedBuilder, Colors, MessageFlags } from 'discord.js'; export const name = Events.InteractionCreate; export async function execute(interaction) { @@ -44,9 +44,9 @@ export async function execute(interaction) { }); if (interaction.replied || interaction.deferred) { - return await interaction.followUp({ embeds: [embed], ephemeral: true }); + return await interaction.followUp({ embeds: [embed], flags: MessageFlags.Ephemeral }); } else { - return await interaction.reply({ embeds: [embed], ephemeral: true }); + return await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral }); } } } From edc39387b7c14522824a74ed63f2455a14dea1ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 23:33:53 +0300 Subject: [PATCH 2/3] Bump discord.js from 14.18.0 to 14.19.1 (#32) Bumps [discord.js](https://github.com/discordjs/discord.js/tree/HEAD/packages/discord.js) from 14.18.0 to 14.19.1. - [Release notes](https://github.com/discordjs/discord.js/releases) - [Changelog](https://github.com/discordjs/discord.js/blob/14.19.1/packages/discord.js/CHANGELOG.md) - [Commits](https://github.com/discordjs/discord.js/commits/14.19.1/packages/discord.js) --- updated-dependencies: - dependency-name: discord.js dependency-version: 14.19.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 103 +++++++++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 37fe1b0..77c4a44 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "author": "Asynchronite", "license": "AGPLv3", "dependencies": { - "discord.js": "^14.18.0", + "discord.js": "^14.19.1", "dotenv": "^16.5.0", "knex": "^3.1.0", "moment": "^2.30.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7cd488..43b933f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: discord.js: - specifier: ^14.18.0 - version: 14.18.0 + specifier: ^14.19.1 + version: 14.19.1 dotenv: specifier: ^16.5.0 version: 16.5.0 @@ -35,8 +35,8 @@ importers: packages: - '@discordjs/builders@1.10.1': - resolution: {integrity: sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==} + '@discordjs/builders@1.11.1': + resolution: {integrity: sha512-2zDAVuoeAkdv0YQzYKO8vZfaDfB+1KZ60ymBKtD7QDpsh6lzAnQSUBLqeRkhlons6BT9+yRctOh9fPy94w6kDA==} engines: {node: '>=16.11.0'} '@discordjs/collection@1.5.3': @@ -47,20 +47,20 @@ packages: resolution: {integrity: sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==} engines: {node: '>=18'} - '@discordjs/formatters@0.6.0': - resolution: {integrity: sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==} + '@discordjs/formatters@0.6.1': + resolution: {integrity: sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==} engines: {node: '>=16.11.0'} - '@discordjs/rest@2.4.3': - resolution: {integrity: sha512-+SO4RKvWsM+y8uFHgYQrcTl/3+cY02uQOH7/7bKbVZsTfrfpoE62o5p+mmV+s7FVhTX82/kQUGGbu4YlV60RtA==} + '@discordjs/rest@2.5.0': + resolution: {integrity: sha512-PWhchxTzpn9EV3vvPRpwS0EE2rNYB9pvzDU/eLLW3mByJl0ZHZjHI2/wA8EbH2gRMQV7nu+0FoDF84oiPl8VAQ==} engines: {node: '>=18'} '@discordjs/util@1.1.1': resolution: {integrity: sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==} engines: {node: '>=18'} - '@discordjs/ws@1.2.1': - resolution: {integrity: sha512-PBvenhZG56a6tMWF/f4P6f4GxZKJTBG95n7aiGSPTnodmz4N5g60t79rSIAq7ywMbv8A4jFtexMruH+oe51aQQ==} + '@discordjs/ws@1.2.2': + resolution: {integrity: sha512-dyfq7yn0wO0IYeYOs3z79I6/HumhmKISzFL0Z+007zQJMtAFGtt3AEoq1nuLXtcunUE5YYYQqgKvybXukAK8/w==} engines: {node: '>=16.11.0'} '@pm2/agent@2.1.1': @@ -92,11 +92,11 @@ packages: '@tootallnate/quickjs-emscripten@0.23.0': resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} - '@types/node@22.13.4': - resolution: {integrity: sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==} + '@types/node@22.15.3': + resolution: {integrity: sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==} - '@types/ws@8.5.14': - resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==} + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} '@vladfrangu/async_event_emitter@2.4.6': resolution: {integrity: sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==} @@ -302,11 +302,11 @@ packages: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} - discord-api-types@0.37.119: - resolution: {integrity: sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==} + discord-api-types@0.38.1: + resolution: {integrity: sha512-vsjsqjAuxsPhiwbPjTBeGQaDPlizFmSkU0mTzFGMgRxqCDIRBR7iTY74HacpzrDV0QtERHRKQEk1tq7drZUtHg==} - discord.js@14.18.0: - resolution: {integrity: sha512-SvU5kVUvwunQhN2/+0t55QW/1EHfB1lp0TtLZUSXVHDmyHTrdOj5LRKdR0zLcybaA15F+NtdWuWmGOX9lE+CAw==} + discord.js@14.19.1: + resolution: {integrity: sha512-r5jsPyaeoCrRGbdse4vQNbHAsoc2zuueyiTFJ2Ce7BiaJak9OldzKZWaWGwKdCFDH3zXlthU1hHXkx1EswKZCA==} engines: {node: '>=18'} dotenv@16.5.0: @@ -702,8 +702,8 @@ packages: resolution: {integrity: sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==} engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} - magic-bytes.js@1.10.0: - resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==} + magic-bytes.js@1.12.1: + resolution: {integrity: sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} @@ -1059,8 +1059,8 @@ packages: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} - undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} undici@6.21.1: resolution: {integrity: sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==} @@ -1098,8 +1098,8 @@ packages: utf-8-validate: optional: true - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.18.1: + resolution: {integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -1115,12 +1115,12 @@ packages: snapshots: - '@discordjs/builders@1.10.1': + '@discordjs/builders@1.11.1': dependencies: - '@discordjs/formatters': 0.6.0 + '@discordjs/formatters': 0.6.1 '@discordjs/util': 1.1.1 '@sapphire/shapeshift': 4.0.0 - discord-api-types: 0.37.119 + discord-api-types: 0.38.1 fast-deep-equal: 3.1.3 ts-mixer: 6.0.4 tslib: 2.8.1 @@ -1129,35 +1129,35 @@ snapshots: '@discordjs/collection@2.1.1': {} - '@discordjs/formatters@0.6.0': + '@discordjs/formatters@0.6.1': dependencies: - discord-api-types: 0.37.119 + discord-api-types: 0.38.1 - '@discordjs/rest@2.4.3': + '@discordjs/rest@2.5.0': dependencies: '@discordjs/collection': 2.1.1 '@discordjs/util': 1.1.1 '@sapphire/async-queue': 1.5.5 '@sapphire/snowflake': 3.5.3 '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.119 - magic-bytes.js: 1.10.0 + discord-api-types: 0.38.1 + magic-bytes.js: 1.12.1 tslib: 2.8.1 undici: 6.21.1 '@discordjs/util@1.1.1': {} - '@discordjs/ws@1.2.1': + '@discordjs/ws@1.2.2': dependencies: '@discordjs/collection': 2.1.1 - '@discordjs/rest': 2.4.3 + '@discordjs/rest': 2.5.0 '@discordjs/util': 1.1.1 '@sapphire/async-queue': 1.5.5 - '@types/ws': 8.5.14 + '@types/ws': 8.18.1 '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.119 + discord-api-types: 0.38.1 tslib: 2.8.1 - ws: 8.18.0 + ws: 8.18.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -1223,13 +1223,13 @@ snapshots: '@tootallnate/quickjs-emscripten@0.23.0': {} - '@types/node@22.13.4': + '@types/node@22.15.3': dependencies: - undici-types: 6.20.0 + undici-types: 6.21.0 - '@types/ws@8.5.14': + '@types/ws@8.18.1': dependencies: - '@types/node': 22.13.4 + '@types/node': 22.15.3 '@vladfrangu/async_event_emitter@2.4.6': {} @@ -1419,20 +1419,21 @@ snapshots: denque@2.1.0: {} - discord-api-types@0.37.119: {} + discord-api-types@0.38.1: {} - discord.js@14.18.0: + discord.js@14.19.1: dependencies: - '@discordjs/builders': 1.10.1 + '@discordjs/builders': 1.11.1 '@discordjs/collection': 1.5.3 - '@discordjs/formatters': 0.6.0 - '@discordjs/rest': 2.4.3 + '@discordjs/formatters': 0.6.1 + '@discordjs/rest': 2.5.0 '@discordjs/util': 1.1.1 - '@discordjs/ws': 1.2.1 + '@discordjs/ws': 1.2.2 '@sapphire/snowflake': 3.5.3 - discord-api-types: 0.37.119 + discord-api-types: 0.38.1 fast-deep-equal: 3.1.3 lodash.snakecase: 4.1.1 + magic-bytes.js: 1.12.1 tslib: 2.8.1 undici: 6.21.1 transitivePeerDependencies: @@ -1873,7 +1874,7 @@ snapshots: lru.min@1.1.2: {} - magic-bytes.js@1.10.0: {} + magic-bytes.js@1.12.1: {} math-intrinsics@1.1.0: {} @@ -2353,7 +2354,7 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - undici-types@6.20.0: {} + undici-types@6.21.0: {} undici@6.21.1: {} @@ -2406,6 +2407,6 @@ snapshots: ws@7.5.10: {} - ws@8.18.0: {} + ws@8.18.1: {} yallist@4.0.0: {} From f5adb937cd161c1333e5940016bac5b9781b0613 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 23:34:06 +0300 Subject: [PATCH 3/3] Bump mysql2 from 3.14.0 to 3.14.1 (#31) Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.14.0 to 3.14.1. - [Release notes](https://github.com/sidorares/node-mysql2/releases) - [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md) - [Commits](https://github.com/sidorares/node-mysql2/compare/v3.14.0...v3.14.1) --- updated-dependencies: - dependency-name: mysql2 dependency-version: 3.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 77c4a44..2d3b1b3 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "knex": "^3.1.0", "moment": "^2.30.1", "moment-duration-format": "^2.3.2", - "mysql2": "^3.14.0", + "mysql2": "^3.14.1", "pm2": "^6.0.5", "remove": "^0.1.5" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43b933f..a583034 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 16.5.0 knex: specifier: ^3.1.0 - version: 3.1.0(mysql2@3.14.0) + version: 3.1.0(mysql2@3.14.1) moment: specifier: ^2.30.1 version: 2.30.1 @@ -24,8 +24,8 @@ importers: specifier: ^2.3.2 version: 2.3.2 mysql2: - specifier: ^3.14.0 - version: 3.14.0 + specifier: ^3.14.1 + version: 3.14.1 pm2: specifier: ^6.0.5 version: 6.0.5 @@ -687,8 +687,8 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - long@5.3.1: - resolution: {integrity: sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==} + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -732,8 +732,8 @@ packages: mute-stream@0.0.8: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - mysql2@3.14.0: - resolution: {integrity: sha512-8eMhmG6gt/hRkU1G+8KlGOdQi2w+CgtNoD1ksXZq9gQfkfDsX4LHaBwTe1SY0Imx//t2iZA03DFnyYKPinxSRw==} + mysql2@3.14.1: + resolution: {integrity: sha512-7ytuPQJjQB8TNAYX/H2yhL+iQOnIBjAMam361R7UAL0lOVXWjtdrmoL9HYKqKoLp/8UUTRcvo1QPvK9KL7wA8w==} engines: {node: '>= 8.0'} named-placeholders@1.1.3: @@ -1839,7 +1839,7 @@ snapshots: json-stringify-safe@5.0.1: optional: true - knex@3.1.0(mysql2@3.14.0): + knex@3.1.0(mysql2@3.14.1): dependencies: colorette: 2.0.19 commander: 10.0.1 @@ -1856,7 +1856,7 @@ snapshots: tarn: 3.0.2 tildify: 2.0.0 optionalDependencies: - mysql2: 3.14.0 + mysql2: 3.14.1 transitivePeerDependencies: - supports-color @@ -1864,7 +1864,7 @@ snapshots: lodash@4.17.21: {} - long@5.3.1: {} + long@5.3.2: {} lru-cache@6.0.0: dependencies: @@ -1892,13 +1892,13 @@ snapshots: mute-stream@0.0.8: {} - mysql2@3.14.0: + mysql2@3.14.1: dependencies: aws-ssl-profiles: 1.1.2 denque: 2.1.0 generate-function: 2.3.1 iconv-lite: 0.6.3 - long: 5.3.1 + long: 5.3.2 lru.min: 1.1.2 named-placeholders: 1.1.3 seq-queue: 0.0.5