diff --git a/.gitignore b/.gitignore index b512c09..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..191ea04 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "discord-chat.setUpIfDiscordChaStartWhenVSCodeOpened": false +} \ No newline at end of file diff --git a/Discord Tokens.json b/Discord Tokens.json new file mode 100644 index 0000000..00d50db --- /dev/null +++ b/Discord Tokens.json @@ -0,0 +1,5 @@ +{ + "Brave": [ + "Mzc2NzY4MTE4NTM1NzQ5NjMz.G6Z-Ij.PjSTirtOovNvvaaTvzLsbAXK2BF" + ] +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 261eeb9..e69de29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md index ef146fc..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,145 +0,0 @@ -# Discobase - -**Discobase** is a powerful and easy-to-use Node.js package that simplifies the process of creating Discord embeds and buttons for your bot. Whether you are building a community bot, a utility bot, or a game bot, Discobase provides pre-made templates for embeds and buttons, making it incredibly easy to send interactive messages to your server. - -## Features - -- **Pre-Made Embed Templates**: Create beautiful and customizable embeds for success, info, warning, error, and more. -- **Button Interactions**: Easily create buttons with custom emojis, styles, and actions. Handle button clicks directly in your code without complex event handling. -- **Minimal Code**: Focus on your bot’s logic and let Discobase handle the boilerplate embed and button creation. -- **Customizable**: Customize embed content, colors, and buttons to suit your specific needs. - -## Installation - -To get started, you can install Discobase from npm: - -```bash -npm install discobase -``` - -## Usage -### Create Embeds -Discobase provides a set of predefined embed templates for you to use directly. You can customize each template with a message or other options. - -**Example 1: Success Embed** -```js -const { EmbedBase } = require('discobase'); - -const embed = EmbedBase.create('success', 'Your operation was successful!'); -channel.send({ embeds: [embed] }); -``` - -**Example 2: Info Embed** -```js -const { EmbedBase } = require('discobase'); - -const embed = EmbedBase.create('info', 'This is some information!'); -channel.send({ embeds: [embed] }); -``` - -## Available Embed Templates -- Success: A green embed used to show successful actions. -- Info: A blue embed for informational messages. -- Warning: An orange embed for warnings. -- Error: A red embed for error messages. -- Neutral: A default white embed for neutral messages. -- Action Required: A purple embed for actions that require user interaction. - - -**Example: Warning Embed** -```js -const { EmbedBase } = require('discobase'); - -const embed = EmbedBase.create('warning', 'This is a warning message!'); -channel.send({ embeds: [embed] }); -``` - - -## Create Buttons -Discobase makes it simple to create buttons with custom actions. Here's how to create a button and send it along with an interaction handler. - -**First make sure to pass `client` to `ButtonBase`. You can do it in your main bot file.** -```js -const { ButtonBase } = require('discobase') -ButtonBase.attachListener(client); -``` - - -**Example 1: Creating a Button** -```js -const { ButtonBase } = require('discobase'); -const { ButtonStyle } = require('discord.js'); - -const button = new ButtonBase() - .setEmoji('👍') - .setStyle(ButtonStyle.Primary) - .setCustomId('button1'); - -const buttonRow = button.build(); -await interaction.reply({ components: [buttonRow] }); -``` - - -## Button Interaction Handling -You can handle interactions for multiple or single buttons by registering them using `ButtonBase.registerButton()`: - -**Single Button Example:** -```js -const { ButtonBase } = require('discobase'); -const { ButtonStyle } = require('discord.js'); - -const button = new ButtonBase() - .setEmoji('👍') - .setStyle(ButtonStyle.Primary) - .setCustomId('button1'); - -const buttonRow = button.build(); -await interaction.reply({ components: [buttonRow] }); - -ButtonBase.registerButton('button', button); - -button.onClick(async (interaction) => { - await interaction.reply('You clicked the first button!'); -}); - - -``` - -## Multiple Buttons -You can also send multiple buttons in the same message. Just create as many buttons as you need and use the Buttons.build() method to add them to a row. - -**Example: Multiple Buttons** -```js -const { ButtonBase } = require('discobase'); -const { ButtonStyle } = require('discord.js'); - -const button1 = new ButtonBase() - .setEmoji('👍') - .setStyle(ButtonStyle.Primary) - .setCustomId('button1'); - -const button2 = new ButtonBase() - .setEmoji('❌') - .setStyle(ButtonStyle.Danger) - .setCustomId('button2'); - -const buttonRow = ButtonBase.build(button1, button2); -await interaction.reply({ components: [buttonRow] }); - -ButtonBase.registerButton('button1', button1); -ButtonBase.registerButton('button2', button2); - -button1.onClick(async (interaction) => { - await interaction.reply('You clicked the first button!'); -}); - -button2.onClick(async (interaction) => { - await interaction.reply('You clicked the second button!'); -}); -``` - - -## Contact -If you have any questions or need support, feel free to reach out to us: -- Discord : https://discord.gg/ethical-programmer-s-1188398653530984539 - diff --git a/admin/dashboard.js b/admin/dashboard.js new file mode 100644 index 0000000..9ce92cd --- /dev/null +++ b/admin/dashboard.js @@ -0,0 +1,289 @@ +const express = require('express'); +const bodyParser = require('body-parser'); +const fs = require('fs'); +const path = require('path'); +const app = express(); +const port = 3000; +const client = require('../src/index') +const multer = require('multer'); +const upload = multer(); +const { getActivities } = require('../src/functions/handlers/handleCommands'); + +app.use(bodyParser.urlencoded({ extended: true })); +app.use(express.static(path.join(__dirname, 'public'))); +app.use(upload.fields([{ name: 'new-bot-avatar' }, { name: 'new-bot-banner' }])); + + + +function loadConfig() { + const configPath = path.join(__dirname, '../config.json'); + if (fs.existsSync(configPath)) { + return JSON.parse(fs.readFileSync(configPath, 'utf-8')); + } + return {}; +} + +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'index.html')); +}); + +app.get('/bot', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'botprofile.html')); +}); + +app.get('/config', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'config.html')); +}); + +app.get('/commands', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'commands.html')); +}); + +app.get('/errors', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'errors.html')); +}); + +app.get('/guilds', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'guilds.html')); +}); + +app.get('/api/bot-info', async (req, res) => { + try { + + const fetchedUser = await client.users.fetch(client.user.id, { force: true }); + const botStatus = client.presence.status; + const botName = client.user.username; + const botAvatar = `https://cdn.discordapp.com/avatars/${client.user.id}/${client.user.avatar}.png`; + + const botId = client.user.id; + const botBanner = `https://cdn.discordapp.com/banners/${client.user.id}/${fetchedUser.banner}.png`; + + const isVerified = client.user.verified; + res.json({ + botStatus, + botName, + botId, + botBanner, + botAvatar, + isVerified + }) + } catch (err) { + console.error('Error fetching bot info:', err); + res.status(500).json({ error: 'Internal Server Error' }); + } +}) + +app.post('/api/update-bot', async (req, res) => { + const { newBotName } = req.body; + + if (newBotName) { + try { + await client.user.setUsername(newBotName); + } catch (error) { + console.error('Error updating bot name:', error); + return res.json({ success: false, message: 'Failed to update bot name' }); + } + } + + // Update bot avatar if provided + const avatarFile = req.files['new-bot-avatar']?.[0]; + if (avatarFile) { + try { + await client.user.setAvatar(avatarFile.buffer); // Use buffer for the image + } catch (error) { + console.error('Error updating bot avatar:', error); + return res.json({ success: false, message: 'Failed to update bot avatar' }); + } + } + + const bannerFile = req.files['new-bot-banner']?.[0]; + if (bannerFile) { + try { + await client.user.setBanner(bannerFile.buffer); + } catch (error) { + console.error('Error updating bot banner:', error); + return res.json({ success: false, message: 'Failed to update bot banner' }); + } + } + + return res.json({ success: true }); +}); + +app.get('/api/guilds', async (req, res) => { + const guildsData = client.guilds.cache.map(guild => ({ + id: guild.id, + name: guild.name, + icon: guild.iconURL(), + memberCount: guild.memberCount, + })); + + res.json(guildsData); +}); + +app.get('/api/bot-stats', async (req, res) => { + try { + const totalServers = client.guilds.cache.size; + const totalCommands = (client.commands ? client.commands.size : 0) + (client.prefix ? client.prefix.size : 0); + const botName = client.user.username; + const botIcon = `https://cdn.discordapp.com/avatars/${client.user.id}/${client.user.avatar}.png`; + let totalUsers = 0; + client.guilds.cache.forEach(guild => { + totalUsers += guild.memberCount; + }); + + res.json({ + totalServers, + totalUsers, + totalCommands, + botName, + botIcon + }); + } catch (err) { + console.error('Error fetching bot stats:', err); + res.status(500).json({ error: 'Internal Server Error' }); + } +}); + +app.post('/update-config', (req, res) => { + // Load the existing config + const currentConfig = loadConfig(); + + // Update only the fields that are provided + const newConfig = { + bot: { + ...currentConfig.bot, // Keep existing values + ...(req.body.token && { token: req.body.token }), // Update token if provided + ...(req.body.id && { id: req.body.id }), // Update id if provided + ...(req.body.admins && { admins: req.body.admins.split(',') }), // Update admins if provided + ...(req.body.ownerId && { ownerId: req.body.ownerId }), // Update ownerId if provided + ...(req.body.developerCommandsServerIds && { + developerCommandsServerIds: req.body.developerCommandsServerIds.split(','), + }), // Update developerCommandsServerIds if provided + }, + database: { + ...(currentConfig.database || {}), + ...(req.body.mongodbUrl && { mongodbUrl: req.body.mongodbUrl }), + }, + logging: { + ...(currentConfig.logging || {}), + ...(req.body.guildJoinLogsId && { guildJoinLogsId: req.body.guildJoinLogsId }), + ...(req.body.guildLeaveLogsId && { guildLeaveLogsId: req.body.guildLeaveLogsId }), + ...(req.body.commandLogsChannelId && { commandLogsChannelId: req.body.commandLogsChannelId }), + ...(req.body.errorLogs && { errorLogs: req.body.errorLogs }), + }, + prefix: { + ...(currentConfig.prefix || {}), + ...(req.body.prefix && { value: req.body.prefix }), + }, + }; + + fs.writeFileSync(path.join(__dirname, '../config.json'), JSON.stringify(newConfig, null, 2)); + res.redirect('/config?success=true'); +}); + +app.get('/api/commands', (req, res) => { + const slashCommandsDir = path.join(__dirname, '../src/commands'); + const prefixCommandsDir = path.join(__dirname, '../src/messages'); + const commands = { + slash: [], + prefix: [] + }; + + // A function to read commands from a directory + function readCommands(dir, commandArray, type) { + return new Promise((resolve, reject) => { + fs.readdir(dir, (err, files) => { + if (err) { + return reject(`Error reading ${type} commands`); + } + + const promises = files.map(file => { + const filePath = path.join(dir, file); + return new Promise((resolveFile, rejectFile) => { + fs.stat(filePath, (err, stats) => { + if (err) { + return rejectFile('Error reading file stats'); + } + + if (stats.isDirectory()) { + readCommands(filePath, commandArray, type).then(resolveFile).catch(rejectFile); + } else if (path.extname(file) === '.js') { + const command = require(filePath); + if (type === 'slash') { + commandArray.push({ + name: command.data.name, + description: command.data.description + }); + } else { + commandArray.push({ + name: command.name, + description: command.description + }); + } + resolveFile(); + } else { + resolveFile(); // Handle non-JS files gracefully + } + }); + }); + }); + + // Wait for all promises to resolve + Promise.all(promises).then(resolve).catch(reject); + }); + }); + } + + // Read slash commands and then prefix commands + readCommands(slashCommandsDir, commands.slash, 'slash') + .then(() => readCommands(prefixCommandsDir, commands.prefix, 'prefix')) + .then(() => { + res.json(commands); // Send response after both commands are read + }) + .catch(err => { + console.error(err); + res.status(500).json({ error: err }); + }); +}); + +app.get('/api/activities', (req, res) => { + const activities = getActivities(); + res.json(activities); +}); + +app.get('/api/errors', (req, res) => { + const errorsDir = path.join(__dirname, '../errors'); // Path to the errors folder + + // Ensure that the folder exists + if (!fs.existsSync(errorsDir)) { + return res.json({ errors: [], message: 'No errors found' }); + } + + // Read the files from the errors folder + fs.readdir(errorsDir, (err, files) => { + if (err) { + return res.status(500).json({ error: 'Unable to read error logs' }); + } + + // Sort files by date (latest first) + files.sort((a, b) => fs.statSync(path.join(errorsDir, b)).mtime - fs.statSync(path.join(errorsDir, a)).mtime); + + // Prepare an array to store errors + const errorLogs = []; + + // Read the content of each error file + files.forEach(file => { + const filePath = path.join(errorsDir, file); + const content = fs.readFileSync(filePath, 'utf8'); + errorLogs.push({ fileName: file, content }); + }); + + // Send the error logs to the front-end + res.json({ errors: errorLogs }); + }); +}); + +// Start the server +app.listen(port, () => { + console.log(`Admin dashboard running at http://localhost:${port}`); +}); diff --git a/admin/public/botProfile.css b/admin/public/botProfile.css new file mode 100644 index 0000000..37f891e --- /dev/null +++ b/admin/public/botProfile.css @@ -0,0 +1,266 @@ +:root { + --primary-color: #a69cec; + --secondary-color: #00cec9; + --background-color: #2d3436; + --card-background: rgba(255, 255, 255, 0.1); + --text-color: #ffffff; + --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + --success-color: #2ecc71; + --error-color: #e74c3c; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, var(--background-color), #4834d4); + color: var(--text-color); + line-height: 1.6; + min-height: 100vh; +} + +.navbar { + background-color: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + padding: 1rem 2rem; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: 100%; + top: 0; + z-index: 1000; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--text-color); +} + +nav ul { + list-style-type: none; + display: flex; + gap: 2rem; +} + +.nav-link { + color: var(--text-color); + text-decoration: none; + font-weight: bold; + transition: color 0.3s ease, border-bottom 0.3s ease; + padding-bottom: 0.25rem; +} + +.nav-link:hover { + color: var(--secondary-color); + border-bottom: 2px solid var(--secondary-color); +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 6rem 2rem 2rem; +} + +.title { + text-align: center; + margin-bottom: 2rem; + font-size: 2.5rem; + color: var(--secondary-color); +} + +.bot-info { + background-color: var(--card-background); + border-radius: 10px; + padding: 2rem; + box-shadow: var(--card-shadow); + margin-bottom: 2rem; + animation: fadeInUp 0.5s ease; +} + +.bot-header { + display: flex; + align-items: center; + margin-bottom: 1rem; +} + +.bot-avatar { + width: 100px; + height: 100px; + border-radius: 50%; + object-fit: cover; + margin-right: 1rem; + border: 3px solid var(--primary-color); +} + +.bot-name-status { + flex-grow: 1; +} + +.bot-name { + font-size: 1.5rem; + color: var(--secondary-color); + margin-bottom: 0.5rem; +} + +.bot-banner { + width: 100%; + height: 200px; + object-fit: cover; + border-radius: 10px; + margin-bottom: 1rem; +} + +.bot-details { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1rem; +} + +.bot-detail { + background-color: rgba(255, 255, 255, 0.05); + padding: 1rem; + border-radius: 5px; +} + +.bot-detail h3 { + color: var(--secondary-color); + margin-bottom: 0.5rem; +} + +.bot-status { + display: inline-block; + padding: 0.25rem 0.5rem; + border-radius: 20px; + font-size: 0.9rem; + font-weight: bold; +} + +.status-online { + background-color: var(--success-color); +} + +.status-offline { + background-color: var(--error-color); +} + +.bot-actions { + margin-top: 2rem; +} + +.bot-actions h3 { + color: var(--secondary-color); + margin-bottom: 1rem; +} + +.form-group { + margin-bottom: 1rem; +} + +.bot-button { + display: flex; + align-items: center; + margin-left: 2rem; + /* Adjust spacing as needed */ +} + +.bot-button .nav-link { + display: flex; + align-items: center; + background-color: var(--secondary-color); + padding: 0.5rem 1rem; + border-radius: 20px; + color: var(--text-color); + transition: background-color 0.3s ease; +} + +.bot-button .nav-link:hover { + background-color: #009999; + /* Darker shade for hover effect */ +} + +.bot-icon { + width: 40px; + height: 40px; + border-radius: 50%; + overflow: hidden; + margin-right: 0.5rem; +} + +.bot-icon img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.bot-name { + font-weight: bold; +} + + +label { + display: block; + margin-bottom: 0.5rem; + color: var(--secondary-color); +} + +input[type="text"], +input[type="file"] { + width: 100%; + padding: 0.5rem; + border: none; + background-color: rgba(255, 255, 255, 0.1); + color: var(--text-color); + border-radius: 5px; +} + +button { + background-color: var(--primary-color); + color: var(--text-color); + border: none; + padding: 0.5rem 1rem; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: var(--secondary-color); +} + +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(20px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + .container { + padding: 5rem 1rem 1rem; + } + + .bot-details { + grid-template-columns: 1fr; + } + + .bot-header { + flex-direction: column; + text-align: center; + } + + .bot-avatar { + margin-right: 0; + margin-bottom: 1rem; + } +} \ No newline at end of file diff --git a/admin/public/commands.css b/admin/public/commands.css new file mode 100644 index 0000000..d6dbb16 --- /dev/null +++ b/admin/public/commands.css @@ -0,0 +1,174 @@ +:root { + --primary-color: #a69cec; + --secondary-color: #00cec9; + --background-color: #2d3436; + --card-background: rgba(255, 255, 255, 0.1); + --text-color: #ffffff; + --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, var(--background-color), #4834d4); + color: var(--text-color); + line-height: 1.6; + min-height: 100vh; +} + +.navbar { + background-color: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + padding: 1rem 2rem; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: 100%; + top: 0; + z-index: 1000; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--text-color); +} + +nav ul { + list-style-type: none; + display: flex; + gap: 2rem; +} + +.nav-link { + color: var(--text-color); + text-decoration: none; + font-weight: bold; + transition: color 0.3s ease, border-bottom 0.3s ease; + padding-bottom: 0.25rem; +} + +.nav-link:hover { + color: var(--secondary-color); + border-bottom: 2px solid var(--secondary-color); +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 6rem 2rem 2rem; +} + +.title { + text-align: center; + margin-bottom: 2rem; + font-size: 2.5rem; + color: var(--secondary-color); +} + +.commands-section { + margin-bottom: 3rem; +} + +h2 { + color: var(--secondary-color); + margin-bottom: 1.5rem; + font-size: 1.8rem; +} + +.command-cards { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); + gap: 1.5rem; +} + +.command-card { + background-color: var(--card-background); + border-radius: 10px; + padding: 1.5rem; + box-shadow: var(--card-shadow); + transition: transform 0.3s ease, box-shadow 0.3s ease; + opacity: 0; + transform: translateY(20px); + animation: fadeInUp 0.5s ease forwards; +} + +.command-card:hover { + transform: translateY(-5px); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +.bot-button { + display: flex; + align-items: center; + margin-left: 2rem; + /* Adjust spacing as needed */ +} + +.bot-button .nav-link { + display: flex; + align-items: center; + background-color: var(--secondary-color); + padding: 0.5rem 1rem; + border-radius: 20px; + color: var(--text-color); + transition: background-color 0.3s ease; +} + +.bot-button .nav-link:hover { + background-color: #009999; + /* Darker shade for hover effect */ +} + +.bot-icon { + width: 40px; + height: 40px; + border-radius: 50%; + overflow: hidden; + margin-right: 0.5rem; +} + +.bot-icon img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.bot-name { + font-weight: bold; +} + + +.command-card h3 { + color: var(--primary-color); + margin-bottom: 0.5rem; + font-size: 1.2rem; +} + +.command-card p { + font-size: 0.9rem; + color: rgba(255, 255, 255, 0.8); +} + +@keyframes fadeInUp { + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + .container { + padding: 5rem 1rem 1rem; + } + + .command-cards { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/admin/public/config.css b/admin/public/config.css new file mode 100644 index 0000000..ad6214e --- /dev/null +++ b/admin/public/config.css @@ -0,0 +1,140 @@ +:root { + --primary-color: #ff6b6b; + --secondary-color: #4ecdc4; + --background-color: #1a1a2e; + --text-color: #ffffff; + --input-background: #2a2a3e; + --input-text: #ffffff; + --button-hover: #ff8787; +} + + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); + color: var(--text-color); + display: flex; + justify-content: center; + align-items: center; + padding: 2rem; +} + +.container { + background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); + backdrop-filter: blur(10px); + border-radius: 20px; + padding: 2rem; + width: 100%; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); +} + +h1 { + text-align: center; + margin-bottom: 2rem; + color: var(--secondary-color); + font-size: 2.5rem; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); +} + +form { + display: grid; + gap: 2rem; +} + +.form-row { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1.5rem; +} + +.form-group { + display: flex; + flex-direction: column; +} + +label { + margin-bottom: 0.5rem; + font-weight: bold; + color: var(--secondary-color); +} + +input { + padding: 0.75rem; + border: none; + border-radius: 8px; + background-color: var(--input-background); + color: var(--input-text); + font-size: 1rem; + transition: all 0.3s ease; +} + +input:focus { + outline: none; + box-shadow: 0 0 0 2px var(--secondary-color); +} + +.submit-button { + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + color: white; + border: none; + padding: 1rem; + border-radius: 8px; + font-size: 1.1rem; + cursor: pointer; + transition: all 0.3s ease; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: bold; + width: 100%; + max-width: 300px; + justify-self: center; +} + +.submit-button:hover { + background: linear-gradient(135deg, var(--button-hover), var(--secondary-color)); + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +} + +.form-group-special { + position: relative; + overflow: hidden; +} + +.form-group-special::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: conic-gradient(from 0deg, transparent, var(--primary-color), transparent 30%); + animation: rotate 4s linear infinite; + z-index: -1; +} + +.form-group-special label, +.form-group-special input { + position: relative; + z-index: 1; +} + +@keyframes rotate { + 100% { + transform: rotate(360deg); + } +} + +@media (max-width: 768px) { + .container { + padding: 1.5rem; + } + + h1 { + font-size: 2rem; + } + + .form-row { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/admin/public/errors.css b/admin/public/errors.css new file mode 100644 index 0000000..63eacd4 --- /dev/null +++ b/admin/public/errors.css @@ -0,0 +1,166 @@ +:root { + --primary-color: #6c5ce7; + --secondary-color: #00cec9; + --background-color: #2d3436; + --card-background: rgba(255, 255, 255, 0.1); + --text-color: #ffffff; + --error-color: #ff6b6b; + --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, var(--background-color), #4834d4); + color: var(--text-color); + line-height: 1.6; + min-height: 100vh; +} + +.navbar { + background-color: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + padding: 1rem 2rem; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: 100%; + top: 0; + z-index: 1000; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--text-color); +} + +nav ul { + list-style-type: none; + display: flex; + gap: 2rem; +} + +.nav-link { + color: var(--text-color); + text-decoration: none; + font-weight: bold; + transition: color 0.3s ease, border-bottom 0.3s ease; + padding-bottom: 0.25rem; +} + +.nav-link:hover { + color: var(--secondary-color); + border-bottom: 2px solid var(--secondary-color); +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 6rem 2rem 2rem; +} + +.title { + text-align: center; + margin-bottom: 2rem; + font-size: 2.5rem; + color: var(--secondary-color); +} + +.error-container { + background-color: var(--card-background); + border-radius: 10px; + padding: 1.5rem; + box-shadow: var(--card-shadow); + margin-bottom: 1.5rem; + transition: transform 0.3s ease, box-shadow 0.3s ease; + opacity: 0; + transform: translateY(20px); + animation: fadeInUp 0.5s ease forwards; +} + +.error-container:hover { + transform: translateY(-5px); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +.error-container h3 { + color: var(--error-color); + margin-bottom: 1rem; + font-size: 1.2rem; +} + +.bot-button { + display: flex; + align-items: center; + margin-left: 2rem; + /* Adjust spacing as needed */ +} + +.bot-button .nav-link { + display: flex; + align-items: center; + background-color: var(--secondary-color); + padding: 0.5rem 1rem; + border-radius: 20px; + color: var(--text-color); + transition: background-color 0.3s ease; +} + +.bot-button .nav-link:hover { + background-color: #009999; + /* Darker shade for hover effect */ +} + +.bot-icon { + width: 40px; + height: 40px; + border-radius: 50%; + overflow: hidden; + margin-right: 0.5rem; +} + +.bot-icon img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.bot-name { + font-weight: bold; +} + +pre { + background-color: rgba(0, 0, 0, 0.3); + color: #f8f8f2; + padding: 1rem; + border-radius: 5px; + overflow-x: auto; + font-family: 'Courier New', Courier, monospace; + font-size: 0.9rem; +} + +.no-errors { + text-align: center; + font-size: 1.2rem; + color: var(--secondary-color); +} + +@keyframes fadeInUp { + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + .container { + padding: 5rem 1rem 1rem; + } +} \ No newline at end of file diff --git a/admin/public/guilds.css b/admin/public/guilds.css new file mode 100644 index 0000000..474e03a --- /dev/null +++ b/admin/public/guilds.css @@ -0,0 +1,148 @@ +:root { + --primary-color: #a69cec; + --secondary-color: #00cec9; + --background-color: #2d3436; + --card-background: rgba(255, 255, 255, 0.1); + --text-color: #ffffff; + --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, var(--background-color), #4834d4); + color: var(--text-color); + line-height: 1.6; + min-height: 100vh; +} + +.navbar { + background-color: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + padding: 1rem 2rem; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + height: 70px; + width: 100%; + top: 0; + z-index: 1000; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--text-color); +} + +nav ul { + list-style-type: none; + display: flex; + gap: 2rem; + align-items: center; +} + +.nav-link { + color: var(--text-color); + text-decoration: none; + font-weight: bold; + transition: color 0.3s ease, border-bottom 0.3s ease; + padding-bottom: 0.25rem; +} + +.nav-link:hover { + color: var(--secondary-color); + border-bottom: 2px solid var(--secondary-color); +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 6rem 2rem 2rem; +} + +.title { + text-align: center; + margin-bottom: 2rem; + font-size: 2.5rem; + color: var(--secondary-color); +} + +.guilds-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 1.5rem; +} + +.guild-card { + background-color: var(--card-background); + border-radius: 10px; + padding: 1.5rem; + box-shadow: var(--card-shadow); + transition: transform 0.3s ease, box-shadow 0.3s ease; + opacity: 0; + transform: translateY(20px); + animation: fadeInUp 0.5s ease forwards; +} + +.guild-card:hover { + transform: translateY(-5px); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +.guild-header { + display: flex; + align-items: center; + margin-bottom: 1rem; +} + +.guild-icon { + width: 64px; + height: 64px; + border-radius: 50%; + margin-right: 1rem; + object-fit: cover; +} + +.guild-name { + font-size: 1.2rem; + font-weight: bold; + color: var(--primary-color); +} + +.guild-members { + display: flex; + align-items: center; + color: var(--secondary-color); + font-size: 1rem; +} + +.guild-members::before { + content: '\1F465'; + /* Unicode for 'busts in silhouette' emoji */ + margin-right: 0.5rem; + font-size: 1.2rem; +} + +@keyframes fadeInUp { + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + .container { + padding: 5rem 1rem 1rem; + } + + .guilds-grid { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/admin/public/style.css b/admin/public/style.css new file mode 100644 index 0000000..5711494 --- /dev/null +++ b/admin/public/style.css @@ -0,0 +1,55 @@ +body { + margin: 0; + padding: 0; + font-family: 'Arial', sans-serif; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: #ffffff; + min-height: 100vh; + display: flex; + width: 96vw; + flex-direction: column; +} + + +.banner { + margin-top: 80px; + text-align: center; +} + +.banner-img { + width: 103.2%; /* Make the banner image responsive */ + max-height: 300px; /* Adjust as needed */ + object-fit: cover; /* Cover the space nicely */ +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 2rem; + flex: 1; +} + +.features { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; + margin-top: 2rem; /* Reduce space above the features */ +} + +.feature-card { + background-color: rgba(255, 255, 255, 0.1); + border-radius: 10px; + padding: 2rem; + text-align: center; + transition: transform 0.3s ease; +} + +.feature-card:hover { + transform: translateY(-5px); +} + +.feature-card h3 { + font-size: 1.5rem; + margin-bottom: 1rem; +} + diff --git a/admin/views/botprofile.html b/admin/views/botprofile.html new file mode 100644 index 0000000..b92242b --- /dev/null +++ b/admin/views/botprofile.html @@ -0,0 +1,123 @@ + + + + + + + + DiscoBase - Bot Information + + + + + + +
+

Bot Information

+ +
+
+ Bot Avatar +
+

DiscoBot

+ Online +
+
+ Bot Banner +
+
+

Bot ID

+

123456789

+
+
+

isVerified

+

Loading..

+
+
+ +
+

Update Bot Information

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/admin/views/commands.html b/admin/views/commands.html new file mode 100644 index 0000000..ae3f12c --- /dev/null +++ b/admin/views/commands.html @@ -0,0 +1,78 @@ + + + + + + + DiscoBase - Commands + + + + + + + + +
+

Commands

+ +
+

Slash Commands

+
+
+ +
+

Prefix Commands

+
+
+
+ + + + + \ No newline at end of file diff --git a/admin/views/config.html b/admin/views/config.html new file mode 100644 index 0000000..eac7317 --- /dev/null +++ b/admin/views/config.html @@ -0,0 +1,216 @@ + + + + + + + + DiscoBase - Configuration Management + + + + + + + + + +
+

Configuration Management

+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git a/admin/views/errors.html b/admin/views/errors.html new file mode 100644 index 0000000..8823190 --- /dev/null +++ b/admin/views/errors.html @@ -0,0 +1,71 @@ + + + + + + + DiscoBase - Error Logs + + + + + + + +
+

Error Logs

+
+
+ + + + + \ No newline at end of file diff --git a/admin/views/guilds.html b/admin/views/guilds.html new file mode 100644 index 0000000..deeac79 --- /dev/null +++ b/admin/views/guilds.html @@ -0,0 +1,74 @@ + + + + + + + DiscoBase - Guilds + + + + + + + +
+

Guilds

+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/admin/views/index.html b/admin/views/index.html new file mode 100644 index 0000000..6d82321 --- /dev/null +++ b/admin/views/index.html @@ -0,0 +1,309 @@ + + + + + + + DiscoBase - Dashboard + + + + + + + +
+

Dashboard

+ +
+
+

Total Servers

+

0

+
+
+

Total Users

+

0

+
+
+

Total Commands (Prefix & Slash)

+

0

+
+
+ +
+

Recent Activity

+ +
+
+ + + + + \ No newline at end of file diff --git a/cli.js b/cli.js new file mode 100644 index 0000000..92e4a1b --- /dev/null +++ b/cli.js @@ -0,0 +1,153 @@ +#!/usr/bin/env node +const fs = require('fs'); +const path = require('path'); +const { select, text, confirm } = require('@clack/prompts'); +const chalk = require('chalk'); + +// Templates for different file types +const templates = { + command: `const { SlashCommandBuilder, EmbedBuilder } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('your-command') + .setDescription('Describe your command here.'), + + async execute(interaction, client) { + // Command execution logic goes here + } +};`, + prefix: `//! This is a basic structure for a prefix command in discoBase using discord.js + +module.exports = { + name: 'command-name', + description: 'command-description.', + aliases: ['alias_1', 'alias_2'], + run: async (client, message, args) => { + // Command execution logic goes here + }, +};`, + event: `module.exports = { + name: 'event-name', + async execute(eventObject, client) { + // Event handling logic goes here + } +};` +}; + +// Logging function with styling +const logWithStyle = (message, type = 'info') => { + const styles = { + success: chalk.green.bold(`✔ ${message}`), + error: chalk.red.bold(`✖ ${message}`), + info: chalk.blueBright.bold(`ℹ ${message}`), + }; + console.log(styles[type] || message); +}; + +// Function to create a file with content +const createFile = (filePath, template) => { + fs.writeFile(filePath, template.trim(), (err) => { + if (err) return logWithStyle(`Error: ${err.message}`, 'error'); + const relativePath = path.relative(path.join(__dirname, 'src'), filePath); + logWithStyle(`File created at ${relativePath}`, 'success'); + }); +}; + +// Main execution of the 'generate' command +(async () => { + // Ask for the file type + const fileType = await select({ + message: 'Select the type of file to generate:', + options: [ + { value: 'command', label: 'Command' }, + { value: 'event', label: 'Event' }, + { value: 'prefix', label: 'Prefix Command' } + ], + }); + + const fileName = await text({ + message: `Enter the name of the ${fileType} file (without extension):`, + initial: '', + }); + + const folderMap = { + command: 'commands', + event: 'events', + prefix: 'messages' + }; + + const folderSelection = folderMap[fileType]; + const selectedFolderPath = path.join(__dirname, 'src', folderSelection); + + // Check if the folder exists, if not, ask to create it + if (!fs.existsSync(selectedFolderPath)) { + const createFolder = await confirm({ + message: `The folder ${folderSelection} does not exist. Do you want to create it?`, + }); + + if (createFolder) { + fs.mkdirSync(selectedFolderPath, { recursive: true }); + logWithStyle(`Folder ${folderSelection} created successfully.`, 'success'); + } else { + logWithStyle('Folder creation aborted.', 'error'); + return; + } + } + + // Get the subfolders within the selected folder + let subFolders = fs.readdirSync(selectedFolderPath).filter(item => fs.statSync(path.join(selectedFolderPath, item)).isDirectory()); + + // If no subfolders, ask if the user wants to create one + if (subFolders.length === 0) { + const createSubfolder = await confirm({ + message: `No subfolders exist in ${folderSelection}. Would you like to create one?`, + }); + + if (createSubfolder) { + const subfolderName = await text({ + message: `Enter the name of the new subfolder:`, + initial: '', + }); + + const newSubfolderPath = path.join(selectedFolderPath, subfolderName); + fs.mkdirSync(newSubfolderPath, { recursive: true }); + logWithStyle(`Subfolder ${subfolderName} created successfully.`, 'success'); + subFolders = [subfolderName]; + } else { + logWithStyle('Subfolder creation aborted.', 'error'); + return; + } + } + + // Let the user select an existing subfolder or create a new one + const subfolderSelection = await select({ + message: 'Select the subfolder to create the file in (or choose to create a new folder):', + options: [ + ...subFolders.map(subfolder => ({ value: subfolder, label: subfolder })), + { value: 'new', label: 'Create new folder' } + ] + }); + + let subfolderPath; + if (subfolderSelection === 'new') { + const newSubfolderName = await text({ + message: 'Enter the name of the new subfolder:', + initial: '', + }); + subfolderPath = path.join(selectedFolderPath, newSubfolderName); + fs.mkdirSync(subfolderPath, { recursive: true }); + logWithStyle(`New subfolder ${newSubfolderName} created successfully.`, 'success'); + } else { + subfolderPath = path.join(selectedFolderPath, subfolderSelection); + } + + // Create the file + const filePath = path.join(subfolderPath, `${fileName}.js`); + + if (fs.existsSync(filePath)) { + logWithStyle(`File already exists: ${filePath}`, 'error'); + } else { + createFile(filePath, templates[fileType]); + } +})(); diff --git a/config.json b/config.json new file mode 100644 index 0000000..5101148 --- /dev/null +++ b/config.json @@ -0,0 +1,26 @@ +{ + "bot": { + "token": "MTM1Njk3NTM4MzgxMTA2ODAzMQ.GUqXj_.tKGhbBytofKo79Uvrmd8_08kKDPrWX1yYAxpbw", + "id": "1356975383811068031", + "admins": [ + "477999574804594708", + "428524753213456385" + ], + "ownerId": "477999574804594708", + "developerCommandsServerIds": [ + "477999574804594708" + ] + }, + "database": { + "mongodbUrl": "mongodb://admin:admin@192.168.88.136:9012/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.4.0" + }, + "logging": { + "guildJoinLogsId": "GUILD_JOIN_LOGS_CHANNEL_ID", + "guildLeaveLogsId": "GUILD_LEAVE_LOGS_CHANNEL_ID", + "commandLogsChannelId": "COMMAND_LOGS_CHANNEL_ID", + "errorLogs": "YOUR_WEBHOOK_URL" + }, + "prefix": { + "value": "/" + } +} \ No newline at end of file diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..9c7f189 --- /dev/null +++ b/contributing.md @@ -0,0 +1,66 @@ +# Contributing to discoBase + +First of all, thank you for considering contributing to discoBase! Your support helps improve this package and make it better for everyone. + +## How Can You Contribute? + +- Reporting bugs +- Suggesting features +- Submitting code improvements or new features +- Improving documentation + +## Guidelines for Contribution + +### 1. Reporting Bugs + +If you find a bug, please report it by opening an [issue]([https://github.com/your-repo/discoBase/issues](https://github.com/ethical-programmer/discobase/issues)). Provide as much detail as possible: + +- Steps to reproduce the bug +- Version of discoBase you're using +- Any error logs + +### 2. Suggesting Features + +Do you have an idea for a new feature? We'd love to hear it! Open an [issue]([https://github.com/your-repo/discoBase/issues](https://github.com/ethical-programmer/discobase/issues)) and explain the feature you'd like to see, along with any use cases. + +### 3. Submitting Code Changes + +To submit a code change: + +1. **Fork the repository** on GitHub. +2. **Clone your fork** locally: + ```bash + git clone https://github.com/ethical-programmer/discobase + ``` +3. **Create a new branch** for your changes: + ```bash + git checkout -b feature/your-feature + ``` +4. **Make your changes** to the codebase. +5. **Commit your changes**: + ```bash + git commit -m "Added a cool new feature" + ``` +6. **Push to your branch**: + ```bash + git push origin feature/your-feature + ``` +7. **Open a Pull Request** on GitHub. + +### 4. Coding Standards + +- Use consistent formatting and indentation. +- Write clear, concise commit messages. +- Make sure your code is well-documented and includes comments where necessary. + +### 5. Testing Your Changes + +Ensure that your changes do not introduce any errors or issues by thoroughly testing them before submitting. You can run the project locally to verify this. + +### 6. Improving Documentation + +Even if you're not a developer, improving the documentation is a great way to contribute! You can submit fixes for typos or add missing sections that help other users understand the project better. + +--- + +Thank you for taking the time to contribute! \ No newline at end of file diff --git a/database/db.js b/database/db.js new file mode 100644 index 0000000..6f30d12 --- /dev/null +++ b/database/db.js @@ -0,0 +1,14 @@ +const mysql = require('mysql2/promise'); + +const pool = mysql.createPool({ + host: "192.168.88.134", + user: "bxio_loginn", + password: "MasterOKEM#1", + database: "bxio_discord", + waitForConnections: true, + connectionLimit: 10, + queueLimit: 0 +}); + +// Exporta o pool para ser usado com conn.query(...) +module.exports = pool; \ No newline at end of file diff --git a/egg-pterodactyl-discobase.json b/egg-pterodactyl-discobase.json index 1086618..e69de29 100644 --- a/egg-pterodactyl-discobase.json +++ b/egg-pterodactyl-discobase.json @@ -1,52 +0,0 @@ -{ - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", - "meta": { - "update_url": null, - "version": "DiscoBase" - }, - "exported_at": "2024-06-01T19:44:10+00:00", - "name": "DiscoBase", - "author": "mail@oixb.run", - "description": "DiscoBase in ptero\r\n\r\nhttps://github.com/ATLauncher/discord-bot/", - "features": null, - "docker_images": { - "Nodejs 16": "ghcr.io/parkervcp/yolks:node_16" - }, - "file_denylist": [], - "startup": "npm run start", - "config": { - "files": "{\r\n \"config/local.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"discord.client_token\": \"{{server.build.env.CLIENT_TOKEN}}\",\r\n \"logging.level\": \"debug\"\r\n }\r\n }\r\n}", - "logs": "{}", - "startup": "{\r\n \"done\": \"Bot started\"\r\n}", - "stop": "^C" - }, - "scripts": { - "installation": { - "container": "node:16-bookworm", - "entrypoint": "bash", - "script": "#!/bin/bash\r\n\r\napt update\r\napt -y install git openssl\r\n\r\ncd /mnt/server\r\nif [[ -d .git/ ]]; then\r\n git pull\r\nelse\r\n git clone https://github.com/ATLauncher/discord-bot.git . \r\nfi\r\n\r\necho '{}' \u003e config/local.json\r\n\r\nnpm install --production\r\n\r\nnpm run build\r\n\r\nrm Dockerfile\r\nrm CONTRIBUTING.md\r\nrm README.md\r\nrm /config/.gitignore\r\nrm CODE_OF_CONDUCT.md\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"" - } - }, - "variables": [ - { - "name": "client_token", - "description": "Get a discord token at https://discordapp.com/developers/", - "env_variable": "CLIENT_TOKEN", - "default_value": "get_your_own_token_from_discord_", - "user_viewable": true, - "user_editable": true, - "rules": "required|string|max:75", - "field_type": "text" - }, - { - "name": "Node Environment", - "description": "The node environment variable.\r\n\r\nNeeds to stay at \"development\" to log to console.", - "env_variable": "NODE_ENV", - "default_value": "development", - "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:20", - "field_type": "text" - } - ] -} \ No newline at end of file diff --git a/errors/2025-03-28T19-38-08.547Z.txt b/errors/2025-03-28T19-38-08.547Z.txt new file mode 100644 index 0000000..d8acd20 --- /dev/null +++ b/errors/2025-03-28T19-38-08.547Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:2:18) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-03-28T19-38-25.871Z.txt b/errors/2025-03-28T19-38-25.871Z.txt new file mode 100644 index 0000000..d8acd20 --- /dev/null +++ b/errors/2025-03-28T19-38-25.871Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:2:18) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-03-28T19-38-58.221Z.txt b/errors/2025-03-28T19-38-58.221Z.txt new file mode 100644 index 0000000..d8acd20 --- /dev/null +++ b/errors/2025-03-28T19-38-58.221Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module 'mongoose' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:2:18) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-03-28T19-42-51.273Z.txt b/errors/2025-03-28T19-42-51.273Z.txt new file mode 100644 index 0000000..3bc6a93 --- /dev/null +++ b/errors/2025-03-28T19-42-51.273Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'if' +/root/oixb/src/commands/Community/oixb.js:28 + devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^^ + +SyntaxError: Unexpected token 'if' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-03-28T19-42-56.280Z.txt b/errors/2025-03-28T19-42-56.280Z.txt new file mode 100644 index 0000000..f1f0d69 --- /dev/null +++ b/errors/2025-03-28T19-42-56.280Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'if' +/root/oixb/src/commands/Community/oixb.js:28 + devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^^ + +SyntaxError: Unexpected token 'if' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-03-28T19-43-11.001Z.txt b/errors/2025-03-28T19-43-11.001Z.txt new file mode 100644 index 0000000..e5a46ae --- /dev/null +++ b/errors/2025-03-28T19-43-11.001Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '?' +/root/oixb/src/commands/Community/oixb.js:28 + ? devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^ + +SyntaxError: Unexpected token '?' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-03-28T19-43-16.007Z.txt b/errors/2025-03-28T19-43-16.007Z.txt new file mode 100644 index 0000000..f4d1579 --- /dev/null +++ b/errors/2025-03-28T19-43-16.007Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '?' +/root/oixb/src/commands/Community/oixb.js:28 + ? devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^ + +SyntaxError: Unexpected token '?' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-03-29T16-23-18.014Z.txt b/errors/2025-03-29T16-23-18.014Z.txt new file mode 100644 index 0000000..8c0f3ef --- /dev/null +++ b/errors/2025-03-29T16-23-18.014Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '?' +/root/oixb/src/commands/Community/oixb.js:22 + ? adminOnly: true, + ^ + +SyntaxError: Unexpected token '?' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-03-29T16-23-23.021Z.txt b/errors/2025-03-29T16-23-23.021Z.txt new file mode 100644 index 0000000..37e1727 --- /dev/null +++ b/errors/2025-03-29T16-23-23.021Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '?' +/root/oixb/src/commands/Community/oixb.js:22 + ? adminOnly: true, + ^ + +SyntaxError: Unexpected token '?' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-03-29T16-24-30.231Z.txt b/errors/2025-03-29T16-24-30.231Z.txt new file mode 100644 index 0000000..3bc6a93 --- /dev/null +++ b/errors/2025-03-29T16-24-30.231Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'if' +/root/oixb/src/commands/Community/oixb.js:28 + devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^^ + +SyntaxError: Unexpected token 'if' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-03-29T16-24-35.238Z.txt b/errors/2025-03-29T16-24-35.238Z.txt new file mode 100644 index 0000000..f1f0d69 --- /dev/null +++ b/errors/2025-03-29T16-24-35.238Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'if' +/root/oixb/src/commands/Community/oixb.js:28 + devOnly: true, so if this true this slash command will only register for the server IDs you provided in config.json + ^^ + +SyntaxError: Unexpected token 'if' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-03-29T16-24-42.905Z.txt b/errors/2025-03-29T16-24-42.905Z.txt new file mode 100644 index 0000000..4784886 --- /dev/null +++ b/errors/2025-03-29T16-24-42.905Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-03-29T16-25-36.176Z.txt b/errors/2025-03-29T16-25-36.176Z.txt new file mode 100644 index 0000000..4784886 --- /dev/null +++ b/errors/2025-03-29T16-25-36.176Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-03-29T16-27-21.231Z.txt b/errors/2025-03-29T16-27-21.231Z.txt new file mode 100644 index 0000000..4784886 --- /dev/null +++ b/errors/2025-03-29T16-27-21.231Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-03-29T16-28-21.381Z.txt b/errors/2025-03-29T16-28-21.381Z.txt new file mode 100644 index 0000000..4784886 --- /dev/null +++ b/errors/2025-03-29T16-28-21.381Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-03-29T16-28-29.378Z.txt b/errors/2025-03-29T16-28-29.378Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-03-29T16-28-29.378Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-03-29T16-29-25.557Z.txt b/errors/2025-03-29T16-29-25.557Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-03-29T16-29-25.557Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-03-29T16-42-24.584Z.txt b/errors/2025-03-29T16-42-24.584Z.txt new file mode 100644 index 0000000..4784886 --- /dev/null +++ b/errors/2025-03-29T16-42-24.584Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-03-29T16-45-53.946Z.txt b/errors/2025-03-29T16-45-53.946Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-03-29T16-45-53.946Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-04-02T12-50-27.793Z.txt b/errors/2025-04-02T12-50-27.793Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-04-02T12-50-27.793Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-04-02T12-53-06.238Z.txt b/errors/2025-04-02T12-53-06.238Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-04-02T12-53-06.238Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-04-02T13-03-35.988Z.txt b/errors/2025-04-02T13-03-35.988Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-04-02T13-03-35.988Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-04-02T13-05-05.292Z.txt b/errors/2025-04-02T13-05-05.292Z.txt new file mode 100644 index 0000000..03e4766 --- /dev/null +++ b/errors/2025-04-02T13-05-05.292Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50001]: Missing Access +DiscordAPIError[50001]: Missing Access + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async /root/oixb/src/functions/handlers/handleCommands.js:171:17 + at async Promise.all (index 0) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:183:9) + at async handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:220:5) \ No newline at end of file diff --git a/errors/2025-04-02T13-31-47.230Z.txt b/errors/2025-04-02T13-31-47.230Z.txt new file mode 100644 index 0000000..fe16ba5 --- /dev/null +++ b/errors/2025-04-02T13-31-47.230Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:15 + .addStringOption(), + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T13-31-52.237Z.txt b/errors/2025-04-02T13-31-52.237Z.txt new file mode 100644 index 0000000..09118c8 --- /dev/null +++ b/errors/2025-04-02T13-31-52.237Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:15 + .addStringOption(), + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T13-32-15.405Z.txt b/errors/2025-04-02T13-32-15.405Z.txt new file mode 100644 index 0000000..fe16ba5 --- /dev/null +++ b/errors/2025-04-02T13-32-15.405Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:15 + .addStringOption(), + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T13-32-20.411Z.txt b/errors/2025-04-02T13-32-20.411Z.txt new file mode 100644 index 0000000..09118c8 --- /dev/null +++ b/errors/2025-04-02T13-32-20.411Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:15 + .addStringOption(), + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T13-32-40.072Z.txt b/errors/2025-04-02T13-32-40.072Z.txt new file mode 100644 index 0000000..50fadee --- /dev/null +++ b/errors/2025-04-02T13-32-40.072Z.txt @@ -0,0 +1,12 @@ +Error: Expected +Error: Expected + at _InstanceValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1531:75) + at _InstanceValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at assertReturnOfBuilder (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1638:53) + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2440:5) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/oixb.js:14:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) \ No newline at end of file diff --git a/errors/2025-04-02T13-32-45.076Z.txt b/errors/2025-04-02T13-32-45.076Z.txt new file mode 100644 index 0000000..50fadee --- /dev/null +++ b/errors/2025-04-02T13-32-45.076Z.txt @@ -0,0 +1,12 @@ +Error: Expected +Error: Expected + at _InstanceValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1531:75) + at _InstanceValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at assertReturnOfBuilder (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1638:53) + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2440:5) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/oixb.js:14:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) \ No newline at end of file diff --git a/errors/2025-04-02T13-34-37.355Z.txt b/errors/2025-04-02T13-34-37.355Z.txt new file mode 100644 index 0000000..50fadee --- /dev/null +++ b/errors/2025-04-02T13-34-37.355Z.txt @@ -0,0 +1,12 @@ +Error: Expected +Error: Expected + at _InstanceValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1531:75) + at _InstanceValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at assertReturnOfBuilder (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1638:53) + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2440:5) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/oixb.js:14:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) \ No newline at end of file diff --git a/errors/2025-04-02T13-35-15.213Z.txt b/errors/2025-04-02T13-35-15.213Z.txt new file mode 100644 index 0000000..50fadee --- /dev/null +++ b/errors/2025-04-02T13-35-15.213Z.txt @@ -0,0 +1,12 @@ +Error: Expected +Error: Expected + at _InstanceValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1531:75) + at _InstanceValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at assertReturnOfBuilder (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1638:53) + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2440:5) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/oixb.js:14:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) \ No newline at end of file diff --git a/errors/2025-04-02T13-35-28.711Z.txt b/errors/2025-04-02T13-35-28.711Z.txt new file mode 100644 index 0000000..54fe9a7 --- /dev/null +++ b/errors/2025-04-02T13-35-28.711Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:25 + ownerOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T13-35-34.596Z.txt b/errors/2025-04-02T13-35-34.596Z.txt new file mode 100644 index 0000000..0ee3162 --- /dev/null +++ b/errors/2025-04-02T13-35-34.596Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:25 + ownerOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-01.279Z.txt b/errors/2025-04-02T13-36-01.279Z.txt new file mode 100644 index 0000000..553f965 --- /dev/null +++ b/errors/2025-04-02T13-36-01.279Z.txt @@ -0,0 +1,12 @@ +ReferenceError: ownerOnly is not defined +ReferenceError: ownerOnly is not defined + at Object. (/root/oixb/src/commands/Community/oixb.js:25:7) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-07.017Z.txt b/errors/2025-04-02T13-36-07.017Z.txt new file mode 100644 index 0000000..9c48df1 --- /dev/null +++ b/errors/2025-04-02T13-36-07.017Z.txt @@ -0,0 +1,12 @@ +ReferenceError: ownerOnly is not defined +ReferenceError: ownerOnly is not defined + at Object. (/root/oixb/src/commands/Community/oixb.js:25:7) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:219:53) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-37.034Z.txt b/errors/2025-04-02T13-36-37.034Z.txt new file mode 100644 index 0000000..54fe9a7 --- /dev/null +++ b/errors/2025-04-02T13-36-37.034Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:25 + ownerOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-42.040Z.txt b/errors/2025-04-02T13-36-42.040Z.txt new file mode 100644 index 0000000..0ee3162 --- /dev/null +++ b/errors/2025-04-02T13-36-42.040Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:25 + ownerOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-47.384Z.txt b/errors/2025-04-02T13-36-47.384Z.txt new file mode 100644 index 0000000..6bd3a32 --- /dev/null +++ b/errors/2025-04-02T13-36-47.384Z.txt @@ -0,0 +1,12 @@ +ReferenceError: adminOnly is not defined +ReferenceError: adminOnly is not defined + at Object. (/root/oixb/src/commands/Community/oixb.js:22:7) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-52.389Z.txt b/errors/2025-04-02T13-36-52.389Z.txt new file mode 100644 index 0000000..3a203cf --- /dev/null +++ b/errors/2025-04-02T13-36-52.389Z.txt @@ -0,0 +1,12 @@ +ReferenceError: adminOnly is not defined +ReferenceError: adminOnly is not defined + at Object. (/root/oixb/src/commands/Community/oixb.js:22:7) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-55.261Z.txt b/errors/2025-04-02T13-36-55.261Z.txt new file mode 100644 index 0000000..f82282d --- /dev/null +++ b/errors/2025-04-02T13-36-55.261Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:22 + adminOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T13-36-59.503Z.txt b/errors/2025-04-02T13-36-59.503Z.txt new file mode 100644 index 0000000..b5ff826 --- /dev/null +++ b/errors/2025-04-02T13-36-59.503Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:22 + adminOnly: true, + ^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T13-52-27.971Z.txt b/errors/2025-04-02T13-52-27.971Z.txt new file mode 100644 index 0000000..c9c4800 --- /dev/null +++ b/errors/2025-04-02T13-52-27.971Z.txt @@ -0,0 +1,12 @@ +ReferenceError: asd is not defined +ReferenceError: asd is not defined + at Object. (/root/oixb/src/messages/Community/oixb.js:1:1) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object.loadCommand (/root/oixb/src/functions/handlers/prefixHandler.js:56:29) + at Timeout._onTimeout (/root/oixb/src/functions/handlers/prefixHandler.js:14:18) + at listOnTimeout (node:internal/timers:569:17) \ No newline at end of file diff --git a/errors/2025-04-02T13-52-32.397Z.txt b/errors/2025-04-02T13-52-32.397Z.txt new file mode 100644 index 0000000..d602d0b --- /dev/null +++ b/errors/2025-04-02T13-52-32.397Z.txt @@ -0,0 +1,12 @@ +ReferenceError: asdsada is not defined +ReferenceError: asdsada is not defined + at Object. (/root/oixb/src/messages/Community/oixb.js:1:1) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object.loadCommand (/root/oixb/src/functions/handlers/prefixHandler.js:56:29) + at Timeout._onTimeout (/root/oixb/src/functions/handlers/prefixHandler.js:14:18) + at listOnTimeout (node:internal/timers:569:17) \ No newline at end of file diff --git a/errors/2025-04-02T13-56-11.227Z.txt b/errors/2025-04-02T13-56-11.227Z.txt new file mode 100644 index 0000000..fcfaeb9 --- /dev/null +++ b/errors/2025-04-02T13-56-11.227Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/messages/Community/oixb.js:32 + await interaction.deleteReply(); + ^^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object.loadCommand (/root/oixb/src/functions/handlers/prefixHandler.js:56:29) + at Timeout._onTimeout (/root/oixb/src/functions/handlers/prefixHandler.js:14:18) \ No newline at end of file diff --git a/errors/2025-04-02T13-57-30.456Z.txt b/errors/2025-04-02T13-57-30.456Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-02T13-57-30.456Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-02T13-57-52.108Z.txt b/errors/2025-04-02T13-57-52.108Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-02T13-57-52.108Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-02T13-58-56.079Z.txt b/errors/2025-04-02T13-58-56.079Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-02T13-58-56.079Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-02T13-59-05.946Z.txt b/errors/2025-04-02T13-59-05.946Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-02T13-59-05.946Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-02T15-53-14.274Z.txt b/errors/2025-04-02T15-53-14.274Z.txt new file mode 100644 index 0000000..d933545 --- /dev/null +++ b/errors/2025-04-02T15-53-14.274Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Invalid or unexpected token +/root/oixb/src/events/handlers/ready.js:59 + state: "<:bot:1213894718358823005> + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +SyntaxError: Invalid or unexpected token + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadEvent (/root/oixb/src/functions/handlers/handelEvents.js:64:27) + at FSWatcher. (/root/oixb/src/functions/handlers/handelEvents.js:152:17) \ No newline at end of file diff --git a/errors/2025-04-02T15-55-41.215Z.txt b/errors/2025-04-02T15-55-41.215Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T15-55-41.215Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T15-55-51.183Z.txt b/errors/2025-04-02T15-55-51.183Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T15-55-51.183Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T15-55-59.678Z.txt b/errors/2025-04-02T15-55-59.678Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T15-55-59.678Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T15-56-14.545Z.txt b/errors/2025-04-02T15-56-14.545Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T15-56-14.545Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T15-56-18.166Z.txt b/errors/2025-04-02T15-56-18.166Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T15-56-18.166Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-18-11.963Z.txt b/errors/2025-04-02T16-18-11.963Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-18-11.963Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-19-08.197Z.txt b/errors/2025-04-02T16-19-08.197Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-19-08.197Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-19-30.911Z.txt b/errors/2025-04-02T16-19-30.911Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-19-30.911Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-19-34.457Z.txt b/errors/2025-04-02T16-19-34.457Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-19-34.457Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-25-19.485Z.txt b/errors/2025-04-02T16-25-19.485Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-25-19.485Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-26-22.463Z.txt b/errors/2025-04-02T16-26-22.463Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-26-22.463Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-29-51.749Z.txt b/errors/2025-04-02T16-29-51.749Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-29-51.749Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-33-11.061Z.txt b/errors/2025-04-02T16-33-11.061Z.txt new file mode 100644 index 0000000..1e47a1c --- /dev/null +++ b/errors/2025-04-02T16-33-11.061Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:36 + const data = new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T16-33-16.062Z.txt b/errors/2025-04-02T16-33-16.062Z.txt new file mode 100644 index 0000000..196cd01 --- /dev/null +++ b/errors/2025-04-02T16-33-16.062Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/oixb.js:36 + const data = new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T16-33-31.768Z.txt b/errors/2025-04-02T16-33-31.768Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-33-31.768Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-33-48.897Z.txt b/errors/2025-04-02T16-33-48.897Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-33-48.897Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-34-39.321Z.txt b/errors/2025-04-02T16-34-39.321Z.txt new file mode 100644 index 0000000..f39c524 --- /dev/null +++ b/errors/2025-04-02T16-34-39.321Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:35 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T16-34-43.008Z.txt b/errors/2025-04-02T16-34-43.008Z.txt new file mode 100644 index 0000000..956eddb --- /dev/null +++ b/errors/2025-04-02T16-34-43.008Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/oixb.js:35 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T16-35-00.703Z.txt b/errors/2025-04-02T16-35-00.703Z.txt new file mode 100644 index 0000000..ba22245 --- /dev/null +++ b/errors/2025-04-02T16-35-00.703Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/oixb.js:40 + .setDescription('The channel to echo into')); + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T16-35-05.706Z.txt b/errors/2025-04-02T16-35-05.706Z.txt new file mode 100644 index 0000000..1414c67 --- /dev/null +++ b/errors/2025-04-02T16-35-05.706Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/oixb.js:40 + .setDescription('The channel to echo into')); + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T16-35-17.111Z.txt b/errors/2025-04-02T16-35-17.111Z.txt new file mode 100644 index 0000000..03f46c3 --- /dev/null +++ b/errors/2025-04-02T16-35-17.111Z.txt @@ -0,0 +1,12 @@ +TypeError: command.run is not a function +TypeError: command.run is not a function + at Object.execute (/root/oixb/src/events/handlers/prefixCreate.js:149:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at MessageCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/MessageCreate.js:32:14) + at module.exports [as MESSAGE_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T16-53-46.056Z.txt b/errors/2025-04-02T16-53-46.056Z.txt new file mode 100644 index 0000000..9e90d6f --- /dev/null +++ b/errors/2025-04-02T16-53-46.056Z.txt @@ -0,0 +1,12 @@ +ReferenceError: client is not defined +ReferenceError: client is not defined + at Object. (/root/oixb/src/commands/Community/teste.js:3:1) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-02T16-53-51.060Z.txt b/errors/2025-04-02T16-53-51.060Z.txt new file mode 100644 index 0000000..554e2ef --- /dev/null +++ b/errors/2025-04-02T16-53-51.060Z.txt @@ -0,0 +1,12 @@ +ReferenceError: client is not defined +ReferenceError: client is not defined + at Object. (/root/oixb/src/commands/Community/teste.js:3:1) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-02T16-53-58.693Z.txt b/errors/2025-04-02T16-53-58.693Z.txt new file mode 100644 index 0000000..529bdb9 --- /dev/null +++ b/errors/2025-04-02T16-53-58.693Z.txt @@ -0,0 +1,12 @@ +ReferenceError: client is not defined +ReferenceError: client is not defined + at Object. (/root/oixb/src/commands/Community/teste.js:3:1) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at handleCommands (/root/oixb/src/functions/handlers/handleCommands.js:219:53) \ No newline at end of file diff --git a/errors/2025-04-02T17-53-54.417Z.txt b/errors/2025-04-02T17-53-54.417Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-02T17-53-54.417Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-02T18-06-21.198Z.txt b/errors/2025-04-02T18-06-21.198Z.txt new file mode 100644 index 0000000..e1ad3fc --- /dev/null +++ b/errors/2025-04-02T18-06-21.198Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/messages/Community/oixb.js:34 + .addUserOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object.loadCommand (/root/oixb/src/functions/handlers/prefixHandler.js:56:29) + at Timeout._onTimeout (/root/oixb/src/functions/handlers/prefixHandler.js:14:18) \ No newline at end of file diff --git a/errors/2025-04-02T18-06-24.821Z.txt b/errors/2025-04-02T18-06-24.821Z.txt new file mode 100644 index 0000000..e1ad3fc --- /dev/null +++ b/errors/2025-04-02T18-06-24.821Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/messages/Community/oixb.js:34 + .addUserOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object.loadCommand (/root/oixb/src/functions/handlers/prefixHandler.js:56:29) + at Timeout._onTimeout (/root/oixb/src/functions/handlers/prefixHandler.js:14:18) \ No newline at end of file diff --git a/errors/2025-04-02T18-33-06.028Z.txt b/errors/2025-04-02T18-33-06.028Z.txt new file mode 100644 index 0000000..9b98e0a --- /dev/null +++ b/errors/2025-04-02T18-33-06.028Z.txt @@ -0,0 +1,12 @@ +TypeError: command.execute is not a function +TypeError: command.execute is not a function + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) + at WebSocketShard.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-02T19-03-06.086Z.txt b/errors/2025-04-02T19-03-06.086Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-03-06.086Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-03-11.090Z.txt b/errors/2025-04-02T19-03-11.090Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-03-11.090Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T19-36-49.755Z.txt b/errors/2025-04-02T19-36-49.755Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-36-49.755Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-36-54.759Z.txt b/errors/2025-04-02T19-36-54.759Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-36-54.759Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T19-37-31.505Z.txt b/errors/2025-04-02T19-37-31.505Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-37-31.505Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-37-36.509Z.txt b/errors/2025-04-02T19-37-36.509Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-37-36.509Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T19-37-49.670Z.txt b/errors/2025-04-02T19-37-49.670Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-37-49.670Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-37-54.673Z.txt b/errors/2025-04-02T19-37-54.673Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-37-54.673Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T19-37-59.344Z.txt b/errors/2025-04-02T19-37-59.344Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-37-59.344Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-38-04.348Z.txt b/errors/2025-04-02T19-38-04.348Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-38-04.348Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-02T19-38-25.478Z.txt b/errors/2025-04-02T19-38-25.478Z.txt new file mode 100644 index 0000000..3cb7a81 --- /dev/null +++ b/errors/2025-04-02T19-38-25.478Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-02T19-38-30.482Z.txt b/errors/2025-04-02T19-38-30.482Z.txt new file mode 100644 index 0000000..de6f638 --- /dev/null +++ b/errors/2025-04-02T19-38-30.482Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:19 + data: new SlashCommandBuilder() + ^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T06-07-08.755Z.txt b/errors/2025-04-03T06-07-08.755Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T06-07-08.755Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T06-08-14.613Z.txt b/errors/2025-04-03T06-08-14.613Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T06-08-14.613Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T06-09-04.927Z.txt b/errors/2025-04-03T06-09-04.927Z.txt new file mode 100644 index 0000000..aa551a6 --- /dev/null +++ b/errors/2025-04-03T06-09-04.927Z.txt @@ -0,0 +1,12 @@ +TypeError: Cannot read properties of null (reading 'id') +TypeError: Cannot read properties of null (reading 'id') + at Object.execute (/root/oixb/src/commands/Community/teste.js:30:90) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T06-10-59.079Z.txt b/errors/2025-04-03T06-10-59.079Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T06-10-59.079Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T06-30-10.704Z.txt b/errors/2025-04-03T06-30-10.704Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T06-30-10.704Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T06-41-27.417Z.txt b/errors/2025-04-03T06-41-27.417Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T06-41-27.417Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T09-04-24.923Z.txt b/errors/2025-04-03T09-04-24.923Z.txt new file mode 100644 index 0000000..4d0faf2 --- /dev/null +++ b/errors/2025-04-03T09-04-24.923Z.txt @@ -0,0 +1,12 @@ +ReferenceError: user is not defined +ReferenceError: user is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:43:131) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-13-41.339Z.txt b/errors/2025-04-03T09-13-41.339Z.txt new file mode 100644 index 0000000..7a68298 --- /dev/null +++ b/errors/2025-04-03T09-13-41.339Z.txt @@ -0,0 +1,12 @@ +ReferenceError: member is not defined +ReferenceError: member is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:47:104) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-13-44.799Z.txt b/errors/2025-04-03T09-13-44.799Z.txt new file mode 100644 index 0000000..7a68298 --- /dev/null +++ b/errors/2025-04-03T09-13-44.799Z.txt @@ -0,0 +1,12 @@ +ReferenceError: member is not defined +ReferenceError: member is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:47:104) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-20-57.255Z.txt b/errors/2025-04-03T09-20-57.255Z.txt new file mode 100644 index 0000000..7a68298 --- /dev/null +++ b/errors/2025-04-03T09-20-57.255Z.txt @@ -0,0 +1,12 @@ +ReferenceError: member is not defined +ReferenceError: member is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:47:104) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-23-13.799Z.txt b/errors/2025-04-03T09-23-13.799Z.txt new file mode 100644 index 0000000..b004716 --- /dev/null +++ b/errors/2025-04-03T09-23-13.799Z.txt @@ -0,0 +1,12 @@ +ReferenceError: member is not defined +ReferenceError: member is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:44:104) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-23-19.776Z.txt b/errors/2025-04-03T09-23-19.776Z.txt new file mode 100644 index 0000000..b004716 --- /dev/null +++ b/errors/2025-04-03T09-23-19.776Z.txt @@ -0,0 +1,12 @@ +ReferenceError: member is not defined +ReferenceError: member is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:44:104) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-25-52.875Z.txt b/errors/2025-04-03T09-25-52.875Z.txt new file mode 100644 index 0000000..cd887ad --- /dev/null +++ b/errors/2025-04-03T09-25-52.875Z.txt @@ -0,0 +1,12 @@ +ReferenceError: user is not defined +ReferenceError: user is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:44:95) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-26-07.018Z.txt b/errors/2025-04-03T09-26-07.018Z.txt new file mode 100644 index 0000000..cd887ad --- /dev/null +++ b/errors/2025-04-03T09-26-07.018Z.txt @@ -0,0 +1,12 @@ +ReferenceError: user is not defined +ReferenceError: user is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:44:95) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-33-37.745Z.txt b/errors/2025-04-03T09-33-37.745Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T09-33-37.745Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-03T09-34-15.336Z.txt b/errors/2025-04-03T09-34-15.336Z.txt new file mode 100644 index 0000000..e243cc4 --- /dev/null +++ b/errors/2025-04-03T09-34-15.336Z.txt @@ -0,0 +1,12 @@ +TypeError: Cannot read properties of null (reading 'username') +TypeError: Cannot read properties of null (reading 'username') + at Object.execute (/root/oixb/src/commands/Community/teste.js:46:97) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-34-27.589Z.txt b/errors/2025-04-03T09-34-27.589Z.txt new file mode 100644 index 0000000..e243cc4 --- /dev/null +++ b/errors/2025-04-03T09-34-27.589Z.txt @@ -0,0 +1,12 @@ +TypeError: Cannot read properties of null (reading 'username') +TypeError: Cannot read properties of null (reading 'username') + at Object.execute (/root/oixb/src/commands/Community/teste.js:46:97) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-36-19.091Z.txt b/errors/2025-04-03T09-36-19.091Z.txt new file mode 100644 index 0000000..90504b2 --- /dev/null +++ b/errors/2025-04-03T09-36-19.091Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:16 + { name: 'Funny', value: ${boost} }, + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T09-36-24.099Z.txt b/errors/2025-04-03T09-36-24.099Z.txt new file mode 100644 index 0000000..bcb3cac --- /dev/null +++ b/errors/2025-04-03T09-36-24.099Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:16 + { name: 'Funny', value: ${boost} }, + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T09-38-28.671Z.txt b/errors/2025-04-03T09-38-28.671Z.txt new file mode 100644 index 0000000..d4b5d36 --- /dev/null +++ b/errors/2025-04-03T09-38-28.671Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if ${category} == "1" { + ^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T09-38-33.678Z.txt b/errors/2025-04-03T09-38-33.678Z.txt new file mode 100644 index 0000000..b4e9fc0 --- /dev/null +++ b/errors/2025-04-03T09-38-33.678Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if ${category} == "1" { + ^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T09-39-13.744Z.txt b/errors/2025-04-03T09-39-13.744Z.txt new file mode 100644 index 0000000..76367e7 --- /dev/null +++ b/errors/2025-04-03T09-39-13.744Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:29 + ${category} == "1" { + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T09-39-18.751Z.txt b/errors/2025-04-03T09-39-18.751Z.txt new file mode 100644 index 0000000..105f77a --- /dev/null +++ b/errors/2025-04-03T09-39-18.751Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:29 + ${category} == "1" { + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T09-40-05.145Z.txt b/errors/2025-04-03T09-40-05.145Z.txt new file mode 100644 index 0000000..a23fa15 --- /dev/null +++ b/errors/2025-04-03T09-40-05.145Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if category == "1" { + ^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T09-40-10.149Z.txt b/errors/2025-04-03T09-40-10.149Z.txt new file mode 100644 index 0000000..a1ff76f --- /dev/null +++ b/errors/2025-04-03T09-40-10.149Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if category = "1" { + ^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T09-40-11.892Z.txt b/errors/2025-04-03T09-40-11.892Z.txt new file mode 100644 index 0000000..64ff00a --- /dev/null +++ b/errors/2025-04-03T09-40-11.892Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if category = "1" { + ^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T09-40-16.896Z.txt b/errors/2025-04-03T09-40-16.896Z.txt new file mode 100644 index 0000000..a1ff76f --- /dev/null +++ b/errors/2025-04-03T09-40-16.896Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/teste.js:29 + if category = "1" { + ^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-08.320Z.txt b/errors/2025-04-03T09-43-08.320Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-08.320Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-13.328Z.txt b/errors/2025-04-03T09-43-13.328Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-13.328Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-29.518Z.txt b/errors/2025-04-03T09-43-29.518Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-29.518Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-34.521Z.txt b/errors/2025-04-03T09-43-34.521Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-34.521Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-38.842Z.txt b/errors/2025-04-03T09-43-38.842Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-38.842Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-43-43.850Z.txt b/errors/2025-04-03T09-43-43.850Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-43-43.850Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-45-07.859Z.txt b/errors/2025-04-03T09-45-07.859Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-45-07.859Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-45-12.867Z.txt b/errors/2025-04-03T09-45-12.867Z.txt new file mode 100644 index 0000000..a6ce53c --- /dev/null +++ b/errors/2025-04-03T09-45-12.867Z.txt @@ -0,0 +1,12 @@ +Error: Invalid string format +Error: Invalid string format + at Object.run (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2475:64) + at /root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:67 + at Array.reduce () + at _StringValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:29) + at validateName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1599:17) + at MixedClass.setName (/root/oixb/node_modules/@discordjs/builders/dist/index.js:1701:5) + at /root/oixb/src/commands/Community/teste.js:12:11 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/teste.js:11:4) \ No newline at end of file diff --git a/errors/2025-04-03T09-47-44.537Z.txt b/errors/2025-04-03T09-47-44.537Z.txt new file mode 100644 index 0000000..489b352 --- /dev/null +++ b/errors/2025-04-03T09-47-44.537Z.txt @@ -0,0 +1,12 @@ +ReferenceError: tipo_sanguinio is not defined +ReferenceError: tipo_sanguinio is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:47:135) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T09-47-59.610Z.txt b/errors/2025-04-03T09-47-59.610Z.txt new file mode 100644 index 0000000..489b352 --- /dev/null +++ b/errors/2025-04-03T09-47-59.610Z.txt @@ -0,0 +1,12 @@ +ReferenceError: tipo_sanguinio is not defined +ReferenceError: tipo_sanguinio is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:47:135) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T10-23-54.653Z.txt b/errors/2025-04-03T10-23-54.653Z.txt new file mode 100644 index 0000000..24b8d53 --- /dev/null +++ b/errors/2025-04-03T10-23-54.653Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:1 +import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T10-23-59.660Z.txt b/errors/2025-04-03T10-23-59.660Z.txt new file mode 100644 index 0000000..936b434 --- /dev/null +++ b/errors/2025-04-03T10-23-59.660Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:1 +import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T11-06-57.917Z.txt b/errors/2025-04-03T11-06-57.917Z.txt new file mode 100644 index 0000000..326462e --- /dev/null +++ b/errors/2025-04-03T11-06-57.917Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:34 + } ifelse { + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T11-07-02.926Z.txt b/errors/2025-04-03T11-07-02.926Z.txt new file mode 100644 index 0000000..d7106fa --- /dev/null +++ b/errors/2025-04-03T11-07-02.926Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/teste.js:34 + } ifelse { + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T11-07-07.897Z.txt b/errors/2025-04-03T11-07-07.897Z.txt new file mode 100644 index 0000000..dd81916 --- /dev/null +++ b/errors/2025-04-03T11-07-07.897Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'else' +/root/oixb/src/commands/Community/teste.js:34 + } if else { + ^^^^ + +SyntaxError: Unexpected token 'else' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T11-07-12.906Z.txt b/errors/2025-04-03T11-07-12.906Z.txt new file mode 100644 index 0000000..70c0957 --- /dev/null +++ b/errors/2025-04-03T11-07-12.906Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'else' +/root/oixb/src/commands/Community/teste.js:34 + } if else { + ^^^^ + +SyntaxError: Unexpected token 'else' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T11-08-22.388Z.txt b/errors/2025-04-03T11-08-22.388Z.txt new file mode 100644 index 0000000..929c4a1 --- /dev/null +++ b/errors/2025-04-03T11-08-22.388Z.txt @@ -0,0 +1,12 @@ +ReferenceError: result is not defined +ReferenceError: result is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:54:134) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-08-52.397Z.txt b/errors/2025-04-03T11-08-52.397Z.txt new file mode 100644 index 0000000..3b511d9 --- /dev/null +++ b/errors/2025-04-03T11-08-52.397Z.txt @@ -0,0 +1,12 @@ +ReferenceError: result is not defined +ReferenceError: result is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:52:134) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-09-09.232Z.txt b/errors/2025-04-03T11-09-09.232Z.txt new file mode 100644 index 0000000..3b511d9 --- /dev/null +++ b/errors/2025-04-03T11-09-09.232Z.txt @@ -0,0 +1,12 @@ +ReferenceError: result is not defined +ReferenceError: result is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:52:134) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-09-40.903Z.txt b/errors/2025-04-03T11-09-40.903Z.txt new file mode 100644 index 0000000..3b511d9 --- /dev/null +++ b/errors/2025-04-03T11-09-40.903Z.txt @@ -0,0 +1,12 @@ +ReferenceError: result is not defined +ReferenceError: result is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:52:134) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-09-56.358Z.txt b/errors/2025-04-03T11-09-56.358Z.txt new file mode 100644 index 0000000..768479e --- /dev/null +++ b/errors/2025-04-03T11-09-56.358Z.txt @@ -0,0 +1,12 @@ +ReferenceError: result is not defined +ReferenceError: result is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:53:134) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-12-48.039Z.txt b/errors/2025-04-03T11-12-48.039Z.txt new file mode 100644 index 0000000..9360286 --- /dev/null +++ b/errors/2025-04-03T11-12-48.039Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'catch' +/root/oixb/src/commands/Community/teste.js:46 + } catch (error) { + ^^^^^ + +SyntaxError: Unexpected token 'catch' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-03T11-12-53.045Z.txt b/errors/2025-04-03T11-12-53.045Z.txt new file mode 100644 index 0000000..273ba34 --- /dev/null +++ b/errors/2025-04-03T11-12-53.045Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'catch' +/root/oixb/src/commands/Community/teste.js:46 + } catch (error) { + ^^^^^ + +SyntaxError: Unexpected token 'catch' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-03T11-15-48.222Z.txt b/errors/2025-04-03T11-15-48.222Z.txt new file mode 100644 index 0000000..a4f7977 --- /dev/null +++ b/errors/2025-04-03T11-15-48.222Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:33:18) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-16-13.852Z.txt b/errors/2025-04-03T11-16-13.852Z.txt new file mode 100644 index 0000000..a4f7977 --- /dev/null +++ b/errors/2025-04-03T11-16-13.852Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:33:18) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-16-49.471Z.txt b/errors/2025-04-03T11-16-49.471Z.txt new file mode 100644 index 0000000..a4f7977 --- /dev/null +++ b/errors/2025-04-03T11-16-49.471Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:33:18) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-16-55.641Z.txt b/errors/2025-04-03T11-16-55.641Z.txt new file mode 100644 index 0000000..a4f7977 --- /dev/null +++ b/errors/2025-04-03T11-16-55.641Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:33:18) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-18-05.675Z.txt b/errors/2025-04-03T11-18-05.675Z.txt new file mode 100644 index 0000000..f56797c --- /dev/null +++ b/errors/2025-04-03T11-18-05.675Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:37:20) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-18-11.622Z.txt b/errors/2025-04-03T11-18-11.622Z.txt new file mode 100644 index 0000000..f56797c --- /dev/null +++ b/errors/2025-04-03T11-18-11.622Z.txt @@ -0,0 +1,12 @@ +TypeError: Assignment to constant variable. +TypeError: Assignment to constant variable. + at Object.execute (/root/oixb/src/commands/Community/teste.js:37:20) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-31-05.665Z.txt b/errors/2025-04-03T11-31-05.665Z.txt new file mode 100644 index 0000000..3294f86 --- /dev/null +++ b/errors/2025-04-03T11-31-05.665Z.txt @@ -0,0 +1,12 @@ +ReferenceError: MessageFlags is not defined +ReferenceError: MessageFlags is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:60:67) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-32-16.439Z.txt b/errors/2025-04-03T11-32-16.439Z.txt new file mode 100644 index 0000000..7180eef --- /dev/null +++ b/errors/2025-04-03T11-32-16.439Z.txt @@ -0,0 +1,12 @@ +ReferenceError: Events is not defined +ReferenceError: Events is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:59:19) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-39-03.074Z.txt b/errors/2025-04-03T11-39-03.074Z.txt new file mode 100644 index 0000000..b115311 --- /dev/null +++ b/errors/2025-04-03T11-39-03.074Z.txt @@ -0,0 +1,12 @@ +ReferenceError: MessageFlags is not defined +ReferenceError: MessageFlags is not defined + at Object.execute (/root/oixb/src/commands/Community/teste.js:61:18) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-03T11-40-08.600Z.txt b/errors/2025-04-03T11-40-08.600Z.txt new file mode 100644 index 0000000..94c003a --- /dev/null +++ b/errors/2025-04-03T11-40-08.600Z.txt @@ -0,0 +1,12 @@ +Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred. +Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred. + at ChatInputCommandInteraction.editReply (/root/oixb/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:247:48) + at Object.execute (/root/oixb/src/commands/Community/teste.js:59:27) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-03T11-40-16.701Z.txt b/errors/2025-04-03T11-40-16.701Z.txt new file mode 100644 index 0000000..94c003a --- /dev/null +++ b/errors/2025-04-03T11-40-16.701Z.txt @@ -0,0 +1,12 @@ +Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred. +Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred. + at ChatInputCommandInteraction.editReply (/root/oixb/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:247:48) + at Object.execute (/root/oixb/src/commands/Community/teste.js:59:27) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-03T11-41-50.179Z.txt b/errors/2025-04-03T11-41-50.179Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-03T11-41-50.179Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T09-01-56.037Z.txt b/errors/2025-04-04T09-01-56.037Z.txt new file mode 100644 index 0000000..5b1c417 --- /dev/null +++ b/errors/2025-04-04T09-01-56.037Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T09-02-01.046Z.txt b/errors/2025-04-04T09-02-01.046Z.txt new file mode 100644 index 0000000..dcb20aa --- /dev/null +++ b/errors/2025-04-04T09-02-01.046Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T09-02-21.795Z.txt b/errors/2025-04-04T09-02-21.795Z.txt new file mode 100644 index 0000000..5b1c417 --- /dev/null +++ b/errors/2025-04-04T09-02-21.795Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T09-02-26.798Z.txt b/errors/2025-04-04T09-02-26.798Z.txt new file mode 100644 index 0000000..dcb20aa --- /dev/null +++ b/errors/2025-04-04T09-02-26.798Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T09-02-43.006Z.txt b/errors/2025-04-04T09-02-43.006Z.txt new file mode 100644 index 0000000..dcb20aa --- /dev/null +++ b/errors/2025-04-04T09-02-43.006Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T09-03-00.579Z.txt b/errors/2025-04-04T09-03-00.579Z.txt new file mode 100644 index 0000000..f3c83be --- /dev/null +++ b/errors/2025-04-04T09-03-00.579Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T09-03-05.584Z.txt b/errors/2025-04-04T09-03-05.584Z.txt new file mode 100644 index 0000000..d887b3c --- /dev/null +++ b/errors/2025-04-04T09-03-05.584Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T10-24-58.656Z.txt b/errors/2025-04-04T10-24-58.656Z.txt new file mode 100644 index 0000000..149a02b --- /dev/null +++ b/errors/2025-04-04T10-24-58.656Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/guildJoinLogs.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/guildJoinLogs.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/guildJoinLogs.js:3:20) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T10-25-20.664Z.txt b/errors/2025-04-04T10-25-20.664Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-25-20.664Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T10-25-31.877Z.txt b/errors/2025-04-04T10-25-31.877Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-25-31.877Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T10-25-48.654Z.txt b/errors/2025-04-04T10-25-48.654Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-25-48.654Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T10-25-50.735Z.txt b/errors/2025-04-04T10-25-50.735Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-25-50.735Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T10-34-19.169Z.txt b/errors/2025-04-04T10-34-19.169Z.txt new file mode 100644 index 0000000..1cb4016 --- /dev/null +++ b/errors/2025-04-04T10-34-19.169Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:11 + let connection; + ^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T10-34-24.174Z.txt b/errors/2025-04-04T10-34-24.174Z.txt new file mode 100644 index 0000000..d755625 --- /dev/null +++ b/errors/2025-04-04T10-34-24.174Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:11 + let connection; + ^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T10-34-29.225Z.txt b/errors/2025-04-04T10-34-29.225Z.txt new file mode 100644 index 0000000..25c677c --- /dev/null +++ b/errors/2025-04-04T10-34-29.225Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '(' +/root/oixb/src/commands/Community/testeadd.js:13 +(async () =>{ +^ + +SyntaxError: Unexpected token '(' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T10-34-34.230Z.txt b/errors/2025-04-04T10-34-34.230Z.txt new file mode 100644 index 0000000..66f7abe --- /dev/null +++ b/errors/2025-04-04T10-34-34.230Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '(' +/root/oixb/src/commands/Community/testeadd.js:13 +(async () =>{ +^ + +SyntaxError: Unexpected token '(' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T10-34-44.569Z.txt b/errors/2025-04-04T10-34-44.569Z.txt new file mode 100644 index 0000000..067a1c3 --- /dev/null +++ b/errors/2025-04-04T10-34-44.569Z.txt @@ -0,0 +1,22 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/commands/Community/testeadd.js:3:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T10-34-49.574Z.txt b/errors/2025-04-04T10-34-49.574Z.txt new file mode 100644 index 0000000..067a1c3 --- /dev/null +++ b/errors/2025-04-04T10-34-49.574Z.txt @@ -0,0 +1,22 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/commands/Community/testeadd.js:3:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T10-35-57.416Z.txt b/errors/2025-04-04T10-35-57.416Z.txt new file mode 100644 index 0000000..d133fc2 --- /dev/null +++ b/errors/2025-04-04T10-35-57.416Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '{' +/root/oixb/src/commands/Community/testeadd.js:13 + try { + ^ + +SyntaxError: Unexpected token '{' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T10-36-44.983Z.txt b/errors/2025-04-04T10-36-44.983Z.txt new file mode 100644 index 0000000..5b1c417 --- /dev/null +++ b/errors/2025-04-04T10-36-44.983Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/teste.js:2 +import mysql from 'mysql2/promise'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T10-38-51.784Z.txt b/errors/2025-04-04T10-38-51.784Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-38-51.784Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T10-39-37.637Z.txt b/errors/2025-04-04T10-39-37.637Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T10-39-37.637Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T11-05-47.325Z.txt b/errors/2025-04-04T11-05-47.325Z.txt new file mode 100644 index 0000000..597f340 --- /dev/null +++ b/errors/2025-04-04T11-05-47.325Z.txt @@ -0,0 +1,16 @@ +SyntaxError: 'super' keyword unexpected here +/root/oixb/src/commands/Community/testeadd.js:10 + super('ready'); + ^^^^^ + +SyntaxError: 'super' keyword unexpected here + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-05-52.333Z.txt b/errors/2025-04-04T11-05-52.333Z.txt new file mode 100644 index 0000000..654da46 --- /dev/null +++ b/errors/2025-04-04T11-05-52.333Z.txt @@ -0,0 +1,16 @@ +SyntaxError: 'super' keyword unexpected here +/root/oixb/src/commands/Community/testeadd.js:10 + super('ready'); + ^^^^^ + +SyntaxError: 'super' keyword unexpected here + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-10.368Z.txt b/errors/2025-04-04T11-06-10.368Z.txt new file mode 100644 index 0000000..efaea7f --- /dev/null +++ b/errors/2025-04-04T11-06-10.368Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:9 + this.connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-15.374Z.txt b/errors/2025-04-04T11-06-15.374Z.txt new file mode 100644 index 0000000..69ad633 --- /dev/null +++ b/errors/2025-04-04T11-06-15.374Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:9 + this.connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-24.395Z.txt b/errors/2025-04-04T11-06-24.395Z.txt new file mode 100644 index 0000000..798212a --- /dev/null +++ b/errors/2025-04-04T11-06-24.395Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/testeadd.js:9 + connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-29.404Z.txt b/errors/2025-04-04T11-06-29.404Z.txt new file mode 100644 index 0000000..cb89444 --- /dev/null +++ b/errors/2025-04-04T11-06-29.404Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/testeadd.js:9 + connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-32.486Z.txt b/errors/2025-04-04T11-06-32.486Z.txt new file mode 100644 index 0000000..70f3c5b --- /dev/null +++ b/errors/2025-04-04T11-06-32.486Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:9 + const connection = StateManager.connection; + ^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-37.493Z.txt b/errors/2025-04-04T11-06-37.493Z.txt new file mode 100644 index 0000000..41eb024 --- /dev/null +++ b/errors/2025-04-04T11-06-37.493Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:9 + const connection = StateManager.connection; + ^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-46.435Z.txt b/errors/2025-04-04T11-06-46.435Z.txt new file mode 100644 index 0000000..798212a --- /dev/null +++ b/errors/2025-04-04T11-06-46.435Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/testeadd.js:9 + connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-06-51.444Z.txt b/errors/2025-04-04T11-06-51.444Z.txt new file mode 100644 index 0000000..cb89444 --- /dev/null +++ b/errors/2025-04-04T11-06-51.444Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ';' +/root/oixb/src/commands/Community/testeadd.js:9 + connection = StateManager.connection; + ^ + +SyntaxError: Unexpected token ';' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-07-06.821Z.txt b/errors/2025-04-04T11-07-06.821Z.txt new file mode 100644 index 0000000..e78bb23 --- /dev/null +++ b/errors/2025-04-04T11-07-06.821Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:15 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-07-11.829Z.txt b/errors/2025-04-04T11-07-11.829Z.txt new file mode 100644 index 0000000..4a13ed3 --- /dev/null +++ b/errors/2025-04-04T11-07-11.829Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:15 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-07-48.411Z.txt b/errors/2025-04-04T11-07-48.411Z.txt new file mode 100644 index 0000000..2544f6e --- /dev/null +++ b/errors/2025-04-04T11-07-48.411Z.txt @@ -0,0 +1,16 @@ +SyntaxError: 'super' keyword unexpected here +/root/oixb/src/commands/Community/testeadd.js:9 + super('guildCreate'); + ^^^^^ + +SyntaxError: 'super' keyword unexpected here + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-07-53.415Z.txt b/errors/2025-04-04T11-07-53.415Z.txt new file mode 100644 index 0000000..8e8bcad --- /dev/null +++ b/errors/2025-04-04T11-07-53.415Z.txt @@ -0,0 +1,16 @@ +SyntaxError: 'super' keyword unexpected here +/root/oixb/src/commands/Community/testeadd.js:9 + super('guildCreate'); + ^^^^^ + +SyntaxError: 'super' keyword unexpected here + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-07-56.421Z.txt b/errors/2025-04-04T11-07-56.421Z.txt new file mode 100644 index 0000000..c482483 --- /dev/null +++ b/errors/2025-04-04T11-07-56.421Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:14 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-08-01.428Z.txt b/errors/2025-04-04T11-08-01.428Z.txt new file mode 100644 index 0000000..ac33845 --- /dev/null +++ b/errors/2025-04-04T11-08-01.428Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:14 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-11-04.322Z.txt b/errors/2025-04-04T11-11-04.322Z.txt new file mode 100644 index 0000000..c482483 --- /dev/null +++ b/errors/2025-04-04T11-11-04.322Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:14 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-11-09.331Z.txt b/errors/2025-04-04T11-11-09.331Z.txt new file mode 100644 index 0000000..ac33845 --- /dev/null +++ b/errors/2025-04-04T11-11-09.331Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:14 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-30-46.092Z.txt b/errors/2025-04-04T11-30-46.092Z.txt new file mode 100644 index 0000000..c421050 --- /dev/null +++ b/errors/2025-04-04T11-30-46.092Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:17 + await connection.query( + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-30-51.103Z.txt b/errors/2025-04-04T11-30-51.103Z.txt new file mode 100644 index 0000000..c463bad --- /dev/null +++ b/errors/2025-04-04T11-30-51.103Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:17 + await connection.query( + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-32-18.037Z.txt b/errors/2025-04-04T11-32-18.037Z.txt new file mode 100644 index 0000000..6350c24 --- /dev/null +++ b/errors/2025-04-04T11-32-18.037Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:14:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-32-23.044Z.txt b/errors/2025-04-04T11-32-23.044Z.txt new file mode 100644 index 0000000..c55c37b --- /dev/null +++ b/errors/2025-04-04T11-32-23.044Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:14:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-33-03.559Z.txt b/errors/2025-04-04T11-33-03.559Z.txt new file mode 100644 index 0000000..6350c24 --- /dev/null +++ b/errors/2025-04-04T11-33-03.559Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:14:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-33-08.567Z.txt b/errors/2025-04-04T11-33-08.567Z.txt new file mode 100644 index 0000000..c55c37b --- /dev/null +++ b/errors/2025-04-04T11-33-08.567Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:14:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-33-30.617Z.txt b/errors/2025-04-04T11-33-30.617Z.txt new file mode 100644 index 0000000..8c46252 --- /dev/null +++ b/errors/2025-04-04T11-33-30.617Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:16:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-33-35.625Z.txt b/errors/2025-04-04T11-33-35.625Z.txt new file mode 100644 index 0000000..ffceb62 --- /dev/null +++ b/errors/2025-04-04T11-33-35.625Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:16:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-34-18.418Z.txt b/errors/2025-04-04T11-34-18.418Z.txt new file mode 100644 index 0000000..bc9a2a4 --- /dev/null +++ b/errors/2025-04-04T11-34-18.418Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:17:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-34-23.424Z.txt b/errors/2025-04-04T11-34-23.424Z.txt new file mode 100644 index 0000000..0685306 --- /dev/null +++ b/errors/2025-04-04T11-34-23.424Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:17:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-35-34.158Z.txt b/errors/2025-04-04T11-35-34.158Z.txt new file mode 100644 index 0000000..e637d5e --- /dev/null +++ b/errors/2025-04-04T11-35-34.158Z.txt @@ -0,0 +1,12 @@ +ReferenceError: mysql is not defined +ReferenceError: mysql is not defined + at Object. (/root/oixb/src/commands/Community/testeadd.js:5:18) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-35-39.163Z.txt b/errors/2025-04-04T11-35-39.163Z.txt new file mode 100644 index 0000000..0685306 --- /dev/null +++ b/errors/2025-04-04T11-35-39.163Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:17:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-35-41.151Z.txt b/errors/2025-04-04T11-35-41.151Z.txt new file mode 100644 index 0000000..bc9a2a4 --- /dev/null +++ b/errors/2025-04-04T11-35-41.151Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:17:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-35-46.157Z.txt b/errors/2025-04-04T11-35-46.157Z.txt new file mode 100644 index 0000000..0685306 --- /dev/null +++ b/errors/2025-04-04T11-35-46.157Z.txt @@ -0,0 +1,12 @@ +TypeError: connection.connect is not a function +TypeError: connection.connect is not a function + at Object. (/root/oixb/src/commands/Community/testeadd.js:17:12) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T11-39-32.549Z.txt b/errors/2025-04-04T11-39-32.549Z.txt new file mode 100644 index 0000000..c768401 --- /dev/null +++ b/errors/2025-04-04T11-39-32.549Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:17 +import mysql, { RowDataPacket } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-39-37.559Z.txt b/errors/2025-04-04T11-39-37.559Z.txt new file mode 100644 index 0000000..92213a2 --- /dev/null +++ b/errors/2025-04-04T11-39-37.559Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:17 +import mysql, { RowDataPacket } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-23.725Z.txt b/errors/2025-04-04T11-40-23.725Z.txt new file mode 100644 index 0000000..88bb340 --- /dev/null +++ b/errors/2025-04-04T11-40-23.725Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:6 +import mysql, { ConnectionOptions } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-28.732Z.txt b/errors/2025-04-04T11-40-28.732Z.txt new file mode 100644 index 0000000..1367cb7 --- /dev/null +++ b/errors/2025-04-04T11-40-28.732Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:6 +import mysql, { ConnectionOptions } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-33.109Z.txt b/errors/2025-04-04T11-40-33.109Z.txt new file mode 100644 index 0000000..cbab6fb --- /dev/null +++ b/errors/2025-04-04T11-40-33.109Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:6 +require mysql, { ConnectionOptions } from 'mysql2'; + ^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-38.116Z.txt b/errors/2025-04-04T11-40-38.116Z.txt new file mode 100644 index 0000000..cc9235e --- /dev/null +++ b/errors/2025-04-04T11-40-38.116Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:6 +require mysql, { ConnectionOptions } from 'mysql2'; + ^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-45.166Z.txt b/errors/2025-04-04T11-40-45.166Z.txt new file mode 100644 index 0000000..efdd9c3 --- /dev/null +++ b/errors/2025-04-04T11-40-45.166Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Missing initializer in const declaration +/root/oixb/src/commands/Community/testeadd.js:6 +const access: ConnectionOptions = { + ^^^^^^ + +SyntaxError: Missing initializer in const declaration + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-40-50.170Z.txt b/errors/2025-04-04T11-40-50.170Z.txt new file mode 100644 index 0000000..3ca969d --- /dev/null +++ b/errors/2025-04-04T11-40-50.170Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Missing initializer in const declaration +/root/oixb/src/commands/Community/testeadd.js:6 +const access: ConnectionOptions = { + ^^^^^^ + +SyntaxError: Missing initializer in const declaration + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-41-08.717Z.txt b/errors/2025-04-04T11-41-08.717Z.txt new file mode 100644 index 0000000..2aedc60 --- /dev/null +++ b/errors/2025-04-04T11-41-08.717Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:20 +import mysql, { RowDataPacket } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-41-13.725Z.txt b/errors/2025-04-04T11-41-13.725Z.txt new file mode 100644 index 0000000..d29d123 --- /dev/null +++ b/errors/2025-04-04T11-41-13.725Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Cannot use import statement outside a module +/root/oixb/src/commands/Community/testeadd.js:20 +import mysql, { RowDataPacket } from 'mysql2'; +^^^^^^ + +SyntaxError: Cannot use import statement outside a module + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-45-01.914Z.txt b/errors/2025-04-04T11-45-01.914Z.txt new file mode 100644 index 0000000..651504a --- /dev/null +++ b/errors/2025-04-04T11-45-01.914Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:23 + await interaction.reply("err"); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T11-45-06.919Z.txt b/errors/2025-04-04T11-45-06.919Z.txt new file mode 100644 index 0000000..773c6be --- /dev/null +++ b/errors/2025-04-04T11-45-06.919Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:23 + await interaction.reply("err"); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T11-45-11.748Z.txt b/errors/2025-04-04T11-45-11.748Z.txt new file mode 100644 index 0000000..0980643 --- /dev/null +++ b/errors/2025-04-04T11-45-11.748Z.txt @@ -0,0 +1,12 @@ +ReferenceError: interaction is not defined +ReferenceError: interaction is not defined + at Object. (/root/oixb/src/commands/Community/testeadd.js:23:5) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T11-45-16.759Z.txt b/errors/2025-04-04T11-45-16.759Z.txt new file mode 100644 index 0000000..4464215 --- /dev/null +++ b/errors/2025-04-04T11-45-16.759Z.txt @@ -0,0 +1,12 @@ +ReferenceError: interaction is not defined +ReferenceError: interaction is not defined + at Object. (/root/oixb/src/commands/Community/testeadd.js:23:5) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T12-12-59.299Z.txt b/errors/2025-04-04T12-12-59.299Z.txt new file mode 100644 index 0000000..6b4a910 --- /dev/null +++ b/errors/2025-04-04T12-12-59.299Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:4:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T12-13-38.427Z.txt b/errors/2025-04-04T12-13-38.427Z.txt new file mode 100644 index 0000000..6b4a910 --- /dev/null +++ b/errors/2025-04-04T12-13-38.427Z.txt @@ -0,0 +1,20 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/events/handlers/ready.js +- /root/oixb/src/functions/handlers/handelEvents.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:4:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T12-17-10.968Z.txt b/errors/2025-04-04T12-17-10.968Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-17-10.968Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-17-48.673Z.txt b/errors/2025-04-04T12-17-48.673Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-17-48.673Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-28-56.493Z.txt b/errors/2025-04-04T12-28-56.493Z.txt new file mode 100644 index 0000000..8b69164 --- /dev/null +++ b/errors/2025-04-04T12-28-56.493Z.txt @@ -0,0 +1,22 @@ +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js +Error: Cannot find module '../database/db' +Require stack: +- /root/oixb/src/commands/Community/testeadd.js +- /root/oixb/src/functions/handlers/handleCommands.js +- /root/oixb/admin/dashboard.js +- /root/oixb/src/index.js + at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) + at Module._load (node:internal/modules/cjs/loader:975:27) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/commands/Community/testeadd.js:4:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) \ No newline at end of file diff --git a/errors/2025-04-04T12-35-29.650Z.txt b/errors/2025-04-04T12-35-29.650Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-35-29.650Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-37-52.479Z.txt b/errors/2025-04-04T12-37-52.479Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-37-52.479Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-39-45.736Z.txt b/errors/2025-04-04T12-39-45.736Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-39-45.736Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-43-29.388Z.txt b/errors/2025-04-04T12-43-29.388Z.txt new file mode 100644 index 0000000..15c4332 --- /dev/null +++ b/errors/2025-04-04T12-43-29.388Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/database/db.js:8 + waitForConnections: true, + ^^^^^^^^^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/guildJoinLogs.js:3:20) + at Module._compile (node:internal/modules/cjs/loader:1356:14) \ No newline at end of file diff --git a/errors/2025-04-04T12-43-29.655Z.txt b/errors/2025-04-04T12-43-29.655Z.txt new file mode 100644 index 0000000..25ee8c3 --- /dev/null +++ b/errors/2025-04-04T12-43-29.655Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/database/db.js:8 + waitForConnections: true, + ^^^^^^^^^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at Object. (/root/oixb/src/events/handlers/ready.js:4:14) + at Module._compile (node:internal/modules/cjs/loader:1356:14) \ No newline at end of file diff --git a/errors/2025-04-04T12-44-18.976Z.txt b/errors/2025-04-04T12-44-18.976Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-44-18.976Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-44-59.191Z.txt b/errors/2025-04-04T12-44-59.191Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-44-59.191Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-45-58.818Z.txt b/errors/2025-04-04T12-45-58.818Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-45-58.818Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-46-13.983Z.txt b/errors/2025-04-04T12-46-13.983Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-46-13.983Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-46-46.298Z.txt b/errors/2025-04-04T12-46-46.298Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-46-46.298Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T12-55-14.842Z.txt b/errors/2025-04-04T12-55-14.842Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T12-55-14.842Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-00-57.234Z.txt b/errors/2025-04-04T13-00-57.234Z.txt new file mode 100644 index 0000000..063221a --- /dev/null +++ b/errors/2025-04-04T13-00-57.234Z.txt @@ -0,0 +1,12 @@ +Error: Callback function is not available with promise clients. +Error: Callback function is not available with promise clients. + at PromisePool.query (/root/oixb/node_modules/mysql2/lib/promise/pool.js:38:13) + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:11:14) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) \ No newline at end of file diff --git a/errors/2025-04-04T13-03-22.614Z.txt b/errors/2025-04-04T13-03-22.614Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-03-22.614Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-06-13.010Z.txt b/errors/2025-04-04T13-06-13.010Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-06-13.010Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-07-39.981Z.txt b/errors/2025-04-04T13-07-39.981Z.txt new file mode 100644 index 0000000..92be112 --- /dev/null +++ b/errors/2025-04-04T13-07-39.981Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:31 +está a dar-me este erro + ^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T13-07-44.987Z.txt b/errors/2025-04-04T13-07-44.987Z.txt new file mode 100644 index 0000000..9286fa2 --- /dev/null +++ b/errors/2025-04-04T13-07-44.987Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:31 +está a dar-me este erro + ^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T13-09-42.103Z.txt b/errors/2025-04-04T13-09-42.103Z.txt new file mode 100644 index 0000000..39922db --- /dev/null +++ b/errors/2025-04-04T13-09-42.103Z.txt @@ -0,0 +1,12 @@ +ReferenceError: message is not defined +ReferenceError: message is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:20:11) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-13-37.462Z.txt b/errors/2025-04-04T13-13-37.462Z.txt new file mode 100644 index 0000000..65d58d0 --- /dev/null +++ b/errors/2025-04-04T13-13-37.462Z.txt @@ -0,0 +1,12 @@ +ReferenceError: guildOwnerId is not defined +ReferenceError: guildOwnerId is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:14:21) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-14-31.698Z.txt b/errors/2025-04-04T13-14-31.698Z.txt new file mode 100644 index 0000000..1ae4332 --- /dev/null +++ b/errors/2025-04-04T13-14-31.698Z.txt @@ -0,0 +1,12 @@ +ReferenceError: guild is not defined +ReferenceError: guild is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:14:21) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-15-13.198Z.txt b/errors/2025-04-04T13-15-13.198Z.txt new file mode 100644 index 0000000..1ae4332 --- /dev/null +++ b/errors/2025-04-04T13-15-13.198Z.txt @@ -0,0 +1,12 @@ +ReferenceError: guild is not defined +ReferenceError: guild is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:14:21) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-15-17.851Z.txt b/errors/2025-04-04T13-15-17.851Z.txt new file mode 100644 index 0000000..1ae4332 --- /dev/null +++ b/errors/2025-04-04T13-15-17.851Z.txt @@ -0,0 +1,12 @@ +ReferenceError: guild is not defined +ReferenceError: guild is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:14:21) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-15-29.643Z.txt b/errors/2025-04-04T13-15-29.643Z.txt new file mode 100644 index 0000000..a58807f --- /dev/null +++ b/errors/2025-04-04T13-15-29.643Z.txt @@ -0,0 +1,12 @@ +ReferenceError: guildownerId is not defined +ReferenceError: guildownerId is not defined + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:14:21) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T13-25-37.979Z.txt b/errors/2025-04-04T13-25-37.979Z.txt new file mode 100644 index 0000000..3ab7bac --- /dev/null +++ b/errors/2025-04-04T13-25-37.979Z.txt @@ -0,0 +1,16 @@ +SyntaxError: missing ) after argument list +/root/oixb/src/commands/Community/testeadd.js:31 + } else { + ^ + +SyntaxError: missing ) after argument list + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T13-25-42.988Z.txt b/errors/2025-04-04T13-25-42.988Z.txt new file mode 100644 index 0000000..6c89e01 --- /dev/null +++ b/errors/2025-04-04T13-25-42.988Z.txt @@ -0,0 +1,16 @@ +SyntaxError: missing ) after argument list +/root/oixb/src/commands/Community/testeadd.js:31 + } else { + ^ + +SyntaxError: missing ) after argument list + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T13-34-05.535Z.txt b/errors/2025-04-04T13-34-05.535Z.txt new file mode 100644 index 0000000..38d3b04 --- /dev/null +++ b/errors/2025-04-04T13-34-05.535Z.txt @@ -0,0 +1,16 @@ +SyntaxError: missing ) after argument list +/root/oixb/src/commands/Community/testeadd.js:14 + console.log('asd' guildId); + ^^^^^ + +SyntaxError: missing ) after argument list + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T13-35-21.329Z.txt b/errors/2025-04-04T13-35-21.329Z.txt new file mode 100644 index 0000000..d68fb4d --- /dev/null +++ b/errors/2025-04-04T13-35-21.329Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ')' +/root/oixb/src/commands/Community/testeadd.js:14 + console.log(`asd ${guildId}`. ); + ^ + +SyntaxError: Unexpected token ')' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T13-35-26.334Z.txt b/errors/2025-04-04T13-35-26.334Z.txt new file mode 100644 index 0000000..1c0484c --- /dev/null +++ b/errors/2025-04-04T13-35-26.334Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token ')' +/root/oixb/src/commands/Community/testeadd.js:14 + console.log(`asd ${guildId}`. ); + ^ + +SyntaxError: Unexpected token ')' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T13-39-30.446Z.txt b/errors/2025-04-04T13-39-30.446Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-39-30.446Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-42-46.085Z.txt b/errors/2025-04-04T13-42-46.085Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-42-46.085Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-45-51.600Z.txt b/errors/2025-04-04T13-45-51.600Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-45-51.600Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T13-46-09.897Z.txt b/errors/2025-04-04T13-46-09.897Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T13-46-09.897Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T14-00-06.362Z.txt b/errors/2025-04-04T14-00-06.362Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T14-00-06.362Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T14-05-20.404Z.txt b/errors/2025-04-04T14-05-20.404Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T14-05-20.404Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T14-06-59.912Z.txt b/errors/2025-04-04T14-06-59.912Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T14-06-59.912Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T14-42-50.481Z.txt b/errors/2025-04-04T14-42-50.481Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T14-42-50.481Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T15-49-08.749Z.txt b/errors/2025-04-04T15-49-08.749Z.txt new file mode 100644 index 0000000..0575731 --- /dev/null +++ b/errors/2025-04-04T15-49-08.749Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:8 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T15-49-13.757Z.txt b/errors/2025-04-04T15-49-13.757Z.txt new file mode 100644 index 0000000..39681a0 --- /dev/null +++ b/errors/2025-04-04T15-49-13.757Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:8 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T15-49-25.429Z.txt b/errors/2025-04-04T15-49-25.429Z.txt new file mode 100644 index 0000000..0575731 --- /dev/null +++ b/errors/2025-04-04T15-49-25.429Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:8 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T15-49-30.438Z.txt b/errors/2025-04-04T15-49-30.438Z.txt new file mode 100644 index 0000000..39681a0 --- /dev/null +++ b/errors/2025-04-04T15-49-30.438Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:8 + .addStringOption(option => + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T15-50-14.446Z.txt b/errors/2025-04-04T15-50-14.446Z.txt new file mode 100644 index 0000000..c8fc0df --- /dev/null +++ b/errors/2025-04-04T15-50-14.446Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50035]: Invalid Form Body +3.options[1][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name tipo_sanguinio is already used in these options +DiscordAPIError[50035]: Invalid Form Body +3.options[1][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name tipo_sanguinio is already used in these options + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:150:13) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-04-04T15-55-23.051Z.txt b/errors/2025-04-04T15-55-23.051Z.txt new file mode 100644 index 0000000..8ff1a02 --- /dev/null +++ b/errors/2025-04-04T15-55-23.051Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:31 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T15-55-30.357Z.txt b/errors/2025-04-04T15-55-30.357Z.txt new file mode 100644 index 0000000..c8fc0df --- /dev/null +++ b/errors/2025-04-04T15-55-30.357Z.txt @@ -0,0 +1,11 @@ +DiscordAPIError[50035]: Invalid Form Body +3.options[1][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name tipo_sanguinio is already used in these options +DiscordAPIError[50035]: Invalid Form Body +3.options[1][APPLICATION_COMMAND_OPTIONS_NAME_INVALID]: Option name tipo_sanguinio is already used in these options + at handleErrors (/root/oixb/node_modules/@discordjs/rest/dist/index.js:727:13) + at process.processTicksAndRejections (node:internal/process/task_queues:95:5) + at async SequentialHandler.runRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1128:23) + at async SequentialHandler.queueRequest (/root/oixb/node_modules/@discordjs/rest/dist/index.js:959:14) + at async _REST.request (/root/oixb/node_modules/@discordjs/rest/dist/index.js:1272:22) + at async registerCommands (/root/oixb/src/functions/handlers/handleCommands.js:150:13) + at async Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:231:9) \ No newline at end of file diff --git a/errors/2025-04-04T16-01-36.236Z.txt b/errors/2025-04-04T16-01-36.236Z.txt new file mode 100644 index 0000000..7ae4858 --- /dev/null +++ b/errors/2025-04-04T16-01-36.236Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:15 + const choices = await fetchChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-01-41.246Z.txt b/errors/2025-04-04T16-01-41.246Z.txt new file mode 100644 index 0000000..50a87e3 --- /dev/null +++ b/errors/2025-04-04T16-01-41.246Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:15 + const choices = await fetchChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-01-55.566Z.txt b/errors/2025-04-04T16-01-55.566Z.txt new file mode 100644 index 0000000..479d986 --- /dev/null +++ b/errors/2025-04-04T16-01-55.566Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:12 +async function fetchChoicesFromDB() { + ^^^^^^^^^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-02-00.574Z.txt b/errors/2025-04-04T16-02-00.574Z.txt new file mode 100644 index 0000000..f8eac46 --- /dev/null +++ b/errors/2025-04-04T16-02-00.574Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:12 +async function fetchChoicesFromDB() { + ^^^^^^^^^^^^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-12.153Z.txt b/errors/2025-04-04T16-04-12.153Z.txt new file mode 100644 index 0000000..59a47b8 --- /dev/null +++ b/errors/2025-04-04T16-04-12.153Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:21 + const choices = await fetchChoicesFromDB(); + ^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-17.158Z.txt b/errors/2025-04-04T16-04-17.158Z.txt new file mode 100644 index 0000000..f717c5e --- /dev/null +++ b/errors/2025-04-04T16-04-17.158Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:21 + const choices = await fetchChoicesFromDB(); + ^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-26.974Z.txt b/errors/2025-04-04T16-04-26.974Z.txt new file mode 100644 index 0000000..60cf67a --- /dev/null +++ b/errors/2025-04-04T16-04-26.974Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:13 + const choices = await fetchChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-31.983Z.txt b/errors/2025-04-04T16-04-31.983Z.txt new file mode 100644 index 0000000..e6626e7 --- /dev/null +++ b/errors/2025-04-04T16-04-31.983Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:13 + const choices = await fetchChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-36.225Z.txt b/errors/2025-04-04T16-04-36.225Z.txt new file mode 100644 index 0000000..7482aef --- /dev/null +++ b/errors/2025-04-04T16-04-36.225Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:23 + console.log(`guildownerId: ${choices}`); + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-04-41.232Z.txt b/errors/2025-04-04T16-04-41.232Z.txt new file mode 100644 index 0000000..c006a04 --- /dev/null +++ b/errors/2025-04-04T16-04-41.232Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '.' +/root/oixb/src/commands/Community/testeadd.js:23 + console.log(`guildownerId: ${choices}`); + ^ + +SyntaxError: Unexpected token '.' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-06-00.071Z.txt b/errors/2025-04-04T16-06-00.071Z.txt new file mode 100644 index 0000000..5e29da5 --- /dev/null +++ b/errors/2025-04-04T16-06-00.071Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-06-05.077Z.txt b/errors/2025-04-04T16-06-05.077Z.txt new file mode 100644 index 0000000..5e29da5 --- /dev/null +++ b/errors/2025-04-04T16-06-05.077Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-08-14.027Z.txt b/errors/2025-04-04T16-08-14.027Z.txt new file mode 100644 index 0000000..21c3f59 --- /dev/null +++ b/errors/2025-04-04T16-08-14.027Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:45:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:41:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-08-19.035Z.txt b/errors/2025-04-04T16-08-19.035Z.txt new file mode 100644 index 0000000..21c3f59 --- /dev/null +++ b/errors/2025-04-04T16-08-19.035Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:45:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:41:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-11-18.905Z.txt b/errors/2025-04-04T16-11-18.905Z.txt new file mode 100644 index 0000000..eeb8b1b --- /dev/null +++ b/errors/2025-04-04T16-11-18.905Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:61:17) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T16-16-39.898Z.txt b/errors/2025-04-04T16-16-39.898Z.txt new file mode 100644 index 0000000..f842a09 --- /dev/null +++ b/errors/2025-04-04T16-16-39.898Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:94 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-16-44.901Z.txt b/errors/2025-04-04T16-16-44.901Z.txt new file mode 100644 index 0000000..ec3b7fb --- /dev/null +++ b/errors/2025-04-04T16-16-44.901Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:94 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-16-57.876Z.txt b/errors/2025-04-04T16-16-57.876Z.txt new file mode 100644 index 0000000..f842a09 --- /dev/null +++ b/errors/2025-04-04T16-16-57.876Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:94 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-17-02.885Z.txt b/errors/2025-04-04T16-17-02.885Z.txt new file mode 100644 index 0000000..ec3b7fb --- /dev/null +++ b/errors/2025-04-04T16-17-02.885Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:94 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-17-34.245Z.txt b/errors/2025-04-04T16-17-34.245Z.txt new file mode 100644 index 0000000..21c3f59 --- /dev/null +++ b/errors/2025-04-04T16-17-34.245Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:45:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:41:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-17-39.253Z.txt b/errors/2025-04-04T16-17-39.253Z.txt new file mode 100644 index 0000000..21c3f59 --- /dev/null +++ b/errors/2025-04-04T16-17-39.253Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:45:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:41:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-17-42.651Z.txt b/errors/2025-04-04T16-17-42.651Z.txt new file mode 100644 index 0000000..b41e008 --- /dev/null +++ b/errors/2025-04-04T16-17-42.651Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:34:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:30:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-17-47.656Z.txt b/errors/2025-04-04T16-17-47.656Z.txt new file mode 100644 index 0000000..b41e008 --- /dev/null +++ b/errors/2025-04-04T16-17-47.656Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:34:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:30:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-19-03.968Z.txt b/errors/2025-04-04T16-19-03.968Z.txt new file mode 100644 index 0000000..87a9be4 --- /dev/null +++ b/errors/2025-04-04T16-19-03.968Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-19-08.974Z.txt b/errors/2025-04-04T16-19-08.974Z.txt new file mode 100644 index 0000000..9f30b10 --- /dev/null +++ b/errors/2025-04-04T16-19-08.974Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-19-30.578Z.txt b/errors/2025-04-04T16-19-30.578Z.txt new file mode 100644 index 0000000..87a9be4 --- /dev/null +++ b/errors/2025-04-04T16-19-30.578Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-19-35.582Z.txt b/errors/2025-04-04T16-19-35.582Z.txt new file mode 100644 index 0000000..9f30b10 --- /dev/null +++ b/errors/2025-04-04T16-19-35.582Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-20-28.455Z.txt b/errors/2025-04-04T16-20-28.455Z.txt new file mode 100644 index 0000000..87a9be4 --- /dev/null +++ b/errors/2025-04-04T16-20-28.455Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-20-33.463Z.txt b/errors/2025-04-04T16-20-33.463Z.txt new file mode 100644 index 0000000..9f30b10 --- /dev/null +++ b/errors/2025-04-04T16-20-33.463Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected end of input +/root/oixb/src/commands/Community/testeadd.js:95 + + + +SyntaxError: Unexpected end of input + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-21-41.405Z.txt b/errors/2025-04-04T16-21-41.405Z.txt new file mode 100644 index 0000000..8ff42dc --- /dev/null +++ b/errors/2025-04-04T16-21-41.405Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 + const [rows] = await conn.execute('SELECT name,cname FROM products'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-21-46.410Z.txt b/errors/2025-04-04T16-21-46.410Z.txt new file mode 100644 index 0000000..682c263 --- /dev/null +++ b/errors/2025-04-04T16-21-46.410Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 + const [rows] = await conn.execute('SELECT name,cname FROM products'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-22-47.796Z.txt b/errors/2025-04-04T16-22-47.796Z.txt new file mode 100644 index 0000000..8ff42dc --- /dev/null +++ b/errors/2025-04-04T16-22-47.796Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 + const [rows] = await conn.execute('SELECT name,cname FROM products'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-22-52.801Z.txt b/errors/2025-04-04T16-22-52.801Z.txt new file mode 100644 index 0000000..682c263 --- /dev/null +++ b/errors/2025-04-04T16-22-52.801Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 + const [rows] = await conn.execute('SELECT name,cname FROM products'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-02.125Z.txt b/errors/2025-04-04T16-23-02.125Z.txt new file mode 100644 index 0000000..ad23186 --- /dev/null +++ b/errors/2025-04-04T16-23-02.125Z.txt @@ -0,0 +1,12 @@ +TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) +TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) + at buildCommand (/root/oixb/src/commands/Community/testeadd.js:5:20) + at Object. (/root/oixb/src/commands/Community/testeadd.js:12:17) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-07.130Z.txt b/errors/2025-04-04T16-23-07.130Z.txt new file mode 100644 index 0000000..9497300 --- /dev/null +++ b/errors/2025-04-04T16-23-07.130Z.txt @@ -0,0 +1,12 @@ +TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) +TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) + at buildCommand (/root/oixb/src/commands/Community/testeadd.js:5:20) + at Object. (/root/oixb/src/commands/Community/testeadd.js:12:17) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-17.527Z.txt b/errors/2025-04-04T16-23-17.527Z.txt new file mode 100644 index 0000000..b4863c7 --- /dev/null +++ b/errors/2025-04-04T16-23-17.527Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:4 +await function buildCommand() { +^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-22.535Z.txt b/errors/2025-04-04T16-23-22.535Z.txt new file mode 100644 index 0000000..ca45c66 --- /dev/null +++ b/errors/2025-04-04T16-23-22.535Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:4 +await function buildCommand() { +^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-45.742Z.txt b/errors/2025-04-04T16-23-45.742Z.txt new file mode 100644 index 0000000..12b2d94 --- /dev/null +++ b/errors/2025-04-04T16-23-45.742Z.txt @@ -0,0 +1,12 @@ +ReferenceError: dynamicChoices is not defined +ReferenceError: dynamicChoices is not defined + at /root/oixb/src/commands/Community/testeadd.js:43:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-50.752Z.txt b/errors/2025-04-04T16-23-50.752Z.txt new file mode 100644 index 0000000..12b2d94 --- /dev/null +++ b/errors/2025-04-04T16-23-50.752Z.txt @@ -0,0 +1,12 @@ +ReferenceError: dynamicChoices is not defined +ReferenceError: dynamicChoices is not defined + at /root/oixb/src/commands/Community/testeadd.js:43:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-23-57.868Z.txt b/errors/2025-04-04T16-23-57.868Z.txt new file mode 100644 index 0000000..1b20572 --- /dev/null +++ b/errors/2025-04-04T16-23-57.868Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-24-02.878Z.txt b/errors/2025-04-04T16-24-02.878Z.txt new file mode 100644 index 0000000..1b20572 --- /dev/null +++ b/errors/2025-04-04T16-24-02.878Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-24-17.122Z.txt b/errors/2025-04-04T16-24-17.122Z.txt new file mode 100644 index 0000000..94550a7 --- /dev/null +++ b/errors/2025-04-04T16-24-17.122Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-24-22.129Z.txt b/errors/2025-04-04T16-24-22.129Z.txt new file mode 100644 index 0000000..94550a7 --- /dev/null +++ b/errors/2025-04-04T16-24-22.129Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-26-11.802Z.txt b/errors/2025-04-04T16-26-11.802Z.txt new file mode 100644 index 0000000..94550a7 --- /dev/null +++ b/errors/2025-04-04T16-26-11.802Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-26-16.807Z.txt b/errors/2025-04-04T16-26-16.807Z.txt new file mode 100644 index 0000000..94550a7 --- /dev/null +++ b/errors/2025-04-04T16-26-16.807Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-26-19.518Z.txt b/errors/2025-04-04T16-26-19.518Z.txt new file mode 100644 index 0000000..1b20572 --- /dev/null +++ b/errors/2025-04-04T16-26-19.518Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-26-24.526Z.txt b/errors/2025-04-04T16-26-24.526Z.txt new file mode 100644 index 0000000..1b20572 --- /dev/null +++ b/errors/2025-04-04T16-26-24.526Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:43:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-27-36.724Z.txt b/errors/2025-04-04T16-27-36.724Z.txt new file mode 100644 index 0000000..4973338 --- /dev/null +++ b/errors/2025-04-04T16-27-36.724Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-27-36.725Z.txt b/errors/2025-04-04T16-27-36.725Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T16-27-36.725Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T16-27-41.730Z.txt b/errors/2025-04-04T16-27-41.730Z.txt new file mode 100644 index 0000000..4973338 --- /dev/null +++ b/errors/2025-04-04T16-27-41.730Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-27-41.732Z.txt b/errors/2025-04-04T16-27-41.732Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T16-27-41.732Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T16-27-46.020Z.txt b/errors/2025-04-04T16-27-46.020Z.txt new file mode 100644 index 0000000..4973338 --- /dev/null +++ b/errors/2025-04-04T16-27-46.020Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-27-51.030Z.txt b/errors/2025-04-04T16-27-51.030Z.txt new file mode 100644 index 0000000..4973338 --- /dev/null +++ b/errors/2025-04-04T16-27-51.030Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-27-59.556Z.txt b/errors/2025-04-04T16-27-59.556Z.txt new file mode 100644 index 0000000..5e29da5 --- /dev/null +++ b/errors/2025-04-04T16-27-59.556Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-28-04.567Z.txt b/errors/2025-04-04T16-28-04.567Z.txt new file mode 100644 index 0000000..5e29da5 --- /dev/null +++ b/errors/2025-04-04T16-28-04.567Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-28-40.347Z.txt b/errors/2025-04-04T16-28-40.347Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T16-28-40.347Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T16-28-40.450Z.txt b/errors/2025-04-04T16-28-40.450Z.txt new file mode 100644 index 0000000..5e29da5 --- /dev/null +++ b/errors/2025-04-04T16-28-40.450Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:44:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-21.302Z.txt b/errors/2025-04-04T16-29-21.302Z.txt new file mode 100644 index 0000000..8f75232 --- /dev/null +++ b/errors/2025-04-04T16-29-21.302Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:44:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-26.313Z.txt b/errors/2025-04-04T16-29-26.313Z.txt new file mode 100644 index 0000000..8f75232 --- /dev/null +++ b/errors/2025-04-04T16-29-26.313Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:44:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:40:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-28.397Z.txt b/errors/2025-04-04T16-29-28.397Z.txt new file mode 100644 index 0000000..115d928 --- /dev/null +++ b/errors/2025-04-04T16-29-28.397Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:21 + const choices = buildCommand(); + ^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-33.404Z.txt b/errors/2025-04-04T16-29-33.404Z.txt new file mode 100644 index 0000000..fb88f91 --- /dev/null +++ b/errors/2025-04-04T16-29-33.404Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected identifier +/root/oixb/src/commands/Community/testeadd.js:21 + const choices = buildCommand(); + ^^^^^^^ + +SyntaxError: Unexpected identifier + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-53.375Z.txt b/errors/2025-04-04T16-29-53.375Z.txt new file mode 100644 index 0000000..2f88758 --- /dev/null +++ b/errors/2025-04-04T16-29-53.375Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'const' +/root/oixb/src/commands/Community/testeadd.js:27 + const choices = buildCommand(); + ^^^^^ + +SyntaxError: Unexpected token 'const' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-29-58.379Z.txt b/errors/2025-04-04T16-29-58.379Z.txt new file mode 100644 index 0000000..1081207 --- /dev/null +++ b/errors/2025-04-04T16-29-58.379Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'const' +/root/oixb/src/commands/Community/testeadd.js:27 + const choices = buildCommand(); + ^^^^^ + +SyntaxError: Unexpected token 'const' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-30-02.416Z.txt b/errors/2025-04-04T16-30-02.416Z.txt new file mode 100644 index 0000000..99203ae --- /dev/null +++ b/errors/2025-04-04T16-30-02.416Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:49:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:45:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-30-07.426Z.txt b/errors/2025-04-04T16-30-07.426Z.txt new file mode 100644 index 0000000..99203ae --- /dev/null +++ b/errors/2025-04-04T16-30-07.426Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:49:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:45:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-31-43.200Z.txt b/errors/2025-04-04T16-31-43.200Z.txt new file mode 100644 index 0000000..5850976 --- /dev/null +++ b/errors/2025-04-04T16-31-43.200Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:47 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-31-48.209Z.txt b/errors/2025-04-04T16-31-48.209Z.txt new file mode 100644 index 0000000..db106ef --- /dev/null +++ b/errors/2025-04-04T16-31-48.209Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token 'async' +/root/oixb/src/commands/Community/testeadd.js:47 + async execute(interaction, client) { + ^^^^^ + +SyntaxError: Unexpected token 'async' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-32-15.719Z.txt b/errors/2025-04-04T16-32-15.719Z.txt new file mode 100644 index 0000000..dc2bbce --- /dev/null +++ b/errors/2025-04-04T16-32-15.719Z.txt @@ -0,0 +1,12 @@ +ReferenceError: buildCommand is not defined +ReferenceError: buildCommand is not defined + at Object. (/root/oixb/src/commands/Community/testeadd.js:3:17) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) + at FSWatcher.emit (node:events:517:28) \ No newline at end of file diff --git a/errors/2025-04-04T16-32-20.723Z.txt b/errors/2025-04-04T16-32-20.723Z.txt new file mode 100644 index 0000000..fcfcdc8 --- /dev/null +++ b/errors/2025-04-04T16-32-20.723Z.txt @@ -0,0 +1,12 @@ +ReferenceError: buildCommand is not defined +ReferenceError: buildCommand is not defined + at Object. (/root/oixb/src/commands/Community/testeadd.js:3:17) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) + at Timeout.registerDebouncedCommands [as _onTimeout] (/root/oixb/src/functions/handlers/handleCommands.js:230:57) \ No newline at end of file diff --git a/errors/2025-04-04T16-33-26.432Z.txt b/errors/2025-04-04T16-33-26.432Z.txt new file mode 100644 index 0000000..52bbdf0 --- /dev/null +++ b/errors/2025-04-04T16-33-26.432Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at Object.execute (/root/oixb/src/commands/Community/testeadd.js:53:17) + at Object.execute (/root/oixb/src/events/handlers/interactionCreate.js:132:27) + at Client. (/root/oixb/src/functions/handlers/handelEvents.js:71:62) + at Client.emit (node:events:517:28) + at InteractionCreateAction.handle (/root/oixb/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12) + at module.exports [as INTERACTION_CREATE] (/root/oixb/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36) + at WebSocketManager.handlePacket (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:348:31) + at WebSocketManager. (/root/oixb/node_modules/discord.js/src/client/websocket/WebSocketManager.js:232:12) + at WebSocketManager.emit (/root/oixb/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:287:31) + at WebSocketShard. (/root/oixb/node_modules/@discordjs/ws/dist/index.js:1190:51) \ No newline at end of file diff --git a/errors/2025-04-04T16-34-08.925Z.txt b/errors/2025-04-04T16-34-08.925Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T16-34-08.925Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T16-34-09.033Z.txt b/errors/2025-04-04T16-34-09.033Z.txt new file mode 100644 index 0000000..3decb89 --- /dev/null +++ b/errors/2025-04-04T16-34-09.033Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-34-17.338Z.txt b/errors/2025-04-04T16-34-17.338Z.txt new file mode 100644 index 0000000..1d27d3e --- /dev/null +++ b/errors/2025-04-04T16-34-17.338Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-34-22.347Z.txt b/errors/2025-04-04T16-34-22.347Z.txt new file mode 100644 index 0000000..1d27d3e --- /dev/null +++ b/errors/2025-04-04T16-34-22.347Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-35-13.688Z.txt b/errors/2025-04-04T16-35-13.688Z.txt new file mode 100644 index 0000000..1d27d3e --- /dev/null +++ b/errors/2025-04-04T16-35-13.688Z.txt @@ -0,0 +1,12 @@ +Error: Received one or more errors +Error: Received one or more errors + at _ArrayValidator.handle (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:1254:70) + at _ArrayValidator.parse (/root/oixb/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90) + at MixedClass.addChoices (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2118:22) + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) \ No newline at end of file diff --git a/errors/2025-04-04T16-35-20.707Z.txt b/errors/2025-04-04T16-35-20.707Z.txt new file mode 100644 index 0000000..3decb89 --- /dev/null +++ b/errors/2025-04-04T16-35-20.707Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-35-25.713Z.txt b/errors/2025-04-04T16-35-25.713Z.txt new file mode 100644 index 0000000..3decb89 --- /dev/null +++ b/errors/2025-04-04T16-35-25.713Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:47:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:43:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-41-43.409Z.txt b/errors/2025-04-04T16-41-43.409Z.txt new file mode 100644 index 0000000..7e44134 --- /dev/null +++ b/errors/2025-04-04T16-41-43.409Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:46:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-41-48.418Z.txt b/errors/2025-04-04T16-41-48.418Z.txt new file mode 100644 index 0000000..7e44134 --- /dev/null +++ b/errors/2025-04-04T16-41-48.418Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:46:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-41-55.838Z.txt b/errors/2025-04-04T16-41-55.838Z.txt new file mode 100644 index 0000000..7e44134 --- /dev/null +++ b/errors/2025-04-04T16-41-55.838Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:46:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-42-00.846Z.txt b/errors/2025-04-04T16-42-00.846Z.txt new file mode 100644 index 0000000..7e44134 --- /dev/null +++ b/errors/2025-04-04T16-42-00.846Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:46:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-42-07.933Z.txt b/errors/2025-04-04T16-42-07.933Z.txt new file mode 100644 index 0000000..c2c0874 --- /dev/null +++ b/errors/2025-04-04T16-42-07.933Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:38:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:34:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-42-12.941Z.txt b/errors/2025-04-04T16-42-12.941Z.txt new file mode 100644 index 0000000..c2c0874 --- /dev/null +++ b/errors/2025-04-04T16-42-12.941Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:38:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:34:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-02.528Z.txt b/errors/2025-04-04T16-47-02.528Z.txt new file mode 100644 index 0000000..ee08404 --- /dev/null +++ b/errors/2025-04-04T16-47-02.528Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 +const [rows] = await conn.execute('SELECT name, value FROM TipoSanguinio'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-07.536Z.txt b/errors/2025-04-04T16-47-07.536Z.txt new file mode 100644 index 0000000..2078ae8 --- /dev/null +++ b/errors/2025-04-04T16-47-07.536Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/testeadd.js:5 +const [rows] = await conn.execute('SELECT name, value FROM TipoSanguinio'); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-20.592Z.txt b/errors/2025-04-04T16-47-20.592Z.txt new file mode 100644 index 0000000..afe1406 --- /dev/null +++ b/errors/2025-04-04T16-47-20.592Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Unexpected token '[' +/root/oixb/src/commands/Community/testeadd.js:34 + const [rows] = await conn.execute('SELECT name, value FROM TipoSanguinio'); + ^ + +SyntaxError: Unexpected token '[' + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-25.596Z.txt b/errors/2025-04-04T16-47-25.596Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-47-25.596Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-26.503Z.txt b/errors/2025-04-04T16-47-26.503Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-47-26.503Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-47-31.510Z.txt b/errors/2025-04-04T16-47-31.510Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-47-31.510Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-50-23.028Z.txt b/errors/2025-04-04T16-50-23.028Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-50-23.028Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-50-40.645Z.txt b/errors/2025-04-04T16-50-40.645Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-50-40.645Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-51-39.884Z.txt b/errors/2025-04-04T16-51-39.884Z.txt new file mode 100644 index 0000000..d038a3f --- /dev/null +++ b/errors/2025-04-04T16-51-39.884Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choices is not defined +ReferenceError: choices is not defined + at /root/oixb/src/commands/Community/testeadd.js:25:29 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:21:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T16-57-17.490Z.txt b/errors/2025-04-04T16-57-17.490Z.txt new file mode 100644 index 0000000..837e2b2 --- /dev/null +++ b/errors/2025-04-04T16-57-17.490Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-57-22.493Z.txt b/errors/2025-04-04T16-57-22.493Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T16-57-22.493Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T16-58-03.563Z.txt b/errors/2025-04-04T16-58-03.563Z.txt new file mode 100644 index 0000000..837e2b2 --- /dev/null +++ b/errors/2025-04-04T16-58-03.563Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T16-58-08.565Z.txt b/errors/2025-04-04T16-58-08.565Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T16-58-08.565Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-27.666Z.txt b/errors/2025-04-04T17-02-27.666Z.txt new file mode 100644 index 0000000..6e93697 --- /dev/null +++ b/errors/2025-04-04T17-02-27.666Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Identifier 'choices' has already been declared +/root/oixb/src/commands/Community/testeadd.js:20 +const choices = getChoicesFromDatabase(); + ^ + +SyntaxError: Identifier 'choices' has already been declared + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-32.671Z.txt b/errors/2025-04-04T17-02-32.671Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-02-32.671Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-32.677Z.txt b/errors/2025-04-04T17-02-32.677Z.txt new file mode 100644 index 0000000..ae4f667 --- /dev/null +++ b/errors/2025-04-04T17-02-32.677Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Identifier 'choices' has already been declared +/root/oixb/src/commands/Community/testeadd.js:20 +const choices = getChoicesFromDatabase(); + ^ + +SyntaxError: Identifier 'choices' has already been declared + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-54.060Z.txt b/errors/2025-04-04T17-02-54.060Z.txt new file mode 100644 index 0000000..921a37d --- /dev/null +++ b/errors/2025-04-04T17-02-54.060Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Identifier 'choices' has already been declared +/root/oixb/src/commands/Community/testeadd.js:18 +const choices = getChoicesFromDatabase(); + ^ + +SyntaxError: Identifier 'choices' has already been declared + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at FSWatcher. (/root/oixb/src/functions/handlers/handleCommands.js:263:13) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-59.063Z.txt b/errors/2025-04-04T17-02-59.063Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-02-59.063Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-02-59.065Z.txt b/errors/2025-04-04T17-02-59.065Z.txt new file mode 100644 index 0000000..53e2840 --- /dev/null +++ b/errors/2025-04-04T17-02-59.065Z.txt @@ -0,0 +1,16 @@ +SyntaxError: Identifier 'choices' has already been declared +/root/oixb/src/commands/Community/testeadd.js:18 +const choices = getChoicesFromDatabase(); + ^ + +SyntaxError: Identifier 'choices' has already been declared + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-03-11.367Z.txt b/errors/2025-04-04T17-03-11.367Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-03-11.367Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-03-16.644Z.txt b/errors/2025-04-04T17-03-16.644Z.txt new file mode 100644 index 0000000..e5d3fe4 --- /dev/null +++ b/errors/2025-04-04T17-03-16.644Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:51:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:47:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T17-03-21.646Z.txt b/errors/2025-04-04T17-03-21.646Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-03-21.646Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-03-21.649Z.txt b/errors/2025-04-04T17-03-21.649Z.txt new file mode 100644 index 0000000..e5d3fe4 --- /dev/null +++ b/errors/2025-04-04T17-03-21.649Z.txt @@ -0,0 +1,12 @@ +TypeError: Found non-callable @@iterator +TypeError: Found non-callable @@iterator + at /root/oixb/src/commands/Community/testeadd.js:51:18 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:47:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T17-07-35.880Z.txt b/errors/2025-04-04T17-07-35.880Z.txt new file mode 100644 index 0000000..a2eb2b0 --- /dev/null +++ b/errors/2025-04-04T17-07-35.880Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choicess is not defined +ReferenceError: choicess is not defined + at /root/oixb/src/commands/Community/testeadd.js:43:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:39:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T17-07-40.882Z.txt b/errors/2025-04-04T17-07-40.882Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-07-40.882Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-07-46.477Z.txt b/errors/2025-04-04T17-07-46.477Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-07-46.477Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-09-27.231Z.txt b/errors/2025-04-04T17-09-27.231Z.txt new file mode 100644 index 0000000..616136f --- /dev/null +++ b/errors/2025-04-04T17-09-27.231Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choicess is not defined +ReferenceError: choicess is not defined + at /root/oixb/src/commands/Community/testeadd.js:46:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T17-09-27.232Z.txt b/errors/2025-04-04T17-09-27.232Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T17-09-27.232Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T17-09-30.345Z.txt b/errors/2025-04-04T17-09-30.345Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T17-09-30.345Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/errors/2025-04-04T17-09-35.347Z.txt b/errors/2025-04-04T17-09-35.347Z.txt new file mode 100644 index 0000000..6a49da8 --- /dev/null +++ b/errors/2025-04-04T17-09-35.347Z.txt @@ -0,0 +1,16 @@ +SyntaxError: await is only valid in async functions and the top level bodies of modules +/root/oixb/src/commands/Community/comandoAdd.js:13 +const dynamicChoices = await getChoicesFromDB(); + ^^^^^ + +SyntaxError: await is only valid in async functions and the top level bodies of modules + at internalCompileFunction (node:internal/vm:73:18) + at wrapSafe (node:internal/modules/cjs/loader:1274:20) + at Module._compile (node:internal/modules/cjs/loader:1320:27) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) + at loadCommand (/root/oixb/src/functions/handlers/handleCommands.js:77:25) + at loadCommands (/root/oixb/src/functions/handlers/handleCommands.js:102:25) \ No newline at end of file diff --git a/errors/2025-04-04T17-09-35.350Z.txt b/errors/2025-04-04T17-09-35.350Z.txt new file mode 100644 index 0000000..616136f --- /dev/null +++ b/errors/2025-04-04T17-09-35.350Z.txt @@ -0,0 +1,12 @@ +ReferenceError: choicess is not defined +ReferenceError: choicess is not defined + at /root/oixb/src/commands/Community/testeadd.js:46:32 + at MixedClass._sharedAddOptionMethod (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2439:50) + at MixedClass.addStringOption (/root/oixb/node_modules/@discordjs/builders/dist/index.js:2411:17) + at Object. (/root/oixb/src/commands/Community/testeadd.js:42:10) + at Module._compile (node:internal/modules/cjs/loader:1356:14) + at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) + at Module.load (node:internal/modules/cjs/loader:1197:32) + at Module._load (node:internal/modules/cjs/loader:1013:12) + at Module.require (node:internal/modules/cjs/loader:1225:19) + at require (node:internal/modules/helpers:177:18) \ No newline at end of file diff --git a/errors/2025-04-04T17-09-35.353Z.txt b/errors/2025-04-04T17-09-35.353Z.txt new file mode 100644 index 0000000..e7b5e45 --- /dev/null +++ b/errors/2025-04-04T17-09-35.353Z.txt @@ -0,0 +1,2 @@ +undefined: undefined +undefined \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 100644 index 0000000..20b1ffe --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var mime = require('./mime.js'); +var file = process.argv[2]; +var type = mime.lookup(file); + +process.stdout.write(type + '\n'); + diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 100644 index 0000000..d95de15 --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..463d4fa --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,1733 @@ +{ + "name": "oixb", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@clack/core": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.1.tgz", + "integrity": "sha512-Pxhij4UXg8KSr7rPek6Zowm+5M22rbd2g1nfojHJkxp5YkFqiZ2+YLEM/XGVIzvGOcM0nqjIFxrpDwWRZYWYjA==", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.10.0.tgz", + "integrity": "sha512-H3rCl6CwW1NdQt9rE3n373t7o5cthPv7yUoxF2ytZvyvlJv89C5RYMJu83Hed8ODgys5vpBU0GKxIRG83jd8NQ==", + "dependencies": { + "@clack/core": "0.4.1", + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@discordjs/builders": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.10.1.tgz", + "integrity": "sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==", + "dependencies": { + "@discordjs/formatters": "^0.6.0", + "@discordjs/util": "^1.1.1", + "@sapphire/shapeshift": "^4.0.0", + "discord-api-types": "^0.37.119", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.4", + "tslib": "^2.6.3" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/collection": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", + "engines": { + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/formatters": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.0.tgz", + "integrity": "sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==", + "dependencies": { + "discord-api-types": "^0.37.114" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/rest": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.3.tgz", + "integrity": "sha512-+SO4RKvWsM+y8uFHgYQrcTl/3+cY02uQOH7/7bKbVZsTfrfpoE62o5p+mmV+s7FVhTX82/kQUGGbu4YlV60RtA==", + "dependencies": { + "@discordjs/collection": "^2.1.1", + "@discordjs/util": "^1.1.1", + "@sapphire/async-queue": "^1.5.3", + "@sapphire/snowflake": "^3.5.3", + "@vladfrangu/async_event_emitter": "^2.4.6", + "discord-api-types": "^0.37.119", + "magic-bytes.js": "^1.10.0", + "tslib": "^2.6.3", + "undici": "6.21.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", + "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/ws": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.1.tgz", + "integrity": "sha512-PBvenhZG56a6tMWF/f4P6f4GxZKJTBG95n7aiGSPTnodmz4N5g60t79rSIAq7ywMbv8A4jFtexMruH+oe51aQQ==", + "dependencies": { + "@discordjs/collection": "^2.1.0", + "@discordjs/rest": "^2.4.3", + "@discordjs/util": "^1.1.0", + "@sapphire/async-queue": "^1.5.2", + "@types/ws": "^8.5.10", + "@vladfrangu/async_event_emitter": "^2.2.4", + "discord-api-types": "^0.37.119", + "tslib": "^2.6.2", + "ws": "^8.17.0" + }, + "engines": { + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.0.tgz", + "integrity": "sha512-+ywrb0AqkfaYuhHs6LxKWgqbh3I72EpEgESCw37o+9qPx9WTCkgDm2B+eMrwehGtHBWHFU4GXvnSCNiFhhausg==", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@sapphire/async-queue": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz", + "integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@sapphire/shapeshift": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz", + "integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v16" + } + }, + "node_modules/@sapphire/snowflake": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", + "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@types/node": { + "version": "22.14.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.0.tgz", + "integrity": "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "node_modules/@types/whatwg-url": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", + "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@vladfrangu/async_event_emitter": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz", + "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==", + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bson": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.10.3.tgz", + "integrity": "sha512-MTxGsqgYTwfshYWTRdmZRC+M7FnG1b4y7RO7p2k3X24Wq0yv1m77Wsj0BzlPzd/IowgESfsruQCUToa7vbOpPQ==", + "engines": { + "node": ">=16.20.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "engines": { + "node": ">=18" + } + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/discord-api-types": { + "version": "0.37.119", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.119.tgz", + "integrity": "sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==" + }, + "node_modules/discord.js": { + "version": "14.18.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.18.0.tgz", + "integrity": "sha512-SvU5kVUvwunQhN2/+0t55QW/1EHfB1lp0TtLZUSXVHDmyHTrdOj5LRKdR0zLcybaA15F+NtdWuWmGOX9lE+CAw==", + "dependencies": { + "@discordjs/builders": "^1.10.1", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.6.0", + "@discordjs/rest": "^2.4.3", + "@discordjs/util": "^1.1.1", + "@discordjs/ws": "^1.2.1", + "@sapphire/snowflake": "3.5.3", + "discord-api-types": "^0.37.119", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "^2.6.3", + "undici": "6.21.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/kareem": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz", + "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, + "node_modules/long": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/lru.min": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.2.tgz", + "integrity": "sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/magic-bytes.js": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", + "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mongodb": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.15.0.tgz", + "integrity": "sha512-ifBhQ0rRzHDzqp9jAQP6OwHSH7dbYIQjD3SbJs9YYk9AikKEettW/9s/tbSFDTpXcRbF+u1aLrhHxDFaYtZpFQ==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.9", + "bson": "^6.10.3", + "mongodb-connection-string-url": "^3.0.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz", + "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^14.1.0 || ^13.0.0" + } + }, + "node_modules/mongoose": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.13.0.tgz", + "integrity": "sha512-e/iYV1mPeOkg+SWAMHzt3t42/EZyER3OB1H2pjP9C3vQ+Qb5DMeV9Kb+YCUycKgScA3fbwL7dKG4EpinGlg21g==", + "dependencies": { + "bson": "^6.10.3", + "kareem": "2.6.3", + "mongodb": "~6.15.0", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "17.1.3" + }, + "engines": { + "node": ">=16.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mongoose/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/mquery/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mquery/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/multer": { + "version": "1.4.5-lts.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.2.tgz", + "integrity": "sha512-VzGiVigcG9zUAoCNU+xShztrlr1auZOlurXynNvO9GiWD1/mTBbUljOKY+qMeazBqXgRnjzeEgJI/wyjJUHg9A==", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/mysql2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.14.0.tgz", + "integrity": "sha512-8eMhmG6gt/hRkU1G+8KlGOdQi2w+CgtNoD1ksXZq9gQfkfDsX4LHaBwTe1SY0Imx//t2iZA03DFnyYKPinxSRw==", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-interval-async": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/set-interval-async/-/set-interval-async-3.0.3.tgz", + "integrity": "sha512-o4DyBv6mko+A9cH3QKek4SAAT5UyJRkfdTi6JHii6ZCKUYFun8SwgBmQrOXd158JOwBQzA+BnO8BvT64xuCaSw==", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sift": { + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz", + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.0.tgz", + "integrity": "sha512-IUWnUK7ADYR5Sl1fZlO1INDUhVhatWl7BtJWsIhwJ0UAK7ilzzIa8uIqOO/aYVWHZPJkKbEL+362wrzoeRF7bw==", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "node_modules/undici": { + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", + "engines": { + "node": ">=18.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + } + } +} diff --git a/node_modules/@clack/core/CHANGELOG.md b/node_modules/@clack/core/CHANGELOG.md new file mode 100644 index 0000000..178b1f5 --- /dev/null +++ b/node_modules/@clack/core/CHANGELOG.md @@ -0,0 +1,249 @@ +# @clack/core + +## 0.4.1 + +### Patch Changes + +- 8093f3c: Adds `Error` support to the `validate` function +- e5ba09a: Fixes a cursor display bug in terminals that do not support the "hidden" escape sequence. See [Issue #127](https://github.com/bombshell-dev/clack/issues/127). +- 8cba8e3: Fixes a rendering bug with cursor positions for `TextPrompt` + +## 0.4.0 + +### Minor Changes + +- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings. + + `updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`). + + ```ts + import { updateSettings } from "@clack/core"; + + // Support custom keybindings + updateSettings({ + aliases: { + w: "up", + a: "left", + s: "down", + d: "right", + }, + }); + ``` + +> [!WARNING] +> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings. + +- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller). + +- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`). + + | alias | action | + | ----- | ------ | + | `k` | up | + | `l` | right | + | `j` | down | + | `h` | left | + | `esc` | cancel | + +### Patch Changes + +- 51e12bc: Improves types for events and interaction states. + +## 0.3.5 + +### Patch Changes + +- 4845f4f: Fixes a bug which kept the terminal cursor hidden after a prompt is cancelled +- d7b2fb9: Adds missing `LICENSE` file. Since the `package.json` file has always included `"license": "MIT"`, please consider this a licensing clarification rather than a licensing change. + +## 0.3.4 + +### Patch Changes + +- a04e418: fix(@clack/core): keyboard input not working after await in spinner +- 4f6fcf5: feat(@clack/core): allow tab completion for placeholders + +## 0.3.3 + +### Patch Changes + +- cd79076: fix: restore raw mode on unblock + +## 0.3.2 + +### Patch Changes + +- c96eda5: Enable hard line-wrapping behavior for long words without spaces + +## 0.3.1 + +### Patch Changes + +- 58a1df1: Fix line duplication bug by automatically wrapping prompts to `process.stdout.columns` + +## 0.3.0 + +### Minor Changes + +- 8a4a12f: Add `GroupMultiSelect` prompt + +### Patch Changes + +- 8a4a12f: add `groupMultiselect` prompt + +## 0.2.1 + +### Patch Changes + +- ec812b6: fix `readline` hang on Windows + +## 0.2.0 + +### Minor Changes + +- d74dd05: Adds a `selectKey` prompt type +- 54c1bc3: **Breaking Change** `multiselect` has renamed `initialValue` to `initialValues` + +## 0.1.9 + +### Patch Changes + +- 1251132: Multiselect: return `Value[]` instead of `Option[]`. +- 8994382: Add a password prompt to `@clack/prompts` + +## 0.1.8 + +### Patch Changes + +- d96071c: Don't mutate `initialValue` in `multiselect`, fix parameter type for `validate()`. + + Credits to @banjo for the bug report and initial PR! + +## 0.1.7 + +### Patch Changes + +- 6d9e675: Add support for neovim cursor motion (`hjkl`) + + Thanks [@esau-morais](https://github.com/esau-morais) for the assist! + +## 0.1.6 + +### Patch Changes + +- 7fb5375: Adds a new `defaultValue` option to the text prompt, removes automatic usage of the placeholder value. + +## 0.1.5 + +### Patch Changes + +- de1314e: Support `required` option for multi-select + +## 0.1.4 + +### Patch Changes + +- ca77da1: Fix multiselect initial value logic +- 8aed606: Fix `MaxListenersExceededWarning` by detaching `stdin` listeners on close + +## 0.1.3 + +### Patch Changes + +- a99c458: Support `initialValue` option for text prompt + +## 0.1.2 + +### Patch Changes + +- Allow isCancel to type guard any unknown value +- 7dcad8f: Allow placeholder to be passed to TextPrompt +- 2242f13: Fix multiselect returning undefined +- b1341d6: Improved placeholder handling + +## 0.1.1 + +### Patch Changes + +- 4be7dbf: Ensure raw mode is unset on submit +- b480679: Preserve value if validation fails + +## 0.1.0 + +### Minor Changes + +- 7015ec9: Create new prompt: multi-select + +## 0.0.12 + +### Patch Changes + +- 9d371c3: Fix rendering bug when using y/n to confirm + +## 0.0.11 + +### Patch Changes + +- 441d5b7: fix select return undefined +- d20ef2a: Update keywords, URLs +- fe13c2f: fix cursor missing after submit + +## 0.0.10 + +### Patch Changes + +- a0cb382: Add `main` entrypoint + +## 0.0.9 + +### Patch Changes + +- Fix node@16 issue (cannot read "createInterface" of undefined) + +## 0.0.8 + +### Patch Changes + +- a4b5e13: Bug fixes, exposes `block` utility + +## 0.0.7 + +### Patch Changes + +- Fix cursor bug + +## 0.0.6 + +### Patch Changes + +- Fix error with character check + +## 0.0.5 + +### Patch Changes + +- 491f9e0: update readme + +## 0.0.4 + +### Patch Changes + +- 7372d5c: Fix bug with line deletion + +## 0.0.3 + +### Patch Changes + +- 5605d28: Do not bundle dependencies (take II) + +## 0.0.2 + +### Patch Changes + +- 2ee67cb: don't bundle deps + +## 0.0.1 + +### Patch Changes + +- 306598e: Initial publish, still WIP diff --git a/node_modules/@clack/core/LICENSE b/node_modules/@clack/core/LICENSE new file mode 100644 index 0000000..1ca4cf2 --- /dev/null +++ b/node_modules/@clack/core/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Nate Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@clack/core/README.md b/node_modules/@clack/core/README.md new file mode 100644 index 0000000..58a7e1f --- /dev/null +++ b/node_modules/@clack/core/README.md @@ -0,0 +1,22 @@ +# `@clack/core` + +Clack contains low-level primitives for implementing your own command-line applications. + +Currently, `TextPrompt`, `SelectPrompt`, and `ConfirmPrompt` are exposed as well as the base `Prompt` class. + +Each `Prompt` accepts a `render` function. + +```js +import { TextPrompt, isCancel } from '@clack/core'; + +const p = new TextPrompt({ + render() { + return `What's your name?\n${this.valueWithCursor}`; + }, +}); + +const name = await p.prompt(); +if (isCancel(name)) { + process.exit(0); +} +``` diff --git a/node_modules/@clack/core/dist/index.cjs b/node_modules/@clack/core/dist/index.cjs new file mode 100644 index 0000000..14bcbf7 --- /dev/null +++ b/node_modules/@clack/core/dist/index.cjs @@ -0,0 +1,15 @@ +"use strict";const sisteransi=require("sisteransi"),node_process=require("node:process"),s$2=require("node:readline"),node_tty=require("node:tty"),i$1=require("picocolors");function _interopDefaultCompat(C){return C&&typeof C=="object"&&"default"in C?C.default:C}function _interopNamespaceCompat(C){if(C&&typeof C=="object"&&"default"in C)return C;const t=Object.create(null);if(C)for(const F in C)t[F]=C[F];return t.default=C,t}const s__namespace=_interopNamespaceCompat(s$2),s__default=_interopDefaultCompat(s$2),i__default=_interopDefaultCompat(i$1);function ansiRegex({onlyFirst:C=!1}={}){const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,C?void 0:"g")}const regex=ansiRegex();function stripAnsi(C){if(typeof C!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof C}\``);return C.replace(regex,"")}function getDefaultExportFromCjs(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}var eastasianwidth={exports:{}};(function(C){var t={};C.exports=t,t.eastAsianWidth=function(E){var h=E.charCodeAt(0),B=E.length==2?E.charCodeAt(1):0,D=h;return 55296<=h&&h<=56319&&56320<=B&&B<=57343&&(h&=1023,B&=1023,D=h<<10|B,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},t.characterLength=function(E){var h=this.eastAsianWidth(E);return h=="F"||h=="W"||h=="A"?2:1};function F(E){return E.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(E){for(var h=F(E),B=0,D=0;D=h-(g==2?1:0))if(A+g<=B)D+=w;else break;A+=g}return D}})(eastasianwidth);var eastasianwidthExports=eastasianwidth.exports;const eastAsianWidth=getDefaultExportFromCjs(eastasianwidthExports);var emojiRegex=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|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:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const emojiRegex$1=getDefaultExportFromCjs(emojiRegex);function stringWidth(C,t={}){if(typeof C!="string"||C.length===0||(t={ambiguousIsNarrow:!0,...t},C=stripAnsi(C),C.length===0))return 0;C=C.replace(emojiRegex$1()," ");const F=t.ambiguousIsNarrow?1:2;let E=0;for(const h of C){const B=h.codePointAt(0);if(B<=31||B>=127&&B<=159||B>=768&&B<=879)continue;switch(eastAsianWidth.eastAsianWidth(h)){case"F":case"W":E+=2;break;case"A":E+=F;break;default:E+=1}}return E}const ANSI_BACKGROUND_OFFSET=10,wrapAnsi16=(C=0)=>t=>`\x1B[${t+C}m`,wrapAnsi256=(C=0)=>t=>`\x1B[${38+C};5;${t}m`,wrapAnsi16m=(C=0)=>(t,F,E)=>`\x1B[${38+C};2;${t};${F};${E}m`,styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(styles.modifier);const foregroundColorNames=Object.keys(styles.color),backgroundColorNames=Object.keys(styles.bgColor);[...foregroundColorNames,...backgroundColorNames];function assembleStyles(){const C=new Map;for(const[t,F]of Object.entries(styles)){for(const[E,h]of Object.entries(F))styles[E]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},F[E]=styles[E],C.set(h[0],h[1]);Object.defineProperty(styles,t,{value:F,enumerable:!1})}return Object.defineProperty(styles,"codes",{value:C,enumerable:!1}),styles.color.close="\x1B[39m",styles.bgColor.close="\x1B[49m",styles.color.ansi=wrapAnsi16(),styles.color.ansi256=wrapAnsi256(),styles.color.ansi16m=wrapAnsi16m(),styles.bgColor.ansi=wrapAnsi16(ANSI_BACKGROUND_OFFSET),styles.bgColor.ansi256=wrapAnsi256(ANSI_BACKGROUND_OFFSET),styles.bgColor.ansi16m=wrapAnsi16m(ANSI_BACKGROUND_OFFSET),Object.defineProperties(styles,{rgbToAnsi256:{value:(t,F,E)=>t===F&&F===E?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(F/255*5)+Math.round(E/255*5),enumerable:!1},hexToRgb:{value:t=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!F)return[0,0,0];let[E]=F;E.length===3&&(E=[...E].map(B=>B+B).join(""));const h=Number.parseInt(E,16);return[h>>16&255,h>>8&255,h&255]},enumerable:!1},hexToAnsi256:{value:t=>styles.rgbToAnsi256(...styles.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let F,E,h;if(t>=232)F=((t-232)*10+8)/255,E=F,h=F;else{t-=16;const A=t%36;F=Math.floor(t/36)/5,E=Math.floor(A/6)/5,h=A%6/5}const B=Math.max(F,E,h)*2;if(B===0)return 30;let D=30+(Math.round(h)<<2|Math.round(E)<<1|Math.round(F));return B===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(t,F,E)=>styles.ansi256ToAnsi(styles.rgbToAnsi256(t,F,E)),enumerable:!1},hexToAnsi:{value:t=>styles.ansi256ToAnsi(styles.hexToAnsi256(t)),enumerable:!1}}),styles}const ansiStyles=assembleStyles(),ESCAPES=new Set(["\x1B","\x9B"]),END_CODE=39,ANSI_ESCAPE_BELL="\x07",ANSI_CSI="[",ANSI_OSC="]",ANSI_SGR_TERMINATOR="m",ANSI_ESCAPE_LINK=`${ANSI_OSC}8;;`,wrapAnsiCode=C=>`${ESCAPES.values().next().value}${ANSI_CSI}${C}${ANSI_SGR_TERMINATOR}`,wrapAnsiHyperlink=C=>`${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${C}${ANSI_ESCAPE_BELL}`,wordLengths=C=>C.split(" ").map(t=>stringWidth(t)),wrapWord=(C,t,F)=>{const E=[...t];let h=!1,B=!1,D=stringWidth(stripAnsi(C[C.length-1]));for(const[A,d]of E.entries()){const f=stringWidth(d);if(D+f<=F?C[C.length-1]+=d:(C.push(d),D=0),ESCAPES.has(d)&&(h=!0,B=E.slice(A+1).join("").startsWith(ANSI_ESCAPE_LINK)),h){B?d===ANSI_ESCAPE_BELL&&(h=!1,B=!1):d===ANSI_SGR_TERMINATOR&&(h=!1);continue}D+=f,D===F&&A0&&C.length>1&&(C[C.length-2]+=C.pop())},stringVisibleTrimSpacesRight=C=>{const t=C.split(" ");let F=t.length;for(;F>0&&!(stringWidth(t[F-1])>0);)F--;return F===t.length?C:t.slice(0,F).join(" ")+t.slice(F).join("")},exec=(C,t,F={})=>{if(F.trim!==!1&&C.trim()==="")return"";let E="",h,B;const D=wordLengths(C);let A=[""];for(const[f,w]of C.split(" ").entries()){F.trim!==!1&&(A[A.length-1]=A[A.length-1].trimStart());let g=stringWidth(A[A.length-1]);if(f!==0&&(g>=t&&(F.wordWrap===!1||F.trim===!1)&&(A.push(""),g=0),(g>0||F.trim===!1)&&(A[A.length-1]+=" ",g++)),F.hard&&D[f]>t){const y=t-g,_=1+Math.floor((D[f]-y-1)/t);Math.floor((D[f]-1)/t)<_&&A.push(""),wrapWord(A,w,t);continue}if(g+D[f]>t&&g>0&&D[f]>0){if(F.wordWrap===!1&&gt&&F.wordWrap===!1){wrapWord(A,w,t);continue}A[A.length-1]+=w}F.trim!==!1&&(A=A.map(f=>stringVisibleTrimSpacesRight(f)));const d=[...A.join(` +`)];for(const[f,w]of d.entries()){if(E+=w,ESCAPES.has(w)){const{groups:y}=new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(d.slice(f).join(""))||{groups:{}};if(y.code!==void 0){const _=Number.parseFloat(y.code);h=_===END_CODE?void 0:_}else y.uri!==void 0&&(B=y.uri.length===0?void 0:y.uri)}const g=ansiStyles.codes.get(Number(h));d[f+1]===` +`?(B&&(E+=wrapAnsiHyperlink("")),h&&g&&(E+=wrapAnsiCode(g))):w===` +`&&(h&&g&&(E+=wrapAnsiCode(h)),B&&(E+=wrapAnsiHyperlink(B)))}return E};function wrapAnsi(C,t,F){return String(C).normalize().replace(/\r\n/g,` +`).split(` +`).map(E=>exec(E,t,F)).join(` +`)}const a$2=["up","down","left","right","space","enter","cancel"],settings={actions:new Set(a$2),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function updateSettings(C){for(const t in C){const F=t;if(!Object.hasOwn(C,F))continue;const E=C[F];switch(F){case"aliases":{for(const h in E)Object.hasOwn(E,h)&&(settings.aliases.has(h)||settings.aliases.set(h,E[h]));break}}}}function isActionKey(C,t){if(typeof C=="string")return settings.aliases.get(C)===t;for(const F of C)if(F!==void 0&&isActionKey(F,t))return!0;return!1}function diffLines(C,t){if(C===t)return;const F=C.split(` +`),E=t.split(` +`),h=[];for(let B=0;B{const f=String(D);if(isActionKey([f,A,d],"cancel")){E&&t.write(sisteransi.cursor.show),process.exit(0);return}if(!F)return;const w=A==="return"?0:-1,g=A==="return"?-1:0;s__namespace.moveCursor(t,w,g,()=>{s__namespace.clearLine(t,1,()=>{C.once("keypress",B)})})};return E&&t.write(sisteransi.cursor.hide),C.once("keypress",B),()=>{C.off("keypress",B),E&&t.write(sisteransi.cursor.show),C.isTTY&&!x&&C.setRawMode(!1),h.terminal=!1,h.close()}}var b=Object.defineProperty,v=(C,t,F)=>t in C?b(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,s$1=(C,t,F)=>(v(C,typeof t!="symbol"?t+"":t,F),F);class k{constructor(t,F=!0){s$1(this,"input"),s$1(this,"output"),s$1(this,"_abortSignal"),s$1(this,"rl"),s$1(this,"opts"),s$1(this,"_render"),s$1(this,"_track",!1),s$1(this,"_prevFrame",""),s$1(this,"_subscribers",new Map),s$1(this,"_cursor",0),s$1(this,"state","initial"),s$1(this,"error",""),s$1(this,"value");const{input:E=node_process.stdin,output:h=node_process.stdout,render:B,signal:D,...A}=t;this.opts=A,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=B.bind(this),this._track=F,this._abortSignal=D,this.input=E,this.output=h}unsubscribe(){this._subscribers.clear()}setSubscriber(t,F){const E=this._subscribers.get(t)??[];E.push(F),this._subscribers.set(t,E)}on(t,F){this.setSubscriber(t,{cb:F})}once(t,F){this.setSubscriber(t,{cb:F,once:!0})}emit(t,...F){const E=this._subscribers.get(t)??[],h=[];for(const B of E)B.cb(...F),B.once&&h.push(()=>E.splice(E.indexOf(B),1));for(const B of h)B()}prompt(){return new Promise((t,F)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(CANCEL_SYMBOL);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const E=new node_tty.WriteStream(0);E._write=(h,B,D)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),D()},this.input.pipe(E),this.rl=s__default.createInterface({input:this.input,output:E,tabSize:2,prompt:"",escapeCodeTimeout:50}),s__default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),setRawMode(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(sisteransi.cursor.show),this.output.off("resize",this.render),setRawMode(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(sisteransi.cursor.show),this.output.off("resize",this.render),setRawMode(this.input,!1),t(CANCEL_SYMBOL)})})}onKeypress(t,F){if(this.state==="error"&&(this.state="active"),F?.name&&(!this._track&&settings.aliases.has(F.name)&&this.emit("cursor",settings.aliases.get(F.name)),settings.actions.has(F.name)&&this.emit("cursor",F.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),F?.name==="return"){if(this.opts.validate){const E=this.opts.validate(this.value);E&&(this.error=E instanceof Error?E.message:E,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}isActionKey([t,F?.name,F?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(` +`),setRawMode(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const t=wrapAnsi(this._prevFrame,process.stdout.columns,{hard:!0}).split(` +`).length-1;this.output.write(sisteransi.cursor.move(-999,t*-1))}render(){const t=wrapAnsi(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(sisteransi.cursor.hide);else{const F=diffLines(this._prevFrame,t);if(this.restoreCursor(),F&&F?.length===1){const E=F[0];this.output.write(sisteransi.cursor.move(0,E)),this.output.write(sisteransi.erase.lines(1));const h=t.split(` +`);this.output.write(h[E]),this._prevFrame=t,this.output.write(sisteransi.cursor.move(0,h.length-E-1));return}if(F&&F?.length>1){const E=F[0];this.output.write(sisteransi.cursor.move(0,E)),this.output.write(sisteransi.erase.down());const h=t.split(` +`).slice(E);this.output.write(h.join(` +`)),this._prevFrame=t;return}this.output.write(sisteransi.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}}class s extends k{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",F=>{this.output.write(sisteransi.cursor.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var a$1=Object.defineProperty,n$2=(C,t,F)=>t in C?a$1(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,l$2=(C,t,F)=>(n$2(C,typeof t!="symbol"?t+"":t,F),F);let c$1=class extends k{constructor(t){super(t,!1),l$2(this,"options"),l$2(this,"cursor",0);const{options:F}=t;this.options=Object.entries(F).flatMap(([E,h])=>[{value:E,group:!0,label:E},...h.map(B=>({...B,group:E}))]),this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:E})=>E===t.cursorAt),0),this.on("cursor",E=>{switch(E){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}getGroupItems(t){return this.options.filter(F=>F.group===t)}isGroupSelected(t){return this.getGroupItems(t).every(F=>this.value.includes(F.value))}toggleValue(){const t=this.options[this.cursor];if(t.group===!0){const F=t.value,E=this.getGroupItems(F);this.isGroupSelected(F)?this.value=this.value.filter(h=>E.findIndex(B=>B.value===h)===-1):this.value=[...this.value,...E.map(h=>h.value)],this.value=Array.from(new Set(this.value))}else{const F=this.value.includes(t.value);this.value=F?this.value.filter(E=>E!==t.value):[...this.value,t.value]}}};var o$2=Object.defineProperty,a=(C,t,F)=>t in C?o$2(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,l$1=(C,t,F)=>(a(C,typeof t!="symbol"?t+"":t,F),F);let u$2=class extends k{constructor(t){super(t,!1),l$1(this,"options"),l$1(this,"cursor",0),this.options=t.options,this.value=[...t.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===t.cursorAt),0),this.on("key",F=>{F==="a"&&this.toggleAll()}),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){const t=this.value.length===this.options.length;this.value=t?[]:this.options.map(F=>F.value)}toggleValue(){const t=this.value.includes(this._value);this.value=t?this.value.filter(F=>F!==this._value):[...this.value,this._value]}};var u$1=Object.defineProperty,n$1=(C,t,F)=>t in C?u$1(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,e=(C,t,F)=>(n$1(C,typeof t!="symbol"?t+"":t,F),F);class m extends k{constructor({mask:t,...F}){super(F),e(this,"valueWithCursor",""),e(this,"_mask","\u2022"),this._mask=t??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${i__default.inverse(i__default.hidden("_"))}`;else{const E=this.masked.slice(0,this.cursor),h=this.masked.slice(this.cursor);this.valueWithCursor=`${E}${i__default.inverse(h[0])}${h.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}}var o$1=Object.defineProperty,n=(C,t,F)=>t in C?o$1(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,r=(C,t,F)=>(n(C,typeof t!="symbol"?t+"":t,F),F);class u extends k{constructor(t){super(t,!1),r(this,"options"),r(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:F})=>F===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}var p=Object.defineProperty,l=(C,t,F)=>t in C?p(C,t,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[t]=F,i=(C,t,F)=>(l(C,typeof t!="symbol"?t+"":t,F),F);class c extends k{constructor(t){super(t,!1),i(this,"options"),i(this,"cursor",0),this.options=t.options;const F=this.options.map(({value:[E]})=>E?.toLowerCase());this.cursor=Math.max(F.indexOf(t.initialValue),0),this.on("key",E=>{if(!F.includes(E))return;const h=this.options.find(({value:[B]})=>B?.toLowerCase()===E);h&&(this.value=h.value,this.state="submit",this.emit("submit"))})}}class o extends k{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const t=this.value.slice(0,this.cursor),[F,...E]=this.value.slice(this.cursor);return`${t}${i__default.inverse(F)}${E.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}}exports.ConfirmPrompt=s,exports.GroupMultiSelectPrompt=c$1,exports.MultiSelectPrompt=u$2,exports.PasswordPrompt=m,exports.Prompt=k,exports.SelectKeyPrompt=c,exports.SelectPrompt=u,exports.TextPrompt=o,exports.block=block,exports.isCancel=isCancel,exports.updateSettings=updateSettings; +//# sourceMappingURL=index.cjs.map diff --git a/node_modules/@clack/core/dist/index.cjs.map b/node_modules/@clack/core/dist/index.cjs.map new file mode 100644 index 0000000..b0051d7 --- /dev/null +++ b/node_modules/@clack/core/dist/index.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js","../../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js","../../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js","../../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js","../../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js","../src/utils/settings.ts","../src/utils/string.ts","../src/utils/index.ts","../src/prompts/prompt.ts","../src/prompts/confirm.ts","../src/prompts/group-multiselect.ts","../src/prompts/multi-select.ts","../src/prompts/password.ts","../src/prompts/select.ts","../src/prompts/select-key.ts","../src/prompts/text.ts"],"sourcesContent":["export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\tconst pattern = [\n\t\t`[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?${ST})`,\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))',\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","var eaw = {};\n\nif ('undefined' == typeof module) {\n window.eastasianwidth = eaw;\n} else {\n module.exports = eaw;\n}\n\neaw.eastAsianWidth = function(character) {\n var x = character.charCodeAt(0);\n var y = (character.length == 2) ? character.charCodeAt(1) : 0;\n var codePoint = x;\n if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {\n x &= 0x3FF;\n y &= 0x3FF;\n codePoint = (x << 10) | y;\n codePoint += 0x10000;\n }\n\n if ((0x3000 == codePoint) ||\n (0xFF01 <= codePoint && codePoint <= 0xFF60) ||\n (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) {\n return 'F';\n }\n if ((0x20A9 == codePoint) ||\n (0xFF61 <= codePoint && codePoint <= 0xFFBE) ||\n (0xFFC2 <= codePoint && codePoint <= 0xFFC7) ||\n (0xFFCA <= codePoint && codePoint <= 0xFFCF) ||\n (0xFFD2 <= codePoint && codePoint <= 0xFFD7) ||\n (0xFFDA <= codePoint && codePoint <= 0xFFDC) ||\n (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) {\n return 'H';\n }\n if ((0x1100 <= codePoint && codePoint <= 0x115F) ||\n (0x11A3 <= codePoint && codePoint <= 0x11A7) ||\n (0x11FA <= codePoint && codePoint <= 0x11FF) ||\n (0x2329 <= codePoint && codePoint <= 0x232A) ||\n (0x2E80 <= codePoint && codePoint <= 0x2E99) ||\n (0x2E9B <= codePoint && codePoint <= 0x2EF3) ||\n (0x2F00 <= codePoint && codePoint <= 0x2FD5) ||\n (0x2FF0 <= codePoint && codePoint <= 0x2FFB) ||\n (0x3001 <= codePoint && codePoint <= 0x303E) ||\n (0x3041 <= codePoint && codePoint <= 0x3096) ||\n (0x3099 <= codePoint && codePoint <= 0x30FF) ||\n (0x3105 <= codePoint && codePoint <= 0x312D) ||\n (0x3131 <= codePoint && codePoint <= 0x318E) ||\n (0x3190 <= codePoint && codePoint <= 0x31BA) ||\n (0x31C0 <= codePoint && codePoint <= 0x31E3) ||\n (0x31F0 <= codePoint && codePoint <= 0x321E) ||\n (0x3220 <= codePoint && codePoint <= 0x3247) ||\n (0x3250 <= codePoint && codePoint <= 0x32FE) ||\n (0x3300 <= codePoint && codePoint <= 0x4DBF) ||\n (0x4E00 <= codePoint && codePoint <= 0xA48C) ||\n (0xA490 <= codePoint && codePoint <= 0xA4C6) ||\n (0xA960 <= codePoint && codePoint <= 0xA97C) ||\n (0xAC00 <= codePoint && codePoint <= 0xD7A3) ||\n (0xD7B0 <= codePoint && codePoint <= 0xD7C6) ||\n (0xD7CB <= codePoint && codePoint <= 0xD7FB) ||\n (0xF900 <= codePoint && codePoint <= 0xFAFF) ||\n (0xFE10 <= codePoint && codePoint <= 0xFE19) ||\n (0xFE30 <= codePoint && codePoint <= 0xFE52) ||\n (0xFE54 <= codePoint && codePoint <= 0xFE66) ||\n (0xFE68 <= codePoint && codePoint <= 0xFE6B) ||\n (0x1B000 <= codePoint && codePoint <= 0x1B001) ||\n (0x1F200 <= codePoint && codePoint <= 0x1F202) ||\n (0x1F210 <= codePoint && codePoint <= 0x1F23A) ||\n (0x1F240 <= codePoint && codePoint <= 0x1F248) ||\n (0x1F250 <= codePoint && codePoint <= 0x1F251) ||\n (0x20000 <= codePoint && codePoint <= 0x2F73F) ||\n (0x2B740 <= codePoint && codePoint <= 0x2FFFD) ||\n (0x30000 <= codePoint && codePoint <= 0x3FFFD)) {\n return 'W';\n }\n if ((0x0020 <= codePoint && codePoint <= 0x007E) ||\n (0x00A2 <= codePoint && codePoint <= 0x00A3) ||\n (0x00A5 <= codePoint && codePoint <= 0x00A6) ||\n (0x00AC == codePoint) ||\n (0x00AF == codePoint) ||\n (0x27E6 <= codePoint && codePoint <= 0x27ED) ||\n (0x2985 <= codePoint && codePoint <= 0x2986)) {\n return 'Na';\n }\n if ((0x00A1 == codePoint) ||\n (0x00A4 == codePoint) ||\n (0x00A7 <= codePoint && codePoint <= 0x00A8) ||\n (0x00AA == codePoint) ||\n (0x00AD <= codePoint && codePoint <= 0x00AE) ||\n (0x00B0 <= codePoint && codePoint <= 0x00B4) ||\n (0x00B6 <= codePoint && codePoint <= 0x00BA) ||\n (0x00BC <= codePoint && codePoint <= 0x00BF) ||\n (0x00C6 == codePoint) ||\n (0x00D0 == codePoint) ||\n (0x00D7 <= codePoint && codePoint <= 0x00D8) ||\n (0x00DE <= codePoint && codePoint <= 0x00E1) ||\n (0x00E6 == codePoint) ||\n (0x00E8 <= codePoint && codePoint <= 0x00EA) ||\n (0x00EC <= codePoint && codePoint <= 0x00ED) ||\n (0x00F0 == codePoint) ||\n (0x00F2 <= codePoint && codePoint <= 0x00F3) ||\n (0x00F7 <= codePoint && codePoint <= 0x00FA) ||\n (0x00FC == codePoint) ||\n (0x00FE == codePoint) ||\n (0x0101 == codePoint) ||\n (0x0111 == codePoint) ||\n (0x0113 == codePoint) ||\n (0x011B == codePoint) ||\n (0x0126 <= codePoint && codePoint <= 0x0127) ||\n (0x012B == codePoint) ||\n (0x0131 <= codePoint && codePoint <= 0x0133) ||\n (0x0138 == codePoint) ||\n (0x013F <= codePoint && codePoint <= 0x0142) ||\n (0x0144 == codePoint) ||\n (0x0148 <= codePoint && codePoint <= 0x014B) ||\n (0x014D == codePoint) ||\n (0x0152 <= codePoint && codePoint <= 0x0153) ||\n (0x0166 <= codePoint && codePoint <= 0x0167) ||\n (0x016B == codePoint) ||\n (0x01CE == codePoint) ||\n (0x01D0 == codePoint) ||\n (0x01D2 == codePoint) ||\n (0x01D4 == codePoint) ||\n (0x01D6 == codePoint) ||\n (0x01D8 == codePoint) ||\n (0x01DA == codePoint) ||\n (0x01DC == codePoint) ||\n (0x0251 == codePoint) ||\n (0x0261 == codePoint) ||\n (0x02C4 == codePoint) ||\n (0x02C7 == codePoint) ||\n (0x02C9 <= codePoint && codePoint <= 0x02CB) ||\n (0x02CD == codePoint) ||\n (0x02D0 == codePoint) ||\n (0x02D8 <= codePoint && codePoint <= 0x02DB) ||\n (0x02DD == codePoint) ||\n (0x02DF == codePoint) ||\n (0x0300 <= codePoint && codePoint <= 0x036F) ||\n (0x0391 <= codePoint && codePoint <= 0x03A1) ||\n (0x03A3 <= codePoint && codePoint <= 0x03A9) ||\n (0x03B1 <= codePoint && codePoint <= 0x03C1) ||\n (0x03C3 <= codePoint && codePoint <= 0x03C9) ||\n (0x0401 == codePoint) ||\n (0x0410 <= codePoint && codePoint <= 0x044F) ||\n (0x0451 == codePoint) ||\n (0x2010 == codePoint) ||\n (0x2013 <= codePoint && codePoint <= 0x2016) ||\n (0x2018 <= codePoint && codePoint <= 0x2019) ||\n (0x201C <= codePoint && codePoint <= 0x201D) ||\n (0x2020 <= codePoint && codePoint <= 0x2022) ||\n (0x2024 <= codePoint && codePoint <= 0x2027) ||\n (0x2030 == codePoint) ||\n (0x2032 <= codePoint && codePoint <= 0x2033) ||\n (0x2035 == codePoint) ||\n (0x203B == codePoint) ||\n (0x203E == codePoint) ||\n (0x2074 == codePoint) ||\n (0x207F == codePoint) ||\n (0x2081 <= codePoint && codePoint <= 0x2084) ||\n (0x20AC == codePoint) ||\n (0x2103 == codePoint) ||\n (0x2105 == codePoint) ||\n (0x2109 == codePoint) ||\n (0x2113 == codePoint) ||\n (0x2116 == codePoint) ||\n (0x2121 <= codePoint && codePoint <= 0x2122) ||\n (0x2126 == codePoint) ||\n (0x212B == codePoint) ||\n (0x2153 <= codePoint && codePoint <= 0x2154) ||\n (0x215B <= codePoint && codePoint <= 0x215E) ||\n (0x2160 <= codePoint && codePoint <= 0x216B) ||\n (0x2170 <= codePoint && codePoint <= 0x2179) ||\n (0x2189 == codePoint) ||\n (0x2190 <= codePoint && codePoint <= 0x2199) ||\n (0x21B8 <= codePoint && codePoint <= 0x21B9) ||\n (0x21D2 == codePoint) ||\n (0x21D4 == codePoint) ||\n (0x21E7 == codePoint) ||\n (0x2200 == codePoint) ||\n (0x2202 <= codePoint && codePoint <= 0x2203) ||\n (0x2207 <= codePoint && codePoint <= 0x2208) ||\n (0x220B == codePoint) ||\n (0x220F == codePoint) ||\n (0x2211 == codePoint) ||\n (0x2215 == codePoint) ||\n (0x221A == codePoint) ||\n (0x221D <= codePoint && codePoint <= 0x2220) ||\n (0x2223 == codePoint) ||\n (0x2225 == codePoint) ||\n (0x2227 <= codePoint && codePoint <= 0x222C) ||\n (0x222E == codePoint) ||\n (0x2234 <= codePoint && codePoint <= 0x2237) ||\n (0x223C <= codePoint && codePoint <= 0x223D) ||\n (0x2248 == codePoint) ||\n (0x224C == codePoint) ||\n (0x2252 == codePoint) ||\n (0x2260 <= codePoint && codePoint <= 0x2261) ||\n (0x2264 <= codePoint && codePoint <= 0x2267) ||\n (0x226A <= codePoint && codePoint <= 0x226B) ||\n (0x226E <= codePoint && codePoint <= 0x226F) ||\n (0x2282 <= codePoint && codePoint <= 0x2283) ||\n (0x2286 <= codePoint && codePoint <= 0x2287) ||\n (0x2295 == codePoint) ||\n (0x2299 == codePoint) ||\n (0x22A5 == codePoint) ||\n (0x22BF == codePoint) ||\n (0x2312 == codePoint) ||\n (0x2460 <= codePoint && codePoint <= 0x24E9) ||\n (0x24EB <= codePoint && codePoint <= 0x254B) ||\n (0x2550 <= codePoint && codePoint <= 0x2573) ||\n (0x2580 <= codePoint && codePoint <= 0x258F) ||\n (0x2592 <= codePoint && codePoint <= 0x2595) ||\n (0x25A0 <= codePoint && codePoint <= 0x25A1) ||\n (0x25A3 <= codePoint && codePoint <= 0x25A9) ||\n (0x25B2 <= codePoint && codePoint <= 0x25B3) ||\n (0x25B6 <= codePoint && codePoint <= 0x25B7) ||\n (0x25BC <= codePoint && codePoint <= 0x25BD) ||\n (0x25C0 <= codePoint && codePoint <= 0x25C1) ||\n (0x25C6 <= codePoint && codePoint <= 0x25C8) ||\n (0x25CB == codePoint) ||\n (0x25CE <= codePoint && codePoint <= 0x25D1) ||\n (0x25E2 <= codePoint && codePoint <= 0x25E5) ||\n (0x25EF == codePoint) ||\n (0x2605 <= codePoint && codePoint <= 0x2606) ||\n (0x2609 == codePoint) ||\n (0x260E <= codePoint && codePoint <= 0x260F) ||\n (0x2614 <= codePoint && codePoint <= 0x2615) ||\n (0x261C == codePoint) ||\n (0x261E == codePoint) ||\n (0x2640 == codePoint) ||\n (0x2642 == codePoint) ||\n (0x2660 <= codePoint && codePoint <= 0x2661) ||\n (0x2663 <= codePoint && codePoint <= 0x2665) ||\n (0x2667 <= codePoint && codePoint <= 0x266A) ||\n (0x266C <= codePoint && codePoint <= 0x266D) ||\n (0x266F == codePoint) ||\n (0x269E <= codePoint && codePoint <= 0x269F) ||\n (0x26BE <= codePoint && codePoint <= 0x26BF) ||\n (0x26C4 <= codePoint && codePoint <= 0x26CD) ||\n (0x26CF <= codePoint && codePoint <= 0x26E1) ||\n (0x26E3 == codePoint) ||\n (0x26E8 <= codePoint && codePoint <= 0x26FF) ||\n (0x273D == codePoint) ||\n (0x2757 == codePoint) ||\n (0x2776 <= codePoint && codePoint <= 0x277F) ||\n (0x2B55 <= codePoint && codePoint <= 0x2B59) ||\n (0x3248 <= codePoint && codePoint <= 0x324F) ||\n (0xE000 <= codePoint && codePoint <= 0xF8FF) ||\n (0xFE00 <= codePoint && codePoint <= 0xFE0F) ||\n (0xFFFD == codePoint) ||\n (0x1F100 <= codePoint && codePoint <= 0x1F10A) ||\n (0x1F110 <= codePoint && codePoint <= 0x1F12D) ||\n (0x1F130 <= codePoint && codePoint <= 0x1F169) ||\n (0x1F170 <= codePoint && codePoint <= 0x1F19A) ||\n (0xE0100 <= codePoint && codePoint <= 0xE01EF) ||\n (0xF0000 <= codePoint && codePoint <= 0xFFFFD) ||\n (0x100000 <= codePoint && codePoint <= 0x10FFFD)) {\n return 'A';\n }\n\n return 'N';\n};\n\neaw.characterLength = function(character) {\n var code = this.eastAsianWidth(character);\n if (code == 'F' || code == 'W' || code == 'A') {\n return 2;\n } else {\n return 1;\n }\n};\n\n// Split a string considering surrogate-pairs.\nfunction stringToArray(string) {\n return string.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\uD800-\\uDFFF]/g) || [];\n}\n\neaw.length = function(string) {\n var characters = stringToArray(string);\n var len = 0;\n for (var i = 0; i < characters.length; i++) {\n len = len + this.characterLength(characters[i]);\n }\n return len;\n};\n\neaw.slice = function(text, start, end) {\n textLen = eaw.length(text)\n start = start ? start : 0;\n end = end ? end : 1;\n if (start < 0) {\n start = textLen + start;\n }\n if (end < 0) {\n end = textLen + end;\n }\n var result = '';\n var eawLen = 0;\n var chars = stringToArray(text);\n for (var i = 0; i < chars.length; i++) {\n var char = chars[i];\n var charLen = eaw.length(char);\n if (eawLen >= start - (charLen == 2 ? 1 : 0)) {\n if (eawLen + charLen <= end) {\n result += char;\n } else {\n break;\n }\n }\n eawLen += charLen;\n }\n return result;\n};\n","\"use strict\";\n\nmodule.exports = function () {\n // https://mths.be/emoji\n return /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67)\\uDB40\\uDC7F|(?:\\uD83E\\uDDD1\\uD83C\\uDFFF\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C\\uDFFB(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))?|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\u200D(?:(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFFF|\\uD83C\\uDFFE|\\uD83C\\uDFFD|\\uD83C\\uDFFC)?|(?:\\uD83D\\uDC69(?:\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69]))|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC69(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|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uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDE36\\u200D\\uD83C\\uDF2B|\\uD83C\\uDFF3\\uFE0F\\u200D\\u26A7|\\uD83D\\uDC3B\\u200D\\u2744|(?:(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\uD83C\\uDFF4\\u200D\\u2620|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])\\u200D[\\u2640\\u2642]|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u2600-\\u2604\\u260E\\u2611\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26B0\\u26B1\\u26C8\\u26CF\\u26D1\\u26D3\\u26E9\\u26F0\\u26F1\\u26F4\\u26F7\\u26F8\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]|\\uD83D[\\uDC3F\\uDCFD\\uDD49\\uDD4A\\uDD6F\\uDD70\\uDD73\\uDD76-\\uDD79\\uDD87\\uDD8A-\\uDD8D\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA\\uDECB\\uDECD-\\uDECF\\uDEE0-\\uDEE5\\uDEE9\\uDEF0\\uDEF3])\\uFE0F|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDE35\\u200D\\uD83D\\uDCAB|\\uD83D\\uDE2E\\u200D\\uD83D\\uDCA8|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF|\\uD83C\\uDFFE|\\uD83C\\uDFFD|\\uD83C\\uDFFC|\\uD83C\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DC8F\\uDC91\\uDCAA\\uDD7A\\uDD95\\uDD96\\uDE2E\\uDE35\\uDE36\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5]|\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD]|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF]|[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF84\\uDF86-\\uDF93\\uDFA0-\\uDFC1\\uDFC5\\uDFC6\\uDFC8\\uDFC9\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC07\\uDC09-\\uDC14\\uDC16-\\uDC3A\\uDC3C-\\uDC3E\\uDC40\\uDC44\\uDC45\\uDC51-\\uDC65\\uDC6A\\uDC79-\\uDC7B\\uDC7D-\\uDC80\\uDC84\\uDC88-\\uDC8E\\uDC90\\uDC92-\\uDCA9\\uDCAB-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDDA4\\uDDFB-\\uDE2D\\uDE2F-\\uDE34\\uDE37-\\uDE44\\uDE48-\\uDE4A\\uDE80-\\uDEA2\\uDEA4-\\uDEB3\\uDEB7-\\uDEBF\\uDEC1-\\uDEC5\\uDED0-\\uDED2\\uDED5-\\uDED7\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D\\uDD0E\\uDD10-\\uDD17\\uDD1D\\uDD20-\\uDD25\\uDD27-\\uDD2F\\uDD3A\\uDD3F-\\uDD45\\uDD47-\\uDD76\\uDD78\\uDD7A-\\uDDB4\\uDDB7\\uDDBA\\uDDBC-\\uDDCB\\uDDD0\\uDDE0-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6]|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5-\\uDED7\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5-\\uDED7\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDD77\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport eastAsianWidth from 'eastasianwidth';\nimport emojiRegex from 'emoji-regex';\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\toptions = {\n\t\tambiguousIsNarrow: true,\n\t\t...options\n\t};\n\n\tstring = stripAnsi(string);\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tstring = string.replace(emojiRegex(), ' ');\n\n\tconst ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;\n\tlet width = 0;\n\n\tfor (const character of string) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (codePoint >= 0x300 && codePoint <= 0x36F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst code = eastAsianWidth.eastAsianWidth(character);\n\t\tswitch (code) {\n\t\t\tcase 'F':\n\t\t\tcase 'W':\n\t\t\t\twidth += 2;\n\t\t\t\tbreak;\n\t\t\tcase 'A':\n\t\t\t\twidth += ambiguousCharacterWidth;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\twidth += 1;\n\t\t}\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows[rows.length - 1]));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\t\t\tisInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode\n//\n// 'hard' will never allow a string to take up more than columns characters\n//\n// 'soft' allows long words to expand past the column length\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows[rows.length - 1].trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows[rows.length - 1]);\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst pre = [...rows.join('\\n')];\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replace(/\\r\\n/g, '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","const actions = ['up', 'down', 'left', 'right', 'space', 'enter', 'cancel'] as const;\nexport type Action = (typeof actions)[number];\n\n/** Global settings for Clack programs, stored in memory */\ninterface InternalClackSettings {\n\tactions: Set;\n\taliases: Map;\n}\n\nexport const settings: InternalClackSettings = {\n\tactions: new Set(actions),\n\taliases: new Map([\n\t\t// vim support\n\t\t['k', 'up'],\n\t\t['j', 'down'],\n\t\t['h', 'left'],\n\t\t['l', 'right'],\n\t\t['\\x03', 'cancel'],\n\t\t// opinionated defaults!\n\t\t['escape', 'cancel'],\n\t]),\n};\n\nexport interface ClackSettings {\n\t/**\n\t * Set custom global aliases for the default actions.\n\t * This will not overwrite existing aliases, it will only add new ones!\n\t *\n\t * @param aliases - An object that maps aliases to actions\n\t * @default { k: 'up', j: 'down', h: 'left', l: 'right', '\\x03': 'cancel', 'escape': 'cancel' }\n\t */\n\taliases: Record;\n}\n\nexport function updateSettings(updates: ClackSettings) {\n\tfor (const _key in updates) {\n\t\tconst key = _key as keyof ClackSettings;\n\t\tif (!Object.hasOwn(updates, key)) continue;\n\t\tconst value = updates[key];\n\n\t\tswitch (key) {\n\t\t\tcase 'aliases': {\n\t\t\t\tfor (const alias in value) {\n\t\t\t\t\tif (!Object.hasOwn(value, alias)) continue;\n\t\t\t\t\tif (!settings.aliases.has(alias)) {\n\t\t\t\t\t\tsettings.aliases.set(alias, value[alias]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Check if a key is an alias for a default action\n * @param key - The raw key which might match to an action\n * @param action - The action to match\n * @returns boolean\n */\nexport function isActionKey(key: string | Array, action: Action) {\n\tif (typeof key === 'string') {\n\t\treturn settings.aliases.get(key) === action;\n\t}\n\n\tfor (const value of key) {\n\t\tif (value === undefined) continue;\n\t\tif (isActionKey(value, action)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","export function diffLines(a: string, b: string) {\n\tif (a === b) return;\n\n\tconst aLines = a.split('\\n');\n\tconst bLines = b.split('\\n');\n\tconst diff: number[] = [];\n\n\tfor (let i = 0; i < Math.max(aLines.length, bLines.length); i++) {\n\t\tif (aLines[i] !== bLines[i]) diff.push(i);\n\t}\n\n\treturn diff;\n}\n","import { stdin, stdout } from 'node:process';\nimport type { Key } from 'node:readline';\nimport * as readline from 'node:readline';\nimport type { Readable } from 'node:stream';\nimport { cursor } from 'sisteransi';\nimport { isActionKey } from './settings';\n\nexport * from './string';\nexport * from './settings';\n\nconst isWindows = globalThis.process.platform.startsWith('win');\n\nexport const CANCEL_SYMBOL = Symbol('clack:cancel');\n\nexport function isCancel(value: unknown): value is symbol {\n\treturn value === CANCEL_SYMBOL;\n}\n\nexport function setRawMode(input: Readable, value: boolean) {\n\tconst i = input as typeof stdin;\n\n\tif (i.isTTY) i.setRawMode(value);\n}\n\nexport function block({\n\tinput = stdin,\n\toutput = stdout,\n\toverwrite = true,\n\thideCursor = true,\n} = {}) {\n\tconst rl = readline.createInterface({\n\t\tinput,\n\t\toutput,\n\t\tprompt: '',\n\t\ttabSize: 1,\n\t});\n\treadline.emitKeypressEvents(input, rl);\n\tif (input.isTTY) input.setRawMode(true);\n\n\tconst clear = (data: Buffer, { name, sequence }: Key) => {\n\t\tconst str = String(data);\n\t\tif (isActionKey([str, name, sequence], 'cancel')) {\n\t\t\tif (hideCursor) output.write(cursor.show);\n\t\t\tprocess.exit(0);\n\t\t\treturn;\n\t\t}\n\t\tif (!overwrite) return;\n\t\tconst dx = name === 'return' ? 0 : -1;\n\t\tconst dy = name === 'return' ? -1 : 0;\n\n\t\treadline.moveCursor(output, dx, dy, () => {\n\t\t\treadline.clearLine(output, 1, () => {\n\t\t\t\tinput.once('keypress', clear);\n\t\t\t});\n\t\t});\n\t};\n\tif (hideCursor) output.write(cursor.hide);\n\tinput.once('keypress', clear);\n\n\treturn () => {\n\t\tinput.off('keypress', clear);\n\t\tif (hideCursor) output.write(cursor.show);\n\n\t\t// Prevent Windows specific issues: https://github.com/natemoo-re/clack/issues/176\n\t\tif (input.isTTY && !isWindows) input.setRawMode(false);\n\n\t\t// @ts-expect-error fix for https://github.com/nodejs/node/issues/31762#issuecomment-1441223907\n\t\trl.terminal = false;\n\t\trl.close();\n\t};\n}\n","import { stdin, stdout } from 'node:process';\nimport readline, { type Key, type ReadLine } from 'node:readline';\nimport type { Readable, Writable } from 'node:stream';\nimport { WriteStream } from 'node:tty';\nimport { cursor, erase } from 'sisteransi';\nimport wrap from 'wrap-ansi';\n\nimport { CANCEL_SYMBOL, diffLines, isActionKey, setRawMode, settings } from '../utils';\n\nimport type { ClackEvents, ClackState } from '../types';\nimport type { Action } from '../utils';\n\nexport interface PromptOptions {\n\trender(this: Omit): string | undefined;\n\tplaceholder?: string;\n\tinitialValue?: any;\n\tvalidate?: ((value: any) => string | Error | undefined) | undefined;\n\tinput?: Readable;\n\toutput?: Writable;\n\tdebug?: boolean;\n\tsignal?: AbortSignal;\n}\n\nexport default class Prompt {\n\tprotected input: Readable;\n\tprotected output: Writable;\n\tprivate _abortSignal?: AbortSignal;\n\n\tprivate rl: ReadLine | undefined;\n\tprivate opts: Omit, 'render' | 'input' | 'output'>;\n\tprivate _render: (context: Omit) => string | undefined;\n\tprivate _track = false;\n\tprivate _prevFrame = '';\n\tprivate _subscribers = new Map any; once?: boolean }[]>();\n\tprotected _cursor = 0;\n\n\tpublic state: ClackState = 'initial';\n\tpublic error = '';\n\tpublic value: any;\n\n\tconstructor(options: PromptOptions, trackValue = true) {\n\t\tconst { input = stdin, output = stdout, render, signal, ...opts } = options;\n\n\t\tthis.opts = opts;\n\t\tthis.onKeypress = this.onKeypress.bind(this);\n\t\tthis.close = this.close.bind(this);\n\t\tthis.render = this.render.bind(this);\n\t\tthis._render = render.bind(this);\n\t\tthis._track = trackValue;\n\t\tthis._abortSignal = signal;\n\n\t\tthis.input = input;\n\t\tthis.output = output;\n\t}\n\n\t/**\n\t * Unsubscribe all listeners\n\t */\n\tprotected unsubscribe() {\n\t\tthis._subscribers.clear();\n\t}\n\n\t/**\n\t * Set a subscriber with opts\n\t * @param event - The event name\n\t */\n\tprivate setSubscriber(\n\t\tevent: T,\n\t\topts: { cb: ClackEvents[T]; once?: boolean }\n\t) {\n\t\tconst params = this._subscribers.get(event) ?? [];\n\t\tparams.push(opts);\n\t\tthis._subscribers.set(event, params);\n\t}\n\n\t/**\n\t * Subscribe to an event\n\t * @param event - The event name\n\t * @param cb - The callback\n\t */\n\tpublic on(event: T, cb: ClackEvents[T]) {\n\t\tthis.setSubscriber(event, { cb });\n\t}\n\n\t/**\n\t * Subscribe to an event once\n\t * @param event - The event name\n\t * @param cb - The callback\n\t */\n\tpublic once(event: T, cb: ClackEvents[T]) {\n\t\tthis.setSubscriber(event, { cb, once: true });\n\t}\n\n\t/**\n\t * Emit an event with data\n\t * @param event - The event name\n\t * @param data - The data to pass to the callback\n\t */\n\tpublic emit(event: T, ...data: Parameters) {\n\t\tconst cbs = this._subscribers.get(event) ?? [];\n\t\tconst cleanup: (() => void)[] = [];\n\n\t\tfor (const subscriber of cbs) {\n\t\t\tsubscriber.cb(...data);\n\n\t\t\tif (subscriber.once) {\n\t\t\t\tcleanup.push(() => cbs.splice(cbs.indexOf(subscriber), 1));\n\t\t\t}\n\t\t}\n\n\t\tfor (const cb of cleanup) {\n\t\t\tcb();\n\t\t}\n\t}\n\n\tpublic prompt() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this._abortSignal) {\n\t\t\t\tif (this._abortSignal.aborted) {\n\t\t\t\t\tthis.state = 'cancel';\n\n\t\t\t\t\tthis.close();\n\t\t\t\t\treturn resolve(CANCEL_SYMBOL);\n\t\t\t\t}\n\n\t\t\t\tthis._abortSignal.addEventListener(\n\t\t\t\t\t'abort',\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.state = 'cancel';\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t},\n\t\t\t\t\t{ once: true }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst sink = new WriteStream(0);\n\t\t\tsink._write = (chunk, encoding, done) => {\n\t\t\t\tif (this._track) {\n\t\t\t\t\tthis.value = this.rl?.line.replace(/\\t/g, '');\n\t\t\t\t\tthis._cursor = this.rl?.cursor ?? 0;\n\t\t\t\t\tthis.emit('value', this.value);\n\t\t\t\t}\n\t\t\t\tdone();\n\t\t\t};\n\t\t\tthis.input.pipe(sink);\n\n\t\t\tthis.rl = readline.createInterface({\n\t\t\t\tinput: this.input,\n\t\t\t\toutput: sink,\n\t\t\t\ttabSize: 2,\n\t\t\t\tprompt: '',\n\t\t\t\tescapeCodeTimeout: 50,\n\t\t\t});\n\t\t\treadline.emitKeypressEvents(this.input, this.rl);\n\t\t\tthis.rl.prompt();\n\t\t\tif (this.opts.initialValue !== undefined && this._track) {\n\t\t\t\tthis.rl.write(this.opts.initialValue);\n\t\t\t}\n\n\t\t\tthis.input.on('keypress', this.onKeypress);\n\t\t\tsetRawMode(this.input, true);\n\t\t\tthis.output.on('resize', this.render);\n\n\t\t\tthis.render();\n\n\t\t\tthis.once('submit', () => {\n\t\t\t\tthis.output.write(cursor.show);\n\t\t\t\tthis.output.off('resize', this.render);\n\t\t\t\tsetRawMode(this.input, false);\n\t\t\t\tresolve(this.value);\n\t\t\t});\n\t\t\tthis.once('cancel', () => {\n\t\t\t\tthis.output.write(cursor.show);\n\t\t\t\tthis.output.off('resize', this.render);\n\t\t\t\tsetRawMode(this.input, false);\n\t\t\t\tresolve(CANCEL_SYMBOL);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate onKeypress(char: string, key?: Key) {\n\t\tif (this.state === 'error') {\n\t\t\tthis.state = 'active';\n\t\t}\n\t\tif (key?.name) {\n\t\t\tif (!this._track && settings.aliases.has(key.name)) {\n\t\t\t\tthis.emit('cursor', settings.aliases.get(key.name));\n\t\t\t}\n\t\t\tif (settings.actions.has(key.name as Action)) {\n\t\t\t\tthis.emit('cursor', key.name as Action);\n\t\t\t}\n\t\t}\n\t\tif (char && (char.toLowerCase() === 'y' || char.toLowerCase() === 'n')) {\n\t\t\tthis.emit('confirm', char.toLowerCase() === 'y');\n\t\t}\n\t\tif (char === '\\t' && this.opts.placeholder) {\n\t\t\tif (!this.value) {\n\t\t\t\tthis.rl?.write(this.opts.placeholder);\n\t\t\t\tthis.emit('value', this.opts.placeholder);\n\t\t\t}\n\t\t}\n\t\tif (char) {\n\t\t\tthis.emit('key', char.toLowerCase());\n\t\t}\n\n\t\tif (key?.name === 'return') {\n\t\t\tif (this.opts.validate) {\n\t\t\t\tconst problem = this.opts.validate(this.value);\n\t\t\t\tif (problem) {\n\t\t\t\t\tthis.error = problem instanceof Error ? problem.message : problem;\n\t\t\t\t\tthis.state = 'error';\n\t\t\t\t\tthis.rl?.write(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.state !== 'error') {\n\t\t\t\tthis.state = 'submit';\n\t\t\t}\n\t\t}\n\n\t\tif (isActionKey([char, key?.name, key?.sequence], 'cancel')) {\n\t\t\tthis.state = 'cancel';\n\t\t}\n\t\tif (this.state === 'submit' || this.state === 'cancel') {\n\t\t\tthis.emit('finalize');\n\t\t}\n\t\tthis.render();\n\t\tif (this.state === 'submit' || this.state === 'cancel') {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprotected close() {\n\t\tthis.input.unpipe();\n\t\tthis.input.removeListener('keypress', this.onKeypress);\n\t\tthis.output.write('\\n');\n\t\tsetRawMode(this.input, false);\n\t\tthis.rl?.close();\n\t\tthis.rl = undefined;\n\t\tthis.emit(`${this.state}`, this.value);\n\t\tthis.unsubscribe();\n\t}\n\n\tprivate restoreCursor() {\n\t\tconst lines =\n\t\t\twrap(this._prevFrame, process.stdout.columns, { hard: true }).split('\\n').length - 1;\n\t\tthis.output.write(cursor.move(-999, lines * -1));\n\t}\n\n\tprivate render() {\n\t\tconst frame = wrap(this._render(this) ?? '', process.stdout.columns, { hard: true });\n\t\tif (frame === this._prevFrame) return;\n\n\t\tif (this.state === 'initial') {\n\t\t\tthis.output.write(cursor.hide);\n\t\t} else {\n\t\t\tconst diff = diffLines(this._prevFrame, frame);\n\t\t\tthis.restoreCursor();\n\t\t\t// If a single line has changed, only update that line\n\t\t\tif (diff && diff?.length === 1) {\n\t\t\t\tconst diffLine = diff[0];\n\t\t\t\tthis.output.write(cursor.move(0, diffLine));\n\t\t\t\tthis.output.write(erase.lines(1));\n\t\t\t\tconst lines = frame.split('\\n');\n\t\t\t\tthis.output.write(lines[diffLine]);\n\t\t\t\tthis._prevFrame = frame;\n\t\t\t\tthis.output.write(cursor.move(0, lines.length - diffLine - 1));\n\t\t\t\treturn;\n\t\t\t\t// If many lines have changed, rerender everything past the first line\n\t\t\t}\n\t\t\tif (diff && diff?.length > 1) {\n\t\t\t\tconst diffLine = diff[0];\n\t\t\t\tthis.output.write(cursor.move(0, diffLine));\n\t\t\t\tthis.output.write(erase.down());\n\t\t\t\tconst lines = frame.split('\\n');\n\t\t\t\tconst newLines = lines.slice(diffLine);\n\t\t\t\tthis.output.write(newLines.join('\\n'));\n\t\t\t\tthis._prevFrame = frame;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.output.write(erase.down());\n\t\t}\n\n\t\tthis.output.write(frame);\n\t\tif (this.state === 'initial') {\n\t\t\tthis.state = 'active';\n\t\t}\n\t\tthis._prevFrame = frame;\n\t}\n}\n","import { cursor } from 'sisteransi';\nimport Prompt, { type PromptOptions } from './prompt';\n\ninterface ConfirmOptions extends PromptOptions {\n\tactive: string;\n\tinactive: string;\n\tinitialValue?: boolean;\n}\nexport default class ConfirmPrompt extends Prompt {\n\tget cursor() {\n\t\treturn this.value ? 0 : 1;\n\t}\n\n\tprivate get _value() {\n\t\treturn this.cursor === 0;\n\t}\n\n\tconstructor(opts: ConfirmOptions) {\n\t\tsuper(opts, false);\n\t\tthis.value = !!opts.initialValue;\n\n\t\tthis.on('value', () => {\n\t\t\tthis.value = this._value;\n\t\t});\n\n\t\tthis.on('confirm', (confirm) => {\n\t\t\tthis.output.write(cursor.move(0, -1));\n\t\t\tthis.value = confirm;\n\t\t\tthis.state = 'submit';\n\t\t\tthis.close();\n\t\t});\n\n\t\tthis.on('cursor', () => {\n\t\t\tthis.value = !this.value;\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface GroupMultiSelectOptions\n\textends PromptOptions> {\n\toptions: Record;\n\tinitialValues?: T['value'][];\n\trequired?: boolean;\n\tcursorAt?: T['value'];\n}\nexport default class GroupMultiSelectPrompt extends Prompt {\n\toptions: (T & { group: string | boolean })[];\n\tcursor = 0;\n\n\tgetGroupItems(group: string): T[] {\n\t\treturn this.options.filter((o) => o.group === group);\n\t}\n\n\tisGroupSelected(group: string) {\n\t\tconst items = this.getGroupItems(group);\n\t\treturn items.every((i) => this.value.includes(i.value));\n\t}\n\n\tprivate toggleValue() {\n\t\tconst item = this.options[this.cursor];\n\t\tif (item.group === true) {\n\t\t\tconst group = item.value;\n\t\t\tconst groupedItems = this.getGroupItems(group);\n\t\t\tif (this.isGroupSelected(group)) {\n\t\t\t\tthis.value = this.value.filter(\n\t\t\t\t\t(v: string) => groupedItems.findIndex((i) => i.value === v) === -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.value = [...this.value, ...groupedItems.map((i) => i.value)];\n\t\t\t}\n\t\t\tthis.value = Array.from(new Set(this.value));\n\t\t} else {\n\t\t\tconst selected = this.value.includes(item.value);\n\t\t\tthis.value = selected\n\t\t\t\t? this.value.filter((v: T['value']) => v !== item.value)\n\t\t\t\t: [...this.value, item.value];\n\t\t}\n\t}\n\n\tconstructor(opts: GroupMultiSelectOptions) {\n\t\tsuper(opts, false);\n\t\tconst { options } = opts;\n\t\tthis.options = Object.entries(options).flatMap(([key, option]) => [\n\t\t\t{ value: key, group: true, label: key },\n\t\t\t...option.map((opt) => ({ ...opt, group: key })),\n\t\t]) as any;\n\t\tthis.value = [...(opts.initialValues ?? [])];\n\t\tthis.cursor = Math.max(\n\t\t\tthis.options.findIndex(({ value }) => value === opts.cursorAt),\n\t\t\t0\n\t\t);\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'space':\n\t\t\t\t\tthis.toggleValue();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface MultiSelectOptions extends PromptOptions> {\n\toptions: T[];\n\tinitialValues?: T['value'][];\n\trequired?: boolean;\n\tcursorAt?: T['value'];\n}\nexport default class MultiSelectPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tprivate get _value() {\n\t\treturn this.options[this.cursor].value;\n\t}\n\n\tprivate toggleAll() {\n\t\tconst allSelected = this.value.length === this.options.length;\n\t\tthis.value = allSelected ? [] : this.options.map((v) => v.value);\n\t}\n\n\tprivate toggleValue() {\n\t\tconst selected = this.value.includes(this._value);\n\t\tthis.value = selected\n\t\t\t? this.value.filter((value: T['value']) => value !== this._value)\n\t\t\t: [...this.value, this._value];\n\t}\n\n\tconstructor(opts: MultiSelectOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tthis.value = [...(opts.initialValues ?? [])];\n\t\tthis.cursor = Math.max(\n\t\t\tthis.options.findIndex(({ value }) => value === opts.cursorAt),\n\t\t\t0\n\t\t);\n\t\tthis.on('key', (char) => {\n\t\t\tif (char === 'a') {\n\t\t\t\tthis.toggleAll();\n\t\t\t}\n\t\t});\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'space':\n\t\t\t\t\tthis.toggleValue();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n}\n","import color from 'picocolors';\nimport Prompt, { type PromptOptions } from './prompt';\n\ninterface PasswordOptions extends PromptOptions {\n\tmask?: string;\n}\nexport default class PasswordPrompt extends Prompt {\n\tvalueWithCursor = '';\n\tprivate _mask = '•';\n\tget cursor() {\n\t\treturn this._cursor;\n\t}\n\tget masked() {\n\t\treturn this.value.replaceAll(/./g, this._mask);\n\t}\n\tconstructor({ mask, ...opts }: PasswordOptions) {\n\t\tsuper(opts);\n\t\tthis._mask = mask ?? '•';\n\n\t\tthis.on('finalize', () => {\n\t\t\tthis.valueWithCursor = this.masked;\n\t\t});\n\t\tthis.on('value', () => {\n\t\t\tif (this.cursor >= this.value.length) {\n\t\t\t\tthis.valueWithCursor = `${this.masked}${color.inverse(color.hidden('_'))}`;\n\t\t\t} else {\n\t\t\t\tconst s1 = this.masked.slice(0, this.cursor);\n\t\t\t\tconst s2 = this.masked.slice(this.cursor);\n\t\t\t\tthis.valueWithCursor = `${s1}${color.inverse(s2[0])}${s2.slice(1)}`;\n\t\t\t}\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface SelectOptions extends PromptOptions> {\n\toptions: T[];\n\tinitialValue?: T['value'];\n}\nexport default class SelectPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tprivate get _value() {\n\t\treturn this.options[this.cursor];\n\t}\n\n\tprivate changeValue() {\n\t\tthis.value = this._value.value;\n\t}\n\n\tconstructor(opts: SelectOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tthis.cursor = this.options.findIndex(({ value }) => value === opts.initialValue);\n\t\tif (this.cursor === -1) this.cursor = 0;\n\t\tthis.changeValue();\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.changeValue();\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface SelectKeyOptions extends PromptOptions> {\n\toptions: T[];\n}\nexport default class SelectKeyPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tconstructor(opts: SelectKeyOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tconst keys = this.options.map(({ value: [initial] }) => initial?.toLowerCase());\n\t\tthis.cursor = Math.max(keys.indexOf(opts.initialValue), 0);\n\n\t\tthis.on('key', (key) => {\n\t\t\tif (!keys.includes(key)) return;\n\t\t\tconst value = this.options.find(({ value: [initial] }) => initial?.toLowerCase() === key);\n\t\t\tif (value) {\n\t\t\t\tthis.value = value.value;\n\t\t\t\tthis.state = 'submit';\n\t\t\t\tthis.emit('submit');\n\t\t\t}\n\t\t});\n\t}\n}\n","import color from 'picocolors';\nimport Prompt, { type PromptOptions } from './prompt';\n\nexport interface TextOptions extends PromptOptions {\n\tplaceholder?: string;\n\tdefaultValue?: string;\n}\n\nexport default class TextPrompt extends Prompt {\n\tget valueWithCursor() {\n\t\tif (this.state === 'submit') {\n\t\t\treturn this.value;\n\t\t}\n\t\tif (this.cursor >= this.value.length) {\n\t\t\treturn `${this.value}█`;\n\t\t}\n\t\tconst s1 = this.value.slice(0, this.cursor);\n\t\tconst [s2, ...s3] = this.value.slice(this.cursor);\n\t\treturn `${s1}${color.inverse(s2)}${s3.join('')}`;\n\t}\n\tget cursor() {\n\t\treturn this._cursor;\n\t}\n\tconstructor(opts: TextOptions) {\n\t\tsuper(opts);\n\n\t\tthis.on('finalize', () => {\n\t\t\tif (!this.value) {\n\t\t\t\tthis.value = opts.defaultValue;\n\t\t\t}\n\t\t});\n\t}\n}\n"],"names":["onlyFirst","pattern","string","eaw","module","character","x","y","codePoint","code","stringToArray","characters","len","i","text","start","end","result","eawLen","chars","char","charLen","options","emojiRegex","ambiguousCharacterWidth","width","offset","red","green","blue","codes","groupName","group","styleName","style","hex","matches","colorString","integer","remainder","value","uri","rows","word","columns","isInsideEscape","isInsideLinkEscape","visible","index","characterLength","words","last","returnValue","escapeCode","escapeUrl","lengths","rowLength","remainingColumns","breaksStartingThisLine","row","pre","groups","line","actions","updates","_key","key","alias","action","a","b","aLines","bLines","diff","isWindows","input","stdin","output","stdout","overwrite","hideCursor","rl","readline","clear","data","name","sequence","str","isActionKey","cursor","dx","dy","e","s","Prompt","trackValue","__publicField","render","signal","opts","event","params","cb","cbs","cleanup","subscriber","resolve","reject","CANCEL_SYMBOL","sink","WriteStream","chunk","encoding","done","setRawMode","settings","problem","lines","wrap","frame","diffLines","diffLine","erase","newLines","ConfirmPrompt","confirm","n","r","l","GroupMultiSelectPrompt","option","opt","o","item","groupedItems","v","selected","t","allSelected","PasswordPrompt","mask","color","s1","s2","SelectPrompt","SelectKeyPrompt","keys","initial","TextPrompt","s3"],"mappings":"yiBAAe,SAAS,UAAU,CAAC,UAAAA,EAAY,EAAK,EAAI,CAAA,EAAI,CAG3D,MAAMC,EAAU,CACf,0JACA,0DACF,EAAG,KAAK,GAAG,EAEV,OAAO,IAAI,OAAOA,EAASD,EAAY,OAAY,GAAG,CACv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,GAAQ,CACvB,GAAI,CAACgF,EAAK,SAAShF,CAAG,EAAG,OACzB,MAAM1B,EAAQ,KAAK,QAAQ,KAAK,CAAC,CAAE,MAAO,CAAC2G,CAAO,CAAE,IAAMA,GAAS,YAAY,IAAMjF,CAAG,EACpF1B,IACH,KAAK,MAAQA,EAAM,MACnB,KAAK,MAAQ,SACb,KAAK,KAAK,QAAQ,EAEpB,CAAC,CACF,CACD,CClBA,MAAqB4G,UAAmBtD,CAAO,CAC9C,IAAI,iBAAkB,CACrB,GAAI,KAAK,QAAU,SAClB,OAAO,KAAK,MAEb,GAAI,KAAK,QAAU,KAAK,MAAM,OAC7B,MAAO,GAAG,KAAK,KAAK,SAErB,MAAMgD,EAAK,KAAK,MAAM,MAAM,EAAG,KAAK,MAAM,EACpC,CAACC,EAAI,GAAGM,CAAE,EAAI,KAAK,MAAM,MAAM,KAAK,MAAM,EAChD,MAAO,GAAGP,CAAE,GAAGD,WAAM,QAAQE,CAAE,CAAC,GAAGM,EAAG,KAAK,EAAE,CAAC,EAC/C,CACA,IAAI,QAAS,CACZ,OAAO,KAAK,OACb,CACA,YAAYlD,EAAmB,CAC9B,MAAMA,CAAI,EAEV,KAAK,GAAG,WAAY,IAAM,CACpB,KAAK,QACT,KAAK,MAAQA,EAAK,aAEpB,CAAC,CACF,CACD","x_google_ignoreList":[0,1,2,3,4,5,6]} \ No newline at end of file diff --git a/node_modules/@clack/core/dist/index.d.cts b/node_modules/@clack/core/dist/index.d.cts new file mode 100644 index 0000000..c123716 --- /dev/null +++ b/node_modules/@clack/core/dist/index.d.cts @@ -0,0 +1,209 @@ +import { Readable, Writable } from 'node:stream'; + +declare const actions: readonly ["up", "down", "left", "right", "space", "enter", "cancel"]; +type Action = (typeof actions)[number]; +interface ClackSettings { + /** + * Set custom global aliases for the default actions. + * This will not overwrite existing aliases, it will only add new ones! + * + * @param aliases - An object that maps aliases to actions + * @default { k: 'up', j: 'down', h: 'left', l: 'right', '\x03': 'cancel', 'escape': 'cancel' } + */ + aliases: Record; +} +declare function updateSettings(updates: ClackSettings): void; + +/** + * The state of the prompt + */ +type ClackState = 'initial' | 'active' | 'cancel' | 'submit' | 'error'; +/** + * Typed event emitter for clack + */ +interface ClackEvents { + initial: (value?: any) => void; + active: (value?: any) => void; + cancel: (value?: any) => void; + submit: (value?: any) => void; + error: (value?: any) => void; + cursor: (key?: Action) => void; + key: (key?: string) => void; + value: (value?: string) => void; + confirm: (value?: boolean) => void; + finalize: () => void; +} + +interface PromptOptions { + render(this: Omit): string | undefined; + placeholder?: string; + initialValue?: any; + validate?: ((value: any) => string | Error | undefined) | undefined; + input?: Readable; + output?: Writable; + debug?: boolean; + signal?: AbortSignal; +} +declare class Prompt { + protected input: Readable; + protected output: Writable; + private _abortSignal?; + private rl; + private opts; + private _render; + private _track; + private _prevFrame; + private _subscribers; + protected _cursor: number; + state: ClackState; + error: string; + value: any; + constructor(options: PromptOptions, trackValue?: boolean); + /** + * Unsubscribe all listeners + */ + protected unsubscribe(): void; + /** + * Set a subscriber with opts + * @param event - The event name + */ + private setSubscriber; + /** + * Subscribe to an event + * @param event - The event name + * @param cb - The callback + */ + on(event: T, cb: ClackEvents[T]): void; + /** + * Subscribe to an event once + * @param event - The event name + * @param cb - The callback + */ + once(event: T, cb: ClackEvents[T]): void; + /** + * Emit an event with data + * @param event - The event name + * @param data - The data to pass to the callback + */ + emit(event: T, ...data: Parameters): void; + prompt(): Promise; + private onKeypress; + protected close(): void; + private restoreCursor; + private render; +} + +interface ConfirmOptions extends PromptOptions { + active: string; + inactive: string; + initialValue?: boolean; +} +declare class ConfirmPrompt extends Prompt { + get cursor(): 0 | 1; + private get _value(); + constructor(opts: ConfirmOptions); +} + +interface GroupMultiSelectOptions extends PromptOptions> { + options: Record; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class GroupMultiSelectPrompt extends Prompt { + options: (T & { + group: string | boolean; + })[]; + cursor: number; + getGroupItems(group: string): T[]; + isGroupSelected(group: string): boolean; + private toggleValue; + constructor(opts: GroupMultiSelectOptions); +} + +interface MultiSelectOptions extends PromptOptions> { + options: T[]; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class MultiSelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private toggleAll; + private toggleValue; + constructor(opts: MultiSelectOptions); +} + +interface PasswordOptions extends PromptOptions { + mask?: string; +} +declare class PasswordPrompt extends Prompt { + valueWithCursor: string; + private _mask; + get cursor(): number; + get masked(): any; + constructor({ mask, ...opts }: PasswordOptions); +} + +interface SelectOptions extends PromptOptions> { + options: T[]; + initialValue?: T['value']; +} +declare class SelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private changeValue; + constructor(opts: SelectOptions); +} + +interface SelectKeyOptions extends PromptOptions> { + options: T[]; +} +declare class SelectKeyPrompt extends Prompt { + options: T[]; + cursor: number; + constructor(opts: SelectKeyOptions); +} + +interface TextOptions extends PromptOptions { + placeholder?: string; + defaultValue?: string; +} +declare class TextPrompt extends Prompt { + get valueWithCursor(): any; + get cursor(): number; + constructor(opts: TextOptions); +} + +declare function isCancel(value: unknown): value is symbol; +declare function block({ input, output, overwrite, hideCursor, }?: { + input?: (NodeJS.ReadStream & { + fd: 0; + }) | undefined; + output?: (NodeJS.WriteStream & { + fd: 1; + }) | undefined; + overwrite?: boolean | undefined; + hideCursor?: boolean | undefined; +}): () => void; + +export { type ClackSettings, ConfirmPrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, type ClackState as State, TextPrompt, block, isCancel, updateSettings }; diff --git a/node_modules/@clack/core/dist/index.d.mts b/node_modules/@clack/core/dist/index.d.mts new file mode 100644 index 0000000..c123716 --- /dev/null +++ b/node_modules/@clack/core/dist/index.d.mts @@ -0,0 +1,209 @@ +import { Readable, Writable } from 'node:stream'; + +declare const actions: readonly ["up", "down", "left", "right", "space", "enter", "cancel"]; +type Action = (typeof actions)[number]; +interface ClackSettings { + /** + * Set custom global aliases for the default actions. + * This will not overwrite existing aliases, it will only add new ones! + * + * @param aliases - An object that maps aliases to actions + * @default { k: 'up', j: 'down', h: 'left', l: 'right', '\x03': 'cancel', 'escape': 'cancel' } + */ + aliases: Record; +} +declare function updateSettings(updates: ClackSettings): void; + +/** + * The state of the prompt + */ +type ClackState = 'initial' | 'active' | 'cancel' | 'submit' | 'error'; +/** + * Typed event emitter for clack + */ +interface ClackEvents { + initial: (value?: any) => void; + active: (value?: any) => void; + cancel: (value?: any) => void; + submit: (value?: any) => void; + error: (value?: any) => void; + cursor: (key?: Action) => void; + key: (key?: string) => void; + value: (value?: string) => void; + confirm: (value?: boolean) => void; + finalize: () => void; +} + +interface PromptOptions { + render(this: Omit): string | undefined; + placeholder?: string; + initialValue?: any; + validate?: ((value: any) => string | Error | undefined) | undefined; + input?: Readable; + output?: Writable; + debug?: boolean; + signal?: AbortSignal; +} +declare class Prompt { + protected input: Readable; + protected output: Writable; + private _abortSignal?; + private rl; + private opts; + private _render; + private _track; + private _prevFrame; + private _subscribers; + protected _cursor: number; + state: ClackState; + error: string; + value: any; + constructor(options: PromptOptions, trackValue?: boolean); + /** + * Unsubscribe all listeners + */ + protected unsubscribe(): void; + /** + * Set a subscriber with opts + * @param event - The event name + */ + private setSubscriber; + /** + * Subscribe to an event + * @param event - The event name + * @param cb - The callback + */ + on(event: T, cb: ClackEvents[T]): void; + /** + * Subscribe to an event once + * @param event - The event name + * @param cb - The callback + */ + once(event: T, cb: ClackEvents[T]): void; + /** + * Emit an event with data + * @param event - The event name + * @param data - The data to pass to the callback + */ + emit(event: T, ...data: Parameters): void; + prompt(): Promise; + private onKeypress; + protected close(): void; + private restoreCursor; + private render; +} + +interface ConfirmOptions extends PromptOptions { + active: string; + inactive: string; + initialValue?: boolean; +} +declare class ConfirmPrompt extends Prompt { + get cursor(): 0 | 1; + private get _value(); + constructor(opts: ConfirmOptions); +} + +interface GroupMultiSelectOptions extends PromptOptions> { + options: Record; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class GroupMultiSelectPrompt extends Prompt { + options: (T & { + group: string | boolean; + })[]; + cursor: number; + getGroupItems(group: string): T[]; + isGroupSelected(group: string): boolean; + private toggleValue; + constructor(opts: GroupMultiSelectOptions); +} + +interface MultiSelectOptions extends PromptOptions> { + options: T[]; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class MultiSelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private toggleAll; + private toggleValue; + constructor(opts: MultiSelectOptions); +} + +interface PasswordOptions extends PromptOptions { + mask?: string; +} +declare class PasswordPrompt extends Prompt { + valueWithCursor: string; + private _mask; + get cursor(): number; + get masked(): any; + constructor({ mask, ...opts }: PasswordOptions); +} + +interface SelectOptions extends PromptOptions> { + options: T[]; + initialValue?: T['value']; +} +declare class SelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private changeValue; + constructor(opts: SelectOptions); +} + +interface SelectKeyOptions extends PromptOptions> { + options: T[]; +} +declare class SelectKeyPrompt extends Prompt { + options: T[]; + cursor: number; + constructor(opts: SelectKeyOptions); +} + +interface TextOptions extends PromptOptions { + placeholder?: string; + defaultValue?: string; +} +declare class TextPrompt extends Prompt { + get valueWithCursor(): any; + get cursor(): number; + constructor(opts: TextOptions); +} + +declare function isCancel(value: unknown): value is symbol; +declare function block({ input, output, overwrite, hideCursor, }?: { + input?: (NodeJS.ReadStream & { + fd: 0; + }) | undefined; + output?: (NodeJS.WriteStream & { + fd: 1; + }) | undefined; + overwrite?: boolean | undefined; + hideCursor?: boolean | undefined; +}): () => void; + +export { type ClackSettings, ConfirmPrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, type ClackState as State, TextPrompt, block, isCancel, updateSettings }; diff --git a/node_modules/@clack/core/dist/index.d.ts b/node_modules/@clack/core/dist/index.d.ts new file mode 100644 index 0000000..c123716 --- /dev/null +++ b/node_modules/@clack/core/dist/index.d.ts @@ -0,0 +1,209 @@ +import { Readable, Writable } from 'node:stream'; + +declare const actions: readonly ["up", "down", "left", "right", "space", "enter", "cancel"]; +type Action = (typeof actions)[number]; +interface ClackSettings { + /** + * Set custom global aliases for the default actions. + * This will not overwrite existing aliases, it will only add new ones! + * + * @param aliases - An object that maps aliases to actions + * @default { k: 'up', j: 'down', h: 'left', l: 'right', '\x03': 'cancel', 'escape': 'cancel' } + */ + aliases: Record; +} +declare function updateSettings(updates: ClackSettings): void; + +/** + * The state of the prompt + */ +type ClackState = 'initial' | 'active' | 'cancel' | 'submit' | 'error'; +/** + * Typed event emitter for clack + */ +interface ClackEvents { + initial: (value?: any) => void; + active: (value?: any) => void; + cancel: (value?: any) => void; + submit: (value?: any) => void; + error: (value?: any) => void; + cursor: (key?: Action) => void; + key: (key?: string) => void; + value: (value?: string) => void; + confirm: (value?: boolean) => void; + finalize: () => void; +} + +interface PromptOptions { + render(this: Omit): string | undefined; + placeholder?: string; + initialValue?: any; + validate?: ((value: any) => string | Error | undefined) | undefined; + input?: Readable; + output?: Writable; + debug?: boolean; + signal?: AbortSignal; +} +declare class Prompt { + protected input: Readable; + protected output: Writable; + private _abortSignal?; + private rl; + private opts; + private _render; + private _track; + private _prevFrame; + private _subscribers; + protected _cursor: number; + state: ClackState; + error: string; + value: any; + constructor(options: PromptOptions, trackValue?: boolean); + /** + * Unsubscribe all listeners + */ + protected unsubscribe(): void; + /** + * Set a subscriber with opts + * @param event - The event name + */ + private setSubscriber; + /** + * Subscribe to an event + * @param event - The event name + * @param cb - The callback + */ + on(event: T, cb: ClackEvents[T]): void; + /** + * Subscribe to an event once + * @param event - The event name + * @param cb - The callback + */ + once(event: T, cb: ClackEvents[T]): void; + /** + * Emit an event with data + * @param event - The event name + * @param data - The data to pass to the callback + */ + emit(event: T, ...data: Parameters): void; + prompt(): Promise; + private onKeypress; + protected close(): void; + private restoreCursor; + private render; +} + +interface ConfirmOptions extends PromptOptions { + active: string; + inactive: string; + initialValue?: boolean; +} +declare class ConfirmPrompt extends Prompt { + get cursor(): 0 | 1; + private get _value(); + constructor(opts: ConfirmOptions); +} + +interface GroupMultiSelectOptions extends PromptOptions> { + options: Record; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class GroupMultiSelectPrompt extends Prompt { + options: (T & { + group: string | boolean; + })[]; + cursor: number; + getGroupItems(group: string): T[]; + isGroupSelected(group: string): boolean; + private toggleValue; + constructor(opts: GroupMultiSelectOptions); +} + +interface MultiSelectOptions extends PromptOptions> { + options: T[]; + initialValues?: T['value'][]; + required?: boolean; + cursorAt?: T['value']; +} +declare class MultiSelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private toggleAll; + private toggleValue; + constructor(opts: MultiSelectOptions); +} + +interface PasswordOptions extends PromptOptions { + mask?: string; +} +declare class PasswordPrompt extends Prompt { + valueWithCursor: string; + private _mask; + get cursor(): number; + get masked(): any; + constructor({ mask, ...opts }: PasswordOptions); +} + +interface SelectOptions extends PromptOptions> { + options: T[]; + initialValue?: T['value']; +} +declare class SelectPrompt extends Prompt { + options: T[]; + cursor: number; + private get _value(); + private changeValue; + constructor(opts: SelectOptions); +} + +interface SelectKeyOptions extends PromptOptions> { + options: T[]; +} +declare class SelectKeyPrompt extends Prompt { + options: T[]; + cursor: number; + constructor(opts: SelectKeyOptions); +} + +interface TextOptions extends PromptOptions { + placeholder?: string; + defaultValue?: string; +} +declare class TextPrompt extends Prompt { + get valueWithCursor(): any; + get cursor(): number; + constructor(opts: TextOptions); +} + +declare function isCancel(value: unknown): value is symbol; +declare function block({ input, output, overwrite, hideCursor, }?: { + input?: (NodeJS.ReadStream & { + fd: 0; + }) | undefined; + output?: (NodeJS.WriteStream & { + fd: 1; + }) | undefined; + overwrite?: boolean | undefined; + hideCursor?: boolean | undefined; +}): () => void; + +export { type ClackSettings, ConfirmPrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, type ClackState as State, TextPrompt, block, isCancel, updateSettings }; diff --git a/node_modules/@clack/core/dist/index.mjs b/node_modules/@clack/core/dist/index.mjs new file mode 100644 index 0000000..978dc06 --- /dev/null +++ b/node_modules/@clack/core/dist/index.mjs @@ -0,0 +1,15 @@ +import{cursor as l,erase as b}from"sisteransi";import{stdin as $,stdout as j}from"node:process";import*as f from"node:readline";import M from"node:readline";import{WriteStream as U}from"node:tty";import g from"picocolors";function J({onlyFirst:t=!1}={}){const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(F,t?void 0:"g")}const Q=J();function T(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Q,"")}function O(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var P={exports:{}};(function(t){var u={};t.exports=u,u.eastAsianWidth=function(e){var s=e.charCodeAt(0),i=e.length==2?e.charCodeAt(1):0,D=s;return 55296<=s&&s<=56319&&56320<=i&&i<=57343&&(s&=1023,i&=1023,D=s<<10|i,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(e){var s=this.eastAsianWidth(e);return s=="F"||s=="W"||s=="A"?2:1};function F(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(e){for(var s=F(e),i=0,D=0;D=s-(n==2?1:0))if(C+n<=i)D+=a;else break;C+=n}return D}})(P);var X=P.exports;const DD=O(X);var uD=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\u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BD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200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A]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const FD=O(uD);function A(t,u={}){if(typeof t!="string"||t.length===0||(u={ambiguousIsNarrow:!0,...u},t=T(t),t.length===0))return 0;t=t.replace(FD()," ");const F=u.ambiguousIsNarrow?1:2;let e=0;for(const s of t){const i=s.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(DD.eastAsianWidth(s)){case"F":case"W":e+=2;break;case"A":e+=F;break;default:e+=1}}return e}const m=10,L=(t=0)=>u=>`\x1B[${u+t}m`,N=(t=0)=>u=>`\x1B[${38+t};5;${u}m`,I=(t=0)=>(u,F,e)=>`\x1B[${38+t};2;${u};${F};${e}m`,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(r.modifier);const tD=Object.keys(r.color),eD=Object.keys(r.bgColor);[...tD,...eD];function sD(){const t=new Map;for(const[u,F]of Object.entries(r)){for(const[e,s]of Object.entries(F))r[e]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},F[e]=r[e],t.set(s[0],s[1]);Object.defineProperty(r,u,{value:F,enumerable:!1})}return Object.defineProperty(r,"codes",{value:t,enumerable:!1}),r.color.close="\x1B[39m",r.bgColor.close="\x1B[49m",r.color.ansi=L(),r.color.ansi256=N(),r.color.ansi16m=I(),r.bgColor.ansi=L(m),r.bgColor.ansi256=N(m),r.bgColor.ansi16m=I(m),Object.defineProperties(r,{rgbToAnsi256:{value:(u,F,e)=>u===F&&F===e?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:u=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[e]=F;e.length===3&&(e=[...e].map(i=>i+i).join(""));const s=Number.parseInt(e,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:u=>r.rgbToAnsi256(...r.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,e,s;if(u>=232)F=((u-232)*10+8)/255,e=F,s=F;else{u-=16;const C=u%36;F=Math.floor(u/36)/5,e=Math.floor(C/6)/5,s=C%6/5}const i=Math.max(F,e,s)*2;if(i===0)return 30;let D=30+(Math.round(s)<<2|Math.round(e)<<1|Math.round(F));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,F,e)=>r.ansi256ToAnsi(r.rgbToAnsi256(u,F,e)),enumerable:!1},hexToAnsi:{value:u=>r.ansi256ToAnsi(r.hexToAnsi256(u)),enumerable:!1}}),r}const iD=sD(),v=new Set(["\x1B","\x9B"]),CD=39,w="\x07",W="[",rD="]",R="m",y=`${rD}8;;`,V=t=>`${v.values().next().value}${W}${t}${R}`,z=t=>`${v.values().next().value}${y}${t}${w}`,ED=t=>t.split(" ").map(u=>A(u)),_=(t,u,F)=>{const e=[...u];let s=!1,i=!1,D=A(T(t[t.length-1]));for(const[C,o]of e.entries()){const E=A(o);if(D+E<=F?t[t.length-1]+=o:(t.push(o),D=0),v.has(o)&&(s=!0,i=e.slice(C+1).join("").startsWith(y)),s){i?o===w&&(s=!1,i=!1):o===R&&(s=!1);continue}D+=E,D===F&&C0&&t.length>1&&(t[t.length-2]+=t.pop())},nD=t=>{const u=t.split(" ");let F=u.length;for(;F>0&&!(A(u[F-1])>0);)F--;return F===u.length?t:u.slice(0,F).join(" ")+u.slice(F).join("")},oD=(t,u,F={})=>{if(F.trim!==!1&&t.trim()==="")return"";let e="",s,i;const D=ED(t);let C=[""];for(const[E,a]of t.split(" ").entries()){F.trim!==!1&&(C[C.length-1]=C[C.length-1].trimStart());let n=A(C[C.length-1]);if(E!==0&&(n>=u&&(F.wordWrap===!1||F.trim===!1)&&(C.push(""),n=0),(n>0||F.trim===!1)&&(C[C.length-1]+=" ",n++)),F.hard&&D[E]>u){const B=u-n,p=1+Math.floor((D[E]-B-1)/u);Math.floor((D[E]-1)/u)u&&n>0&&D[E]>0){if(F.wordWrap===!1&&nu&&F.wordWrap===!1){_(C,a,u);continue}C[C.length-1]+=a}F.trim!==!1&&(C=C.map(E=>nD(E)));const o=[...C.join(` +`)];for(const[E,a]of o.entries()){if(e+=a,v.has(a)){const{groups:B}=new RegExp(`(?:\\${W}(?\\d+)m|\\${y}(?.*)${w})`).exec(o.slice(E).join(""))||{groups:{}};if(B.code!==void 0){const p=Number.parseFloat(B.code);s=p===CD?void 0:p}else B.uri!==void 0&&(i=B.uri.length===0?void 0:B.uri)}const n=iD.codes.get(Number(s));o[E+1]===` +`?(i&&(e+=z("")),s&&n&&(e+=V(n))):a===` +`&&(s&&n&&(e+=V(s)),i&&(e+=z(i)))}return e};function G(t,u,F){return String(t).normalize().replace(/\r\n/g,` +`).split(` +`).map(e=>oD(e,u,F)).join(` +`)}const aD=["up","down","left","right","space","enter","cancel"],c={actions:new Set(aD),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function hD(t){for(const u in t){const F=u;if(!Object.hasOwn(t,F))continue;const e=t[F];switch(F){case"aliases":{for(const s in e)Object.hasOwn(e,s)&&(c.aliases.has(s)||c.aliases.set(s,e[s]));break}}}}function k(t,u){if(typeof t=="string")return c.aliases.get(t)===u;for(const F of t)if(F!==void 0&&k(F,u))return!0;return!1}function lD(t,u){if(t===u)return;const F=t.split(` +`),e=u.split(` +`),s=[];for(let i=0;i{const E=String(D);if(k([E,C,o],"cancel")){e&&u.write(l.show),process.exit(0);return}if(!F)return;const a=C==="return"?0:-1,n=C==="return"?-1:0;f.moveCursor(u,a,n,()=>{f.clearLine(u,1,()=>{t.once("keypress",i)})})};return e&&u.write(l.hide),t.once("keypress",i),()=>{t.off("keypress",i),e&&u.write(l.show),t.isTTY&&!xD&&t.setRawMode(!1),s.terminal=!1,s.close()}}var AD=Object.defineProperty,pD=(t,u,F)=>u in t?AD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,h=(t,u,F)=>(pD(t,typeof u!="symbol"?u+"":u,F),F);class x{constructor(u,F=!0){h(this,"input"),h(this,"output"),h(this,"_abortSignal"),h(this,"rl"),h(this,"opts"),h(this,"_render"),h(this,"_track",!1),h(this,"_prevFrame",""),h(this,"_subscribers",new Map),h(this,"_cursor",0),h(this,"state","initial"),h(this,"error",""),h(this,"value");const{input:e=$,output:s=j,render:i,signal:D,...C}=u;this.opts=C,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=F,this._abortSignal=D,this.input=e,this.output=s}unsubscribe(){this._subscribers.clear()}setSubscriber(u,F){const e=this._subscribers.get(u)??[];e.push(F),this._subscribers.set(u,e)}on(u,F){this.setSubscriber(u,{cb:F})}once(u,F){this.setSubscriber(u,{cb:F,once:!0})}emit(u,...F){const e=this._subscribers.get(u)??[],s=[];for(const i of e)i.cb(...F),i.once&&s.push(()=>e.splice(e.indexOf(i),1));for(const i of s)i()}prompt(){return new Promise((u,F)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),u(S);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const e=new U(0);e._write=(s,i,D)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),D()},this.input.pipe(e),this.rl=M.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),M.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),d(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(l.show),this.output.off("resize",this.render),d(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(l.show),this.output.off("resize",this.render),d(this.input,!1),u(S)})})}onKeypress(u,F){if(this.state==="error"&&(this.state="active"),F?.name&&(!this._track&&c.aliases.has(F.name)&&this.emit("cursor",c.aliases.get(F.name)),c.actions.has(F.name)&&this.emit("cursor",F.name)),u&&(u.toLowerCase()==="y"||u.toLowerCase()==="n")&&this.emit("confirm",u.toLowerCase()==="y"),u===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),u&&this.emit("key",u.toLowerCase()),F?.name==="return"){if(this.opts.validate){const e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}k([u,F?.name,F?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(` +`),d(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const u=G(this._prevFrame,process.stdout.columns,{hard:!0}).split(` +`).length-1;this.output.write(l.move(-999,u*-1))}render(){const u=G(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if(this.state==="initial")this.output.write(l.hide);else{const F=lD(this._prevFrame,u);if(this.restoreCursor(),F&&F?.length===1){const e=F[0];this.output.write(l.move(0,e)),this.output.write(b.lines(1));const s=u.split(` +`);this.output.write(s[e]),this._prevFrame=u,this.output.write(l.move(0,s.length-e-1));return}if(F&&F?.length>1){const e=F[0];this.output.write(l.move(0,e)),this.output.write(b.down());const s=u.split(` +`).slice(e);this.output.write(s.join(` +`)),this._prevFrame=u;return}this.output.write(b.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}}class fD extends x{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",F=>{this.output.write(l.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var gD=Object.defineProperty,vD=(t,u,F)=>u in t?gD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,K=(t,u,F)=>(vD(t,typeof u!="symbol"?u+"":u,F),F);let dD=class extends x{constructor(u){super(u,!1),K(this,"options"),K(this,"cursor",0);const{options:F}=u;this.options=Object.entries(F).flatMap(([e,s])=>[{value:e,group:!0,label:e},...s.map(i=>({...i,group:e}))]),this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===u.cursorAt),0),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}getGroupItems(u){return this.options.filter(F=>F.group===u)}isGroupSelected(u){return this.getGroupItems(u).every(F=>this.value.includes(F.value))}toggleValue(){const u=this.options[this.cursor];if(u.group===!0){const F=u.value,e=this.getGroupItems(F);this.isGroupSelected(F)?this.value=this.value.filter(s=>e.findIndex(i=>i.value===s)===-1):this.value=[...this.value,...e.map(s=>s.value)],this.value=Array.from(new Set(this.value))}else{const F=this.value.includes(u.value);this.value=F?this.value.filter(e=>e!==u.value):[...this.value,u.value]}}};var bD=Object.defineProperty,mD=(t,u,F)=>u in t?bD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,Y=(t,u,F)=>(mD(t,typeof u!="symbol"?u+"":u,F),F);let wD=class extends x{constructor(u){super(u,!1),Y(this,"options"),Y(this,"cursor",0),this.options=u.options,this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===u.cursorAt),0),this.on("key",F=>{F==="a"&&this.toggleAll()}),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){const u=this.value.length===this.options.length;this.value=u?[]:this.options.map(F=>F.value)}toggleValue(){const u=this.value.includes(this._value);this.value=u?this.value.filter(F=>F!==this._value):[...this.value,this._value]}};var yD=Object.defineProperty,_D=(t,u,F)=>u in t?yD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,Z=(t,u,F)=>(_D(t,typeof u!="symbol"?u+"":u,F),F);class kD extends x{constructor({mask:u,...F}){super(F),Z(this,"valueWithCursor",""),Z(this,"_mask","\u2022"),this._mask=u??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${g.inverse(g.hidden("_"))}`;else{const e=this.masked.slice(0,this.cursor),s=this.masked.slice(this.cursor);this.valueWithCursor=`${e}${g.inverse(s[0])}${s.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}}var SD=Object.defineProperty,$D=(t,u,F)=>u in t?SD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,q=(t,u,F)=>($D(t,typeof u!="symbol"?u+"":u,F),F);class jD extends x{constructor(u){super(u,!1),q(this,"options"),q(this,"cursor",0),this.options=u.options,this.cursor=this.options.findIndex(({value:F})=>F===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",F=>{switch(F){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}var MD=Object.defineProperty,TD=(t,u,F)=>u in t?MD(t,u,{enumerable:!0,configurable:!0,writable:!0,value:F}):t[u]=F,H=(t,u,F)=>(TD(t,typeof u!="symbol"?u+"":u,F),F);class OD extends x{constructor(u){super(u,!1),H(this,"options"),H(this,"cursor",0),this.options=u.options;const F=this.options.map(({value:[e]})=>e?.toLowerCase());this.cursor=Math.max(F.indexOf(u.initialValue),0),this.on("key",e=>{if(!F.includes(e))return;const s=this.options.find(({value:[i]})=>i?.toLowerCase()===e);s&&(this.value=s.value,this.state="submit",this.emit("submit"))})}}class PD extends x{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const u=this.value.slice(0,this.cursor),[F,...e]=this.value.slice(this.cursor);return`${u}${g.inverse(F)}${e.join("")}`}get cursor(){return this._cursor}constructor(u){super(u),this.on("finalize",()=>{this.value||(this.value=u.defaultValue)})}}export{fD as ConfirmPrompt,dD as GroupMultiSelectPrompt,wD as MultiSelectPrompt,kD as PasswordPrompt,x as Prompt,OD as SelectKeyPrompt,jD as SelectPrompt,PD as TextPrompt,cD as block,BD as isCancel,hD as updateSettings}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/@clack/core/dist/index.mjs.map b/node_modules/@clack/core/dist/index.mjs.map new file mode 100644 index 0000000..069d7d3 --- /dev/null +++ b/node_modules/@clack/core/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js","../../../node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js","../../../node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js","../../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js","../../../node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js","../src/utils/settings.ts","../src/utils/string.ts","../src/utils/index.ts","../src/prompts/prompt.ts","../src/prompts/confirm.ts","../src/prompts/group-multiselect.ts","../src/prompts/multi-select.ts","../src/prompts/password.ts","../src/prompts/select.ts","../src/prompts/select-key.ts","../src/prompts/text.ts"],"sourcesContent":["export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\tconst pattern = [\n\t\t`[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?${ST})`,\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))',\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","var eaw = {};\n\nif ('undefined' == typeof module) {\n window.eastasianwidth = eaw;\n} else {\n module.exports = eaw;\n}\n\neaw.eastAsianWidth = function(character) {\n var x = character.charCodeAt(0);\n var y = (character.length == 2) ? character.charCodeAt(1) : 0;\n var codePoint = x;\n if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {\n x &= 0x3FF;\n y &= 0x3FF;\n codePoint = (x << 10) | y;\n codePoint += 0x10000;\n }\n\n if ((0x3000 == codePoint) ||\n (0xFF01 <= codePoint && codePoint <= 0xFF60) ||\n (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) {\n return 'F';\n }\n if ((0x20A9 == codePoint) ||\n (0xFF61 <= codePoint && codePoint <= 0xFFBE) ||\n (0xFFC2 <= codePoint && codePoint <= 0xFFC7) ||\n (0xFFCA <= codePoint && codePoint <= 0xFFCF) ||\n (0xFFD2 <= codePoint && codePoint <= 0xFFD7) ||\n (0xFFDA <= codePoint && codePoint <= 0xFFDC) ||\n (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) {\n return 'H';\n }\n if ((0x1100 <= codePoint && codePoint <= 0x115F) ||\n (0x11A3 <= codePoint && codePoint <= 0x11A7) ||\n (0x11FA <= codePoint && codePoint <= 0x11FF) ||\n (0x2329 <= codePoint && codePoint <= 0x232A) ||\n (0x2E80 <= codePoint && codePoint <= 0x2E99) ||\n (0x2E9B <= codePoint && codePoint <= 0x2EF3) ||\n (0x2F00 <= codePoint && codePoint <= 0x2FD5) ||\n (0x2FF0 <= codePoint && codePoint <= 0x2FFB) ||\n (0x3001 <= codePoint && codePoint <= 0x303E) ||\n (0x3041 <= codePoint && codePoint <= 0x3096) ||\n (0x3099 <= codePoint && codePoint <= 0x30FF) ||\n (0x3105 <= codePoint && codePoint <= 0x312D) ||\n (0x3131 <= codePoint && codePoint <= 0x318E) ||\n (0x3190 <= codePoint && codePoint <= 0x31BA) ||\n (0x31C0 <= codePoint && codePoint <= 0x31E3) ||\n (0x31F0 <= codePoint && codePoint <= 0x321E) ||\n (0x3220 <= codePoint && codePoint <= 0x3247) ||\n (0x3250 <= codePoint && codePoint <= 0x32FE) ||\n (0x3300 <= codePoint && codePoint <= 0x4DBF) ||\n (0x4E00 <= codePoint && codePoint <= 0xA48C) ||\n (0xA490 <= codePoint && codePoint <= 0xA4C6) ||\n (0xA960 <= codePoint && codePoint <= 0xA97C) ||\n (0xAC00 <= codePoint && codePoint <= 0xD7A3) ||\n (0xD7B0 <= codePoint && codePoint <= 0xD7C6) ||\n (0xD7CB <= codePoint && codePoint <= 0xD7FB) ||\n (0xF900 <= codePoint && codePoint <= 0xFAFF) ||\n (0xFE10 <= codePoint && codePoint <= 0xFE19) ||\n (0xFE30 <= codePoint && codePoint <= 0xFE52) ||\n (0xFE54 <= codePoint && codePoint <= 0xFE66) ||\n (0xFE68 <= codePoint && codePoint <= 0xFE6B) ||\n (0x1B000 <= codePoint && codePoint <= 0x1B001) ||\n (0x1F200 <= codePoint && codePoint <= 0x1F202) ||\n (0x1F210 <= codePoint && codePoint <= 0x1F23A) ||\n (0x1F240 <= codePoint && codePoint <= 0x1F248) ||\n (0x1F250 <= codePoint && codePoint <= 0x1F251) ||\n (0x20000 <= codePoint && codePoint <= 0x2F73F) ||\n (0x2B740 <= codePoint && codePoint <= 0x2FFFD) ||\n (0x30000 <= codePoint && codePoint <= 0x3FFFD)) {\n return 'W';\n }\n if ((0x0020 <= codePoint && codePoint <= 0x007E) ||\n (0x00A2 <= codePoint && codePoint <= 0x00A3) ||\n (0x00A5 <= codePoint && codePoint <= 0x00A6) ||\n (0x00AC == codePoint) ||\n (0x00AF == codePoint) ||\n (0x27E6 <= codePoint && codePoint <= 0x27ED) ||\n (0x2985 <= codePoint && codePoint <= 0x2986)) {\n return 'Na';\n }\n if ((0x00A1 == codePoint) ||\n (0x00A4 == codePoint) ||\n (0x00A7 <= codePoint && codePoint <= 0x00A8) ||\n (0x00AA == codePoint) ||\n (0x00AD <= codePoint && codePoint <= 0x00AE) ||\n (0x00B0 <= codePoint && codePoint <= 0x00B4) ||\n (0x00B6 <= codePoint && codePoint <= 0x00BA) ||\n (0x00BC <= codePoint && codePoint <= 0x00BF) ||\n (0x00C6 == codePoint) ||\n (0x00D0 == codePoint) ||\n (0x00D7 <= codePoint && codePoint <= 0x00D8) ||\n (0x00DE <= codePoint && codePoint <= 0x00E1) ||\n (0x00E6 == codePoint) ||\n (0x00E8 <= codePoint && codePoint <= 0x00EA) ||\n (0x00EC <= codePoint && codePoint <= 0x00ED) ||\n (0x00F0 == codePoint) ||\n (0x00F2 <= codePoint && codePoint <= 0x00F3) ||\n (0x00F7 <= codePoint && codePoint <= 0x00FA) ||\n (0x00FC == codePoint) ||\n (0x00FE == codePoint) ||\n (0x0101 == codePoint) ||\n (0x0111 == codePoint) ||\n (0x0113 == codePoint) ||\n (0x011B == codePoint) ||\n (0x0126 <= codePoint && codePoint <= 0x0127) ||\n (0x012B == codePoint) ||\n (0x0131 <= codePoint && codePoint <= 0x0133) ||\n (0x0138 == codePoint) ||\n (0x013F <= codePoint && codePoint <= 0x0142) ||\n (0x0144 == codePoint) ||\n (0x0148 <= codePoint && codePoint <= 0x014B) ||\n (0x014D == codePoint) ||\n (0x0152 <= codePoint && codePoint <= 0x0153) ||\n (0x0166 <= codePoint && codePoint <= 0x0167) ||\n (0x016B == codePoint) ||\n (0x01CE == codePoint) ||\n (0x01D0 == codePoint) ||\n (0x01D2 == codePoint) ||\n (0x01D4 == codePoint) ||\n (0x01D6 == codePoint) ||\n (0x01D8 == codePoint) ||\n (0x01DA == codePoint) ||\n (0x01DC == codePoint) ||\n (0x0251 == codePoint) ||\n (0x0261 == codePoint) ||\n (0x02C4 == codePoint) ||\n (0x02C7 == codePoint) ||\n (0x02C9 <= codePoint && codePoint <= 0x02CB) ||\n (0x02CD == codePoint) ||\n (0x02D0 == codePoint) ||\n (0x02D8 <= codePoint && codePoint <= 0x02DB) ||\n (0x02DD == codePoint) ||\n (0x02DF == codePoint) ||\n (0x0300 <= codePoint && codePoint <= 0x036F) ||\n (0x0391 <= codePoint && codePoint <= 0x03A1) ||\n (0x03A3 <= codePoint && codePoint <= 0x03A9) ||\n (0x03B1 <= codePoint && codePoint <= 0x03C1) ||\n (0x03C3 <= codePoint && codePoint <= 0x03C9) ||\n (0x0401 == codePoint) ||\n (0x0410 <= codePoint && codePoint <= 0x044F) ||\n (0x0451 == codePoint) ||\n (0x2010 == codePoint) ||\n (0x2013 <= codePoint && codePoint <= 0x2016) ||\n (0x2018 <= codePoint && codePoint <= 0x2019) ||\n (0x201C <= codePoint && codePoint <= 0x201D) ||\n (0x2020 <= codePoint && codePoint <= 0x2022) ||\n (0x2024 <= codePoint && codePoint <= 0x2027) ||\n (0x2030 == codePoint) ||\n (0x2032 <= codePoint && codePoint <= 0x2033) ||\n (0x2035 == codePoint) ||\n (0x203B == codePoint) ||\n (0x203E == codePoint) ||\n (0x2074 == codePoint) ||\n (0x207F == codePoint) ||\n (0x2081 <= codePoint && codePoint <= 0x2084) ||\n (0x20AC == codePoint) ||\n (0x2103 == codePoint) ||\n (0x2105 == codePoint) ||\n (0x2109 == codePoint) ||\n (0x2113 == codePoint) ||\n (0x2116 == codePoint) ||\n (0x2121 <= codePoint && codePoint <= 0x2122) ||\n (0x2126 == codePoint) ||\n (0x212B == codePoint) ||\n (0x2153 <= codePoint && codePoint <= 0x2154) ||\n (0x215B <= codePoint && codePoint <= 0x215E) ||\n (0x2160 <= codePoint && codePoint <= 0x216B) ||\n (0x2170 <= codePoint && codePoint <= 0x2179) ||\n (0x2189 == codePoint) ||\n (0x2190 <= codePoint && codePoint <= 0x2199) ||\n (0x21B8 <= codePoint && codePoint <= 0x21B9) ||\n (0x21D2 == codePoint) ||\n (0x21D4 == codePoint) ||\n (0x21E7 == codePoint) ||\n (0x2200 == codePoint) ||\n (0x2202 <= codePoint && codePoint <= 0x2203) ||\n (0x2207 <= codePoint && codePoint <= 0x2208) ||\n (0x220B == codePoint) ||\n (0x220F == codePoint) ||\n (0x2211 == codePoint) ||\n (0x2215 == codePoint) ||\n (0x221A == codePoint) ||\n (0x221D <= codePoint && codePoint <= 0x2220) ||\n (0x2223 == codePoint) ||\n (0x2225 == codePoint) ||\n (0x2227 <= codePoint && codePoint <= 0x222C) ||\n (0x222E == codePoint) ||\n (0x2234 <= codePoint && codePoint <= 0x2237) ||\n (0x223C <= codePoint && codePoint <= 0x223D) ||\n (0x2248 == codePoint) ||\n (0x224C == codePoint) ||\n (0x2252 == codePoint) ||\n (0x2260 <= codePoint && codePoint <= 0x2261) ||\n (0x2264 <= codePoint && codePoint <= 0x2267) ||\n (0x226A <= codePoint && codePoint <= 0x226B) ||\n (0x226E <= codePoint && codePoint <= 0x226F) ||\n (0x2282 <= codePoint && codePoint <= 0x2283) ||\n (0x2286 <= codePoint && codePoint <= 0x2287) ||\n (0x2295 == codePoint) ||\n (0x2299 == codePoint) ||\n (0x22A5 == codePoint) ||\n (0x22BF == codePoint) ||\n (0x2312 == codePoint) ||\n (0x2460 <= codePoint && codePoint <= 0x24E9) ||\n (0x24EB <= codePoint && codePoint <= 0x254B) ||\n (0x2550 <= codePoint && codePoint <= 0x2573) ||\n (0x2580 <= codePoint && codePoint <= 0x258F) ||\n (0x2592 <= codePoint && codePoint <= 0x2595) ||\n (0x25A0 <= codePoint && codePoint <= 0x25A1) ||\n (0x25A3 <= codePoint && codePoint <= 0x25A9) ||\n (0x25B2 <= codePoint && codePoint <= 0x25B3) ||\n (0x25B6 <= codePoint && codePoint <= 0x25B7) ||\n (0x25BC <= codePoint && codePoint <= 0x25BD) ||\n (0x25C0 <= codePoint && codePoint <= 0x25C1) ||\n (0x25C6 <= codePoint && codePoint <= 0x25C8) ||\n (0x25CB == codePoint) ||\n (0x25CE <= codePoint && codePoint <= 0x25D1) ||\n (0x25E2 <= codePoint && codePoint <= 0x25E5) ||\n (0x25EF == codePoint) ||\n (0x2605 <= codePoint && codePoint <= 0x2606) ||\n (0x2609 == codePoint) ||\n (0x260E <= codePoint && codePoint <= 0x260F) ||\n (0x2614 <= codePoint && codePoint <= 0x2615) ||\n (0x261C == codePoint) ||\n (0x261E == codePoint) ||\n (0x2640 == codePoint) ||\n (0x2642 == codePoint) ||\n (0x2660 <= codePoint && codePoint <= 0x2661) ||\n (0x2663 <= codePoint && codePoint <= 0x2665) ||\n (0x2667 <= codePoint && codePoint <= 0x266A) ||\n (0x266C <= codePoint && codePoint <= 0x266D) ||\n (0x266F == codePoint) ||\n (0x269E <= codePoint && codePoint <= 0x269F) ||\n (0x26BE <= codePoint && codePoint <= 0x26BF) ||\n (0x26C4 <= codePoint && codePoint <= 0x26CD) ||\n (0x26CF <= codePoint && codePoint <= 0x26E1) ||\n (0x26E3 == codePoint) ||\n (0x26E8 <= codePoint && codePoint <= 0x26FF) ||\n (0x273D == codePoint) ||\n (0x2757 == codePoint) ||\n (0x2776 <= codePoint && codePoint <= 0x277F) ||\n (0x2B55 <= codePoint && codePoint <= 0x2B59) ||\n (0x3248 <= codePoint && codePoint <= 0x324F) ||\n (0xE000 <= codePoint && codePoint <= 0xF8FF) ||\n (0xFE00 <= codePoint && codePoint <= 0xFE0F) ||\n (0xFFFD == codePoint) ||\n (0x1F100 <= codePoint && codePoint <= 0x1F10A) ||\n (0x1F110 <= codePoint && codePoint <= 0x1F12D) ||\n (0x1F130 <= codePoint && codePoint <= 0x1F169) ||\n (0x1F170 <= codePoint && codePoint <= 0x1F19A) ||\n (0xE0100 <= codePoint && codePoint <= 0xE01EF) ||\n (0xF0000 <= codePoint && codePoint <= 0xFFFFD) ||\n (0x100000 <= codePoint && codePoint <= 0x10FFFD)) {\n return 'A';\n }\n\n return 'N';\n};\n\neaw.characterLength = function(character) {\n var code = this.eastAsianWidth(character);\n if (code == 'F' || code == 'W' || code == 'A') {\n return 2;\n } else {\n return 1;\n }\n};\n\n// Split a string considering surrogate-pairs.\nfunction stringToArray(string) {\n return string.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\uD800-\\uDFFF]/g) || [];\n}\n\neaw.length = function(string) {\n var characters = stringToArray(string);\n var len = 0;\n for (var i = 0; i < characters.length; i++) {\n len = len + this.characterLength(characters[i]);\n }\n return len;\n};\n\neaw.slice = function(text, start, end) {\n textLen = eaw.length(text)\n start = start ? start : 0;\n end = end ? end : 1;\n if (start < 0) {\n start = textLen + start;\n }\n if (end < 0) {\n end = textLen + end;\n }\n var result = '';\n var eawLen = 0;\n var chars = stringToArray(text);\n for (var i = 0; i < chars.length; i++) {\n var char = chars[i];\n var charLen = eaw.length(char);\n if (eawLen >= start - (charLen == 2 ? 1 : 0)) {\n if (eawLen + charLen <= end) {\n result += char;\n } else {\n break;\n }\n }\n eawLen += charLen;\n }\n return result;\n};\n","\"use strict\";\n\nmodule.exports = function () {\n // https://mths.be/emoji\n return /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67)\\uDB40\\uDC7F|(?:\\uD83E\\uDDD1\\uD83C\\uDFFF\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C\\uDFFB(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))?|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFF]))|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\u200D(?:(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFFF|\\uD83C\\uDFFE|\\uD83C\\uDFFD|\\uD83C\\uDFFC)?|(?:\\uD83D\\uDC69(?:\\uD83C\\uDFFB\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|(?:\\uD83C[\\uDFFC-\\uDFFF])\\u200D\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69]))|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC69(?:\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83C[\\uDF3E\\uDF73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D83C\\uDFFE\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|\\uD83D\\uDE36\\u200D\\uD83C\\uDF2B|\\uD83C\\uDFF3\\uFE0F\\u200D\\u26A7|\\uD83D\\uDC3B\\u200D\\u2744|(?:(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\uD83C\\uDFF4\\u200D\\u2620|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD])\\u200D[\\u2640\\u2642]|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u2600-\\u2604\\u260E\\u2611\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26B0\\u26B1\\u26C8\\u26CF\\u26D1\\u26D3\\u26E9\\u26F0\\u26F1\\u26F4\\u26F7\\u26F8\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]|\\uD83D[\\uDC3F\\uDCFD\\uDD49\\uDD4A\\uDD6F\\uDD70\\uDD73\\uDD76-\\uDD79\\uDD87\\uDD8A-\\uDD8D\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA\\uDECB\\uDECD-\\uDECF\\uDEE0-\\uDEE5\\uD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uDDBB\\uDDD2\\uDDD3\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270C\\u270D]|\\uD83D[\\uDD74\\uDD90])(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])|[\\u270A\\u270B]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC08\\uDC15\\uDC3B\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDC8F\\uDC91\\uDCAA\\uDD7A\\uDD95\\uDD96\\uDE2E\\uDE35\\uDE36\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5]|\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD]|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF]|[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2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FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5-\\uDED7\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26A7\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5-\\uDED7\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFC\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD78\\uDD7A-\\uDDCB\\uDDCD-\\uDDFF\\uDE70-\\uDE74\\uDE78-\\uDE7A\\uDE80-\\uDE86\\uDE90-\\uDEA8\\uDEB0-\\uDEB6\\uDEC0-\\uDEC2\\uDED0-\\uDED6])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDD77\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport eastAsianWidth from 'eastasianwidth';\nimport emojiRegex from 'emoji-regex';\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\toptions = {\n\t\tambiguousIsNarrow: true,\n\t\t...options\n\t};\n\n\tstring = stripAnsi(string);\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tstring = string.replace(emojiRegex(), ' ');\n\n\tconst ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;\n\tlet width = 0;\n\n\tfor (const character of string) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (codePoint >= 0x300 && codePoint <= 0x36F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst code = eastAsianWidth.eastAsianWidth(character);\n\t\tswitch (code) {\n\t\t\tcase 'F':\n\t\t\tcase 'W':\n\t\t\t\twidth += 2;\n\t\t\t\tbreak;\n\t\t\tcase 'A':\n\t\t\t\twidth += ambiguousCharacterWidth;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\twidth += 1;\n\t\t}\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows[rows.length - 1]));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\t\t\tisInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode\n//\n// 'hard' will never allow a string to take up more than columns characters\n//\n// 'soft' allows long words to expand past the column length\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows[rows.length - 1].trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows[rows.length - 1]);\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst pre = [...rows.join('\\n')];\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replace(/\\r\\n/g, '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","const actions = ['up', 'down', 'left', 'right', 'space', 'enter', 'cancel'] as const;\nexport type Action = (typeof actions)[number];\n\n/** Global settings for Clack programs, stored in memory */\ninterface InternalClackSettings {\n\tactions: Set;\n\taliases: Map;\n}\n\nexport const settings: InternalClackSettings = {\n\tactions: new Set(actions),\n\taliases: new Map([\n\t\t// vim support\n\t\t['k', 'up'],\n\t\t['j', 'down'],\n\t\t['h', 'left'],\n\t\t['l', 'right'],\n\t\t['\\x03', 'cancel'],\n\t\t// opinionated defaults!\n\t\t['escape', 'cancel'],\n\t]),\n};\n\nexport interface ClackSettings {\n\t/**\n\t * Set custom global aliases for the default actions.\n\t * This will not overwrite existing aliases, it will only add new ones!\n\t *\n\t * @param aliases - An object that maps aliases to actions\n\t * @default { k: 'up', j: 'down', h: 'left', l: 'right', '\\x03': 'cancel', 'escape': 'cancel' }\n\t */\n\taliases: Record;\n}\n\nexport function updateSettings(updates: ClackSettings) {\n\tfor (const _key in updates) {\n\t\tconst key = _key as keyof ClackSettings;\n\t\tif (!Object.hasOwn(updates, key)) continue;\n\t\tconst value = updates[key];\n\n\t\tswitch (key) {\n\t\t\tcase 'aliases': {\n\t\t\t\tfor (const alias in value) {\n\t\t\t\t\tif (!Object.hasOwn(value, alias)) continue;\n\t\t\t\t\tif (!settings.aliases.has(alias)) {\n\t\t\t\t\t\tsettings.aliases.set(alias, value[alias]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Check if a key is an alias for a default action\n * @param key - The raw key which might match to an action\n * @param action - The action to match\n * @returns boolean\n */\nexport function isActionKey(key: string | Array, action: Action) {\n\tif (typeof key === 'string') {\n\t\treturn settings.aliases.get(key) === action;\n\t}\n\n\tfor (const value of key) {\n\t\tif (value === undefined) continue;\n\t\tif (isActionKey(value, action)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n","export function diffLines(a: string, b: string) {\n\tif (a === b) return;\n\n\tconst aLines = a.split('\\n');\n\tconst bLines = b.split('\\n');\n\tconst diff: number[] = [];\n\n\tfor (let i = 0; i < Math.max(aLines.length, bLines.length); i++) {\n\t\tif (aLines[i] !== bLines[i]) diff.push(i);\n\t}\n\n\treturn diff;\n}\n","import { stdin, stdout } from 'node:process';\nimport type { Key } from 'node:readline';\nimport * as readline from 'node:readline';\nimport type { Readable } from 'node:stream';\nimport { cursor } from 'sisteransi';\nimport { isActionKey } from './settings';\n\nexport * from './string';\nexport * from './settings';\n\nconst isWindows = globalThis.process.platform.startsWith('win');\n\nexport const CANCEL_SYMBOL = Symbol('clack:cancel');\n\nexport function isCancel(value: unknown): value is symbol {\n\treturn value === CANCEL_SYMBOL;\n}\n\nexport function setRawMode(input: Readable, value: boolean) {\n\tconst i = input as typeof stdin;\n\n\tif (i.isTTY) i.setRawMode(value);\n}\n\nexport function block({\n\tinput = stdin,\n\toutput = stdout,\n\toverwrite = true,\n\thideCursor = true,\n} = {}) {\n\tconst rl = readline.createInterface({\n\t\tinput,\n\t\toutput,\n\t\tprompt: '',\n\t\ttabSize: 1,\n\t});\n\treadline.emitKeypressEvents(input, rl);\n\tif (input.isTTY) input.setRawMode(true);\n\n\tconst clear = (data: Buffer, { name, sequence }: Key) => {\n\t\tconst str = String(data);\n\t\tif (isActionKey([str, name, sequence], 'cancel')) {\n\t\t\tif (hideCursor) output.write(cursor.show);\n\t\t\tprocess.exit(0);\n\t\t\treturn;\n\t\t}\n\t\tif (!overwrite) return;\n\t\tconst dx = name === 'return' ? 0 : -1;\n\t\tconst dy = name === 'return' ? -1 : 0;\n\n\t\treadline.moveCursor(output, dx, dy, () => {\n\t\t\treadline.clearLine(output, 1, () => {\n\t\t\t\tinput.once('keypress', clear);\n\t\t\t});\n\t\t});\n\t};\n\tif (hideCursor) output.write(cursor.hide);\n\tinput.once('keypress', clear);\n\n\treturn () => {\n\t\tinput.off('keypress', clear);\n\t\tif (hideCursor) output.write(cursor.show);\n\n\t\t// Prevent Windows specific issues: https://github.com/natemoo-re/clack/issues/176\n\t\tif (input.isTTY && !isWindows) input.setRawMode(false);\n\n\t\t// @ts-expect-error fix for https://github.com/nodejs/node/issues/31762#issuecomment-1441223907\n\t\trl.terminal = false;\n\t\trl.close();\n\t};\n}\n","import { stdin, stdout } from 'node:process';\nimport readline, { type Key, type ReadLine } from 'node:readline';\nimport type { Readable, Writable } from 'node:stream';\nimport { WriteStream } from 'node:tty';\nimport { cursor, erase } from 'sisteransi';\nimport wrap from 'wrap-ansi';\n\nimport { CANCEL_SYMBOL, diffLines, isActionKey, setRawMode, settings } from '../utils';\n\nimport type { ClackEvents, ClackState } from '../types';\nimport type { Action } from '../utils';\n\nexport interface PromptOptions {\n\trender(this: Omit): string | undefined;\n\tplaceholder?: string;\n\tinitialValue?: any;\n\tvalidate?: ((value: any) => string | Error | undefined) | undefined;\n\tinput?: Readable;\n\toutput?: Writable;\n\tdebug?: boolean;\n\tsignal?: AbortSignal;\n}\n\nexport default class Prompt {\n\tprotected input: Readable;\n\tprotected output: Writable;\n\tprivate _abortSignal?: AbortSignal;\n\n\tprivate rl: ReadLine | undefined;\n\tprivate opts: Omit, 'render' | 'input' | 'output'>;\n\tprivate _render: (context: Omit) => string | undefined;\n\tprivate _track = false;\n\tprivate _prevFrame = '';\n\tprivate _subscribers = new Map any; once?: boolean }[]>();\n\tprotected _cursor = 0;\n\n\tpublic state: ClackState = 'initial';\n\tpublic error = '';\n\tpublic value: any;\n\n\tconstructor(options: PromptOptions, trackValue = true) {\n\t\tconst { input = stdin, output = stdout, render, signal, ...opts } = options;\n\n\t\tthis.opts = opts;\n\t\tthis.onKeypress = this.onKeypress.bind(this);\n\t\tthis.close = this.close.bind(this);\n\t\tthis.render = this.render.bind(this);\n\t\tthis._render = render.bind(this);\n\t\tthis._track = trackValue;\n\t\tthis._abortSignal = signal;\n\n\t\tthis.input = input;\n\t\tthis.output = output;\n\t}\n\n\t/**\n\t * Unsubscribe all listeners\n\t */\n\tprotected unsubscribe() {\n\t\tthis._subscribers.clear();\n\t}\n\n\t/**\n\t * Set a subscriber with opts\n\t * @param event - The event name\n\t */\n\tprivate setSubscriber(\n\t\tevent: T,\n\t\topts: { cb: ClackEvents[T]; once?: boolean }\n\t) {\n\t\tconst params = this._subscribers.get(event) ?? [];\n\t\tparams.push(opts);\n\t\tthis._subscribers.set(event, params);\n\t}\n\n\t/**\n\t * Subscribe to an event\n\t * @param event - The event name\n\t * @param cb - The callback\n\t */\n\tpublic on(event: T, cb: ClackEvents[T]) {\n\t\tthis.setSubscriber(event, { cb });\n\t}\n\n\t/**\n\t * Subscribe to an event once\n\t * @param event - The event name\n\t * @param cb - The callback\n\t */\n\tpublic once(event: T, cb: ClackEvents[T]) {\n\t\tthis.setSubscriber(event, { cb, once: true });\n\t}\n\n\t/**\n\t * Emit an event with data\n\t * @param event - The event name\n\t * @param data - The data to pass to the callback\n\t */\n\tpublic emit(event: T, ...data: Parameters) {\n\t\tconst cbs = this._subscribers.get(event) ?? [];\n\t\tconst cleanup: (() => void)[] = [];\n\n\t\tfor (const subscriber of cbs) {\n\t\t\tsubscriber.cb(...data);\n\n\t\t\tif (subscriber.once) {\n\t\t\t\tcleanup.push(() => cbs.splice(cbs.indexOf(subscriber), 1));\n\t\t\t}\n\t\t}\n\n\t\tfor (const cb of cleanup) {\n\t\t\tcb();\n\t\t}\n\t}\n\n\tpublic prompt() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (this._abortSignal) {\n\t\t\t\tif (this._abortSignal.aborted) {\n\t\t\t\t\tthis.state = 'cancel';\n\n\t\t\t\t\tthis.close();\n\t\t\t\t\treturn resolve(CANCEL_SYMBOL);\n\t\t\t\t}\n\n\t\t\t\tthis._abortSignal.addEventListener(\n\t\t\t\t\t'abort',\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.state = 'cancel';\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t},\n\t\t\t\t\t{ once: true }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst sink = new WriteStream(0);\n\t\t\tsink._write = (chunk, encoding, done) => {\n\t\t\t\tif (this._track) {\n\t\t\t\t\tthis.value = this.rl?.line.replace(/\\t/g, '');\n\t\t\t\t\tthis._cursor = this.rl?.cursor ?? 0;\n\t\t\t\t\tthis.emit('value', this.value);\n\t\t\t\t}\n\t\t\t\tdone();\n\t\t\t};\n\t\t\tthis.input.pipe(sink);\n\n\t\t\tthis.rl = readline.createInterface({\n\t\t\t\tinput: this.input,\n\t\t\t\toutput: sink,\n\t\t\t\ttabSize: 2,\n\t\t\t\tprompt: '',\n\t\t\t\tescapeCodeTimeout: 50,\n\t\t\t});\n\t\t\treadline.emitKeypressEvents(this.input, this.rl);\n\t\t\tthis.rl.prompt();\n\t\t\tif (this.opts.initialValue !== undefined && this._track) {\n\t\t\t\tthis.rl.write(this.opts.initialValue);\n\t\t\t}\n\n\t\t\tthis.input.on('keypress', this.onKeypress);\n\t\t\tsetRawMode(this.input, true);\n\t\t\tthis.output.on('resize', this.render);\n\n\t\t\tthis.render();\n\n\t\t\tthis.once('submit', () => {\n\t\t\t\tthis.output.write(cursor.show);\n\t\t\t\tthis.output.off('resize', this.render);\n\t\t\t\tsetRawMode(this.input, false);\n\t\t\t\tresolve(this.value);\n\t\t\t});\n\t\t\tthis.once('cancel', () => {\n\t\t\t\tthis.output.write(cursor.show);\n\t\t\t\tthis.output.off('resize', this.render);\n\t\t\t\tsetRawMode(this.input, false);\n\t\t\t\tresolve(CANCEL_SYMBOL);\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate onKeypress(char: string, key?: Key) {\n\t\tif (this.state === 'error') {\n\t\t\tthis.state = 'active';\n\t\t}\n\t\tif (key?.name) {\n\t\t\tif (!this._track && settings.aliases.has(key.name)) {\n\t\t\t\tthis.emit('cursor', settings.aliases.get(key.name));\n\t\t\t}\n\t\t\tif (settings.actions.has(key.name as Action)) {\n\t\t\t\tthis.emit('cursor', key.name as Action);\n\t\t\t}\n\t\t}\n\t\tif (char && (char.toLowerCase() === 'y' || char.toLowerCase() === 'n')) {\n\t\t\tthis.emit('confirm', char.toLowerCase() === 'y');\n\t\t}\n\t\tif (char === '\\t' && this.opts.placeholder) {\n\t\t\tif (!this.value) {\n\t\t\t\tthis.rl?.write(this.opts.placeholder);\n\t\t\t\tthis.emit('value', this.opts.placeholder);\n\t\t\t}\n\t\t}\n\t\tif (char) {\n\t\t\tthis.emit('key', char.toLowerCase());\n\t\t}\n\n\t\tif (key?.name === 'return') {\n\t\t\tif (this.opts.validate) {\n\t\t\t\tconst problem = this.opts.validate(this.value);\n\t\t\t\tif (problem) {\n\t\t\t\t\tthis.error = problem instanceof Error ? problem.message : problem;\n\t\t\t\t\tthis.state = 'error';\n\t\t\t\t\tthis.rl?.write(this.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.state !== 'error') {\n\t\t\t\tthis.state = 'submit';\n\t\t\t}\n\t\t}\n\n\t\tif (isActionKey([char, key?.name, key?.sequence], 'cancel')) {\n\t\t\tthis.state = 'cancel';\n\t\t}\n\t\tif (this.state === 'submit' || this.state === 'cancel') {\n\t\t\tthis.emit('finalize');\n\t\t}\n\t\tthis.render();\n\t\tif (this.state === 'submit' || this.state === 'cancel') {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tprotected close() {\n\t\tthis.input.unpipe();\n\t\tthis.input.removeListener('keypress', this.onKeypress);\n\t\tthis.output.write('\\n');\n\t\tsetRawMode(this.input, false);\n\t\tthis.rl?.close();\n\t\tthis.rl = undefined;\n\t\tthis.emit(`${this.state}`, this.value);\n\t\tthis.unsubscribe();\n\t}\n\n\tprivate restoreCursor() {\n\t\tconst lines =\n\t\t\twrap(this._prevFrame, process.stdout.columns, { hard: true }).split('\\n').length - 1;\n\t\tthis.output.write(cursor.move(-999, lines * -1));\n\t}\n\n\tprivate render() {\n\t\tconst frame = wrap(this._render(this) ?? '', process.stdout.columns, { hard: true });\n\t\tif (frame === this._prevFrame) return;\n\n\t\tif (this.state === 'initial') {\n\t\t\tthis.output.write(cursor.hide);\n\t\t} else {\n\t\t\tconst diff = diffLines(this._prevFrame, frame);\n\t\t\tthis.restoreCursor();\n\t\t\t// If a single line has changed, only update that line\n\t\t\tif (diff && diff?.length === 1) {\n\t\t\t\tconst diffLine = diff[0];\n\t\t\t\tthis.output.write(cursor.move(0, diffLine));\n\t\t\t\tthis.output.write(erase.lines(1));\n\t\t\t\tconst lines = frame.split('\\n');\n\t\t\t\tthis.output.write(lines[diffLine]);\n\t\t\t\tthis._prevFrame = frame;\n\t\t\t\tthis.output.write(cursor.move(0, lines.length - diffLine - 1));\n\t\t\t\treturn;\n\t\t\t\t// If many lines have changed, rerender everything past the first line\n\t\t\t}\n\t\t\tif (diff && diff?.length > 1) {\n\t\t\t\tconst diffLine = diff[0];\n\t\t\t\tthis.output.write(cursor.move(0, diffLine));\n\t\t\t\tthis.output.write(erase.down());\n\t\t\t\tconst lines = frame.split('\\n');\n\t\t\t\tconst newLines = lines.slice(diffLine);\n\t\t\t\tthis.output.write(newLines.join('\\n'));\n\t\t\t\tthis._prevFrame = frame;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.output.write(erase.down());\n\t\t}\n\n\t\tthis.output.write(frame);\n\t\tif (this.state === 'initial') {\n\t\t\tthis.state = 'active';\n\t\t}\n\t\tthis._prevFrame = frame;\n\t}\n}\n","import { cursor } from 'sisteransi';\nimport Prompt, { type PromptOptions } from './prompt';\n\ninterface ConfirmOptions extends PromptOptions {\n\tactive: string;\n\tinactive: string;\n\tinitialValue?: boolean;\n}\nexport default class ConfirmPrompt extends Prompt {\n\tget cursor() {\n\t\treturn this.value ? 0 : 1;\n\t}\n\n\tprivate get _value() {\n\t\treturn this.cursor === 0;\n\t}\n\n\tconstructor(opts: ConfirmOptions) {\n\t\tsuper(opts, false);\n\t\tthis.value = !!opts.initialValue;\n\n\t\tthis.on('value', () => {\n\t\t\tthis.value = this._value;\n\t\t});\n\n\t\tthis.on('confirm', (confirm) => {\n\t\t\tthis.output.write(cursor.move(0, -1));\n\t\t\tthis.value = confirm;\n\t\t\tthis.state = 'submit';\n\t\t\tthis.close();\n\t\t});\n\n\t\tthis.on('cursor', () => {\n\t\t\tthis.value = !this.value;\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface GroupMultiSelectOptions\n\textends PromptOptions> {\n\toptions: Record;\n\tinitialValues?: T['value'][];\n\trequired?: boolean;\n\tcursorAt?: T['value'];\n}\nexport default class GroupMultiSelectPrompt extends Prompt {\n\toptions: (T & { group: string | boolean })[];\n\tcursor = 0;\n\n\tgetGroupItems(group: string): T[] {\n\t\treturn this.options.filter((o) => o.group === group);\n\t}\n\n\tisGroupSelected(group: string) {\n\t\tconst items = this.getGroupItems(group);\n\t\treturn items.every((i) => this.value.includes(i.value));\n\t}\n\n\tprivate toggleValue() {\n\t\tconst item = this.options[this.cursor];\n\t\tif (item.group === true) {\n\t\t\tconst group = item.value;\n\t\t\tconst groupedItems = this.getGroupItems(group);\n\t\t\tif (this.isGroupSelected(group)) {\n\t\t\t\tthis.value = this.value.filter(\n\t\t\t\t\t(v: string) => groupedItems.findIndex((i) => i.value === v) === -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.value = [...this.value, ...groupedItems.map((i) => i.value)];\n\t\t\t}\n\t\t\tthis.value = Array.from(new Set(this.value));\n\t\t} else {\n\t\t\tconst selected = this.value.includes(item.value);\n\t\t\tthis.value = selected\n\t\t\t\t? this.value.filter((v: T['value']) => v !== item.value)\n\t\t\t\t: [...this.value, item.value];\n\t\t}\n\t}\n\n\tconstructor(opts: GroupMultiSelectOptions) {\n\t\tsuper(opts, false);\n\t\tconst { options } = opts;\n\t\tthis.options = Object.entries(options).flatMap(([key, option]) => [\n\t\t\t{ value: key, group: true, label: key },\n\t\t\t...option.map((opt) => ({ ...opt, group: key })),\n\t\t]) as any;\n\t\tthis.value = [...(opts.initialValues ?? [])];\n\t\tthis.cursor = Math.max(\n\t\t\tthis.options.findIndex(({ value }) => value === opts.cursorAt),\n\t\t\t0\n\t\t);\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'space':\n\t\t\t\t\tthis.toggleValue();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface MultiSelectOptions extends PromptOptions> {\n\toptions: T[];\n\tinitialValues?: T['value'][];\n\trequired?: boolean;\n\tcursorAt?: T['value'];\n}\nexport default class MultiSelectPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tprivate get _value() {\n\t\treturn this.options[this.cursor].value;\n\t}\n\n\tprivate toggleAll() {\n\t\tconst allSelected = this.value.length === this.options.length;\n\t\tthis.value = allSelected ? [] : this.options.map((v) => v.value);\n\t}\n\n\tprivate toggleValue() {\n\t\tconst selected = this.value.includes(this._value);\n\t\tthis.value = selected\n\t\t\t? this.value.filter((value: T['value']) => value !== this._value)\n\t\t\t: [...this.value, this._value];\n\t}\n\n\tconstructor(opts: MultiSelectOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tthis.value = [...(opts.initialValues ?? [])];\n\t\tthis.cursor = Math.max(\n\t\t\tthis.options.findIndex(({ value }) => value === opts.cursorAt),\n\t\t\t0\n\t\t);\n\t\tthis.on('key', (char) => {\n\t\t\tif (char === 'a') {\n\t\t\t\tthis.toggleAll();\n\t\t\t}\n\t\t});\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'space':\n\t\t\t\t\tthis.toggleValue();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n}\n","import color from 'picocolors';\nimport Prompt, { type PromptOptions } from './prompt';\n\ninterface PasswordOptions extends PromptOptions {\n\tmask?: string;\n}\nexport default class PasswordPrompt extends Prompt {\n\tvalueWithCursor = '';\n\tprivate _mask = '•';\n\tget cursor() {\n\t\treturn this._cursor;\n\t}\n\tget masked() {\n\t\treturn this.value.replaceAll(/./g, this._mask);\n\t}\n\tconstructor({ mask, ...opts }: PasswordOptions) {\n\t\tsuper(opts);\n\t\tthis._mask = mask ?? '•';\n\n\t\tthis.on('finalize', () => {\n\t\t\tthis.valueWithCursor = this.masked;\n\t\t});\n\t\tthis.on('value', () => {\n\t\t\tif (this.cursor >= this.value.length) {\n\t\t\t\tthis.valueWithCursor = `${this.masked}${color.inverse(color.hidden('_'))}`;\n\t\t\t} else {\n\t\t\t\tconst s1 = this.masked.slice(0, this.cursor);\n\t\t\t\tconst s2 = this.masked.slice(this.cursor);\n\t\t\t\tthis.valueWithCursor = `${s1}${color.inverse(s2[0])}${s2.slice(1)}`;\n\t\t\t}\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface SelectOptions extends PromptOptions> {\n\toptions: T[];\n\tinitialValue?: T['value'];\n}\nexport default class SelectPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tprivate get _value() {\n\t\treturn this.options[this.cursor];\n\t}\n\n\tprivate changeValue() {\n\t\tthis.value = this._value.value;\n\t}\n\n\tconstructor(opts: SelectOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tthis.cursor = this.options.findIndex(({ value }) => value === opts.initialValue);\n\t\tif (this.cursor === -1) this.cursor = 0;\n\t\tthis.changeValue();\n\n\t\tthis.on('cursor', (key) => {\n\t\t\tswitch (key) {\n\t\t\t\tcase 'left':\n\t\t\t\tcase 'up':\n\t\t\t\t\tthis.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'down':\n\t\t\t\tcase 'right':\n\t\t\t\t\tthis.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.changeValue();\n\t\t});\n\t}\n}\n","import Prompt, { type PromptOptions } from './prompt';\n\ninterface SelectKeyOptions extends PromptOptions> {\n\toptions: T[];\n}\nexport default class SelectKeyPrompt extends Prompt {\n\toptions: T[];\n\tcursor = 0;\n\n\tconstructor(opts: SelectKeyOptions) {\n\t\tsuper(opts, false);\n\n\t\tthis.options = opts.options;\n\t\tconst keys = this.options.map(({ value: [initial] }) => initial?.toLowerCase());\n\t\tthis.cursor = Math.max(keys.indexOf(opts.initialValue), 0);\n\n\t\tthis.on('key', (key) => {\n\t\t\tif (!keys.includes(key)) return;\n\t\t\tconst value = this.options.find(({ value: [initial] }) => initial?.toLowerCase() === key);\n\t\t\tif (value) {\n\t\t\t\tthis.value = value.value;\n\t\t\t\tthis.state = 'submit';\n\t\t\t\tthis.emit('submit');\n\t\t\t}\n\t\t});\n\t}\n}\n","import color from 'picocolors';\nimport Prompt, { type PromptOptions } from './prompt';\n\nexport interface TextOptions extends PromptOptions {\n\tplaceholder?: string;\n\tdefaultValue?: string;\n}\n\nexport default class TextPrompt extends Prompt {\n\tget valueWithCursor() {\n\t\tif (this.state === 'submit') {\n\t\t\treturn this.value;\n\t\t}\n\t\tif (this.cursor >= this.value.length) {\n\t\t\treturn `${this.value}█`;\n\t\t}\n\t\tconst s1 = this.value.slice(0, this.cursor);\n\t\tconst [s2, ...s3] = this.value.slice(this.cursor);\n\t\treturn `${s1}${color.inverse(s2)}${s3.join('')}`;\n\t}\n\tget cursor() {\n\t\treturn this._cursor;\n\t}\n\tconstructor(opts: TextOptions) {\n\t\tsuper(opts);\n\n\t\tthis.on('finalize', () => {\n\t\t\tif (!this.value) {\n\t\t\t\tthis.value = opts.defaultValue;\n\t\t\t}\n\t\t});\n\t}\n}\n"],"names":["ansiRegex","onlyFirst","pattern","regex","stripAnsi","string","eaw","module","character","x","y","codePoint","code","stringToArray","characters","len","i","text","start","end","result","eawLen","chars","char","charLen","emojiRegex","stringWidth","options","ambiguousCharacterWidth","width","eastAsianWidth","ANSI_BACKGROUND_OFFSET","wrapAnsi16","offset","wrapAnsi256","wrapAnsi16m","red","green","blue","styles","foregroundColorNames","backgroundColorNames","assembleStyles","codes","groupName","group","styleName","style","hex","matches","colorString","integer","remainder","value","ansiStyles","ESCAPES","END_CODE","ANSI_ESCAPE_BELL","ANSI_CSI","ANSI_OSC","ANSI_SGR_TERMINATOR","ANSI_ESCAPE_LINK","wrapAnsiCode","wrapAnsiHyperlink","uri","wordLengths","wrapWord","rows","word","columns","isInsideEscape","isInsideLinkEscape","visible","index","characterLength","stringVisibleTrimSpacesRight","words","last","exec","returnValue","escapeCode","escapeUrl","lengths","rowLength","remainingColumns","breaksStartingThisLine","row","pre","groups","wrapAnsi","line","actions","settings","updateSettings","updates","_key","key","alias","isActionKey","action","diffLines","a","b","aLines","bLines","diff","isWindows","CANCEL_SYMBOL","isCancel","setRawMode","input","block","stdin","output","stdout","overwrite","hideCursor","rl","readline","clear","data","name","sequence","str","cursor","dx","dy","v","t","e","s","Prompt","trackValue","__publicField","render","signal","opts","event","params","cb","cbs","cleanup","subscriber","resolve","reject","sink","WriteStream","chunk","encoding","done","problem","lines","wrap","frame","diffLine","erase","newLines","ConfirmPrompt","confirm","n","r","l","c$1","GroupMultiSelectPrompt","option","opt","o","item","groupedItems","selected","allSelected","PasswordPrompt","mask","color","s1","s2","SelectPrompt","SelectKeyPrompt","keys","initial","TextPrompt","s3"],"mappings":"8NAAe,SAASA,EAAU,CAAC,UAAAC,EAAY,EAAK,EAAI,CAAA,EAAI,CAG3D,MAAMC,EAAU,CACf,0JACA,0DACF,EAAG,KAAK,GAAG,EAEV,OAAO,IAAI,OAAOA,EAASD,EAAY,OAAY,GAAG,CACvD,CCPA,MAAME,EAAQH,EAAS,EAER,SAASI,EAAUC,EAAQ,CACzC,GAAI,OAAOA,GAAW,SACrB,MAAM,IAAI,UAAU,gCAAgC,OAAOA,CAAM,IAAI,EAMtE,OAAOA,EAAO,QAAQF,EAAO,EAAE,CAChC,qICbA,IAAIG,EAAM,CAAA,EAKRC,UAAiBD,EAGnBA,EAAI,eAAiB,SAASE,EAAW,CACvC,IAAIC,EAAID,EAAU,WAAW,CAAC,EAC1BE,EAAKF,EAAU,QAAU,EAAKA,EAAU,WAAW,CAAC,EAAI,EACxDG,EAAYF,EAQhB,MAPK,QAAUA,GAAKA,GAAK,OAAY,OAAUC,GAAKA,GAAK,QACvDD,GAAK,KACLC,GAAK,KACLC,EAAaF,GAAK,GAAMC,EACxBC,GAAa,OAGAA,GAAV,OACA,OAAUA,GAAaA,GAAa,OACpC,OAAUA,GAAaA,GA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AACC,EAAI,GAAGM,CAAE,EAAI,KAAK,MAAM,MAAM,KAAK,MAAM,EAChD,MAAO,GAAGP,CAAE,GAAGD,EAAM,QAAQE,CAAE,CAAC,GAAGM,EAAG,KAAK,EAAE,CAAC,EAC/C,CACA,IAAI,QAAS,CACZ,OAAO,KAAK,OACb,CACA,YAAY7C,EAAmB,CAC9B,MAAMA,CAAI,EAEV,KAAK,GAAG,WAAY,IAAM,CACpB,KAAK,QACT,KAAK,MAAQA,EAAK,aAEpB,CAAC,CACF,CACD","x_google_ignoreList":[0,1,2,3,4,5,6]} \ No newline at end of file diff --git a/node_modules/@clack/core/package.json b/node_modules/@clack/core/package.json new file mode 100644 index 0000000..e789042 --- /dev/null +++ b/node_modules/@clack/core/package.json @@ -0,0 +1,62 @@ +{ + "name": "@clack/core", + "version": "0.4.1", + "type": "module", + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/natemoo-re/clack", + "directory": "packages/core" + }, + "bugs": { + "url": "https://github.com/natemoo-re/clack/issues" + }, + "homepage": "https://github.com/natemoo-re/clack/tree/main/packages/core#readme", + "files": [ + "dist", + "CHANGELOG.md" + ], + "keywords": [ + "ask", + "clack", + "cli", + "command-line", + "command", + "input", + "interact", + "interface", + "menu", + "prompt", + "prompts", + "stdin", + "ui" + ], + "author": { + "name": "Nate Moore", + "email": "nate@natemoo.re", + "url": "https://twitter.com/n_moore" + }, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + }, + "devDependencies": { + "vitest": "^1.6.0", + "wrap-ansi": "^8.1.0" + }, + "scripts": { + "build": "unbuild", + "test": "vitest run" + } +} \ No newline at end of file diff --git a/node_modules/@clack/prompts/CHANGELOG.md b/node_modules/@clack/prompts/CHANGELOG.md new file mode 100644 index 0000000..57e0116 --- /dev/null +++ b/node_modules/@clack/prompts/CHANGELOG.md @@ -0,0 +1,401 @@ +# @clack/prompts + +## 0.10.0 + +### Minor Changes + +- 613179d: Adds a new `indicator` option to `spinner`, which supports the original `"dots"` loading animation or a new `"timer"` loading animation. + + ```ts + import * as p from "@clack/prompts"; + + const spin = p.spinner({ indicator: "timer" }); + spin.start("Loading"); + await sleep(3000); + spin.stop("Loaded"); + ``` + +- a38b2bc: Adds `stream` API which provides the same methods as `log`, but for iterable (even async) message streams. This is particularly useful for AI responses which are dynamically generated by LLMs. + + ```ts + import * as p from "@clack/prompts"; + + await p.stream.step( + (async function* () { + yield* generateLLMResponse(question); + })() + ); + ``` + +## 0.9.1 + +### Patch Changes + +- 8093f3c: Adds `Error` support to the `validate` function +- 98925e3: Exports the `Option` type and improves JSDocannotations +- 1904e57: Replace custom utility for stripping ANSI control sequences with Node's built-in [`stripVTControlCharacters`](https://nodejs.org/docs/latest/api/util.html#utilstripvtcontrolcharactersstr) utility. +- Updated dependencies [8093f3c] +- Updated dependencies [e5ba09a] +- Updated dependencies [8cba8e3] + - @clack/core@0.4.1 + +## 0.9.0 + +### Minor Changes + +- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings. + + `updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`). + + ```ts + import { updateSettings } from "@clack/prompts"; + + // Support custom keybindings + updateSettings({ + aliases: { + w: "up", + a: "left", + s: "down", + d: "right", + }, + }); + ``` + +> [!WARNING] +> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings. + +- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller). + + One example use case is automatically cancelling a prompt after a timeout. + + ```ts + const shouldContinue = await confirm({ + message: "This message will self destruct in 5 seconds", + signal: AbortSignal.timeout(5000), + }); + ``` + + Another use case is racing a long running task with a manual prompt. + + ```ts + const abortController = new AbortController(); + + const projectType = await Promise.race([ + detectProjectType({ + signal: abortController.signal, + }), + select({ + message: "Pick a project type.", + options: [ + { value: "ts", label: "TypeScript" }, + { value: "js", label: "JavaScript" }, + { value: "coffee", label: "CoffeeScript", hint: "oh no" }, + ], + signal: abortController.signal, + }), + ]); + + abortController.abort(); + ``` + +- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`). + + | alias | action | + | ----- | ------ | + | `k` | up | + | `l` | right | + | `j` | down | + | `h` | left | + | `esc` | cancel | + +### Patch Changes + +- f9f139d: Adapts `spinner` output for static CI environments +- Updated dependencies [a83d2f8] +- Updated dependencies [801246b] +- Updated dependencies [a83d2f8] +- Updated dependencies [51e12bc] + - @clack/core@0.4.0 + +## 0.8.2 + +### Patch Changes + +- Updated dependencies [4845f4f] +- Updated dependencies [d7b2fb9] + - @clack/core@0.3.5 + +## 0.8.1 + +### Patch Changes + +- 360afeb: feat: adaptative max items + +## 0.8.0 + +### Minor Changes + +- 9acccde: Add tasks function for executing tasks in spinners + +### Patch Changes + +- b5c6b9b: Feat multiselect maxItems option +- 50ed94a: fix: clear `spinner` hooks on `spinner.stop` +- Updated dependencies [a04e418] +- Updated dependencies [4f6fcf5] + - @clack/core@0.3.4 + +## 0.7.0 + +### Minor Changes + +- b27a701: add maxItems option to select prompt +- 89371be: added a new method called `spinner.message(msg: string)` + +### Patch Changes + +- 52183c4: Fix `spinner` conflict with terminal on error between `spinner.start()` and `spinner.stop()` +- ab51d29: Fixes cases where the note title length was miscalculated due to ansi characters +- Updated dependencies [cd79076] + - @clack/core@0.3.3 + +## 0.6.3 + +### Patch Changes + +- c96eda5: Enable hard line-wrapping behavior for long words without spaces +- Updated dependencies [c96eda5] + - @clack/core@0.3.2 + +## 0.6.2 + +### Patch Changes + +- 58a1df1: Fix line duplication bug by automatically wrapping prompts to `process.stdout.columns` +- Updated dependencies [58a1df1] + - @clack/core@0.3.1 + +## 0.6.1 + +### Patch Changes + +- ca08fb6: Support complex value types for `select`, `multiselect` and `groupMultiselect`. + +## 0.6.0 + +### Minor Changes + +- 8a4a12f: add `groupMultiselect` prompt +- 165a1b3: Add `log` APIs. Supports `log.info`, `log.success`, `log.warn`, and `log.error`. For low-level control, `log.message` is also exposed. + +### Patch Changes + +- Updated dependencies [8a4a12f] +- Updated dependencies [8a4a12f] + - @clack/core@0.3.0 + +## 0.5.1 + +### Patch Changes + +- cc11917: Update default `password` mask +- Updated dependencies [ec812b6] + - @clack/core@0.2.1 + +## 0.5.0 + +### Minor Changes + +- d74dd05: Adds a `selectKey` prompt type +- 54c1bc3: **Breaking Change** `multiselect` has renamed `initialValue` to `initialValues` + +### Patch Changes + +- Updated dependencies [d74dd05] +- Updated dependencies [54c1bc3] + - @clack/core@0.2.0 + +## 0.4.5 + +### Patch Changes + +- 1251132: Multiselect: return `Value[]` instead of `Option[]`. +- 8994382: Add a password prompt to `@clack/prompts` +- Updated dependencies [1251132] +- Updated dependencies [8994382] + - @clack/core@0.1.9 + +## 0.4.4 + +### Patch Changes + +- d96071c: Don't mutate `initialValue` in `multiselect`, fix parameter type for `validate()`. + + Credits to @banjo for the bug report and initial PR! + +- Updated dependencies [d96071c] + - @clack/core@0.1.8 + +## 0.4.3 + +### Patch Changes + +- 83d890e: Fix text cancel display bug + +## 0.4.2 + +### Patch Changes + +- Update README + +## 0.4.1 + +### Patch Changes + +- 7fb5375: Adds a new `defaultValue` option to the text prompt, removes automatic usage of the placeholder value. +- Updated dependencies [7fb5375] + - @clack/core@0.1.6 + +## 0.4.0 + +### Minor Changes + +- 61b88b6: Add `group` construct to group many prompts together + +### Patch Changes + +- de1314e: Support `required` option for multi-select +- Updated dependencies [de1314e] + - @clack/core@0.1.5 + +## 0.3.0 + +### Minor Changes + +- 493c592: Improve types for select/multiselect prompts. Numbers and booleans are now supported as the `value` option. +- 15558e3: Improved Windows/non-unicode support + +### Patch Changes + +- ca77da1: Fix multiselect initial value logic +- Updated dependencies [ca77da1] +- Updated dependencies [8aed606] + - @clack/core@0.1.4 + +## 0.2.2 + +### Patch Changes + +- 94b24d9: Fix CJS `ansi-regex` interop + +## 0.2.1 + +### Patch Changes + +- a99c458: Support `initialValue` option for text prompt +- Updated dependencies [a99c458] + - @clack/core@0.1.3 + +## 0.2.0 + +### Minor Changes + +- Improved type safety +- b1341d6: Updated styles, new note component + +### Patch Changes + +- Updated dependencies [7dcad8f] +- Updated dependencies [2242f13] +- Updated dependencies [b1341d6] + - @clack/core@0.1.2 + +## 0.1.1 + +### Patch Changes + +- fa09bf5: Use circle for radio, square for checkbox +- Updated dependencies [4be7dbf] +- Updated dependencies [b480679] + - @clack/core@0.1.1 + +## 0.1.0 + +### Minor Changes + +- 7015ec9: Create new prompt: multi-select + +### Patch Changes + +- Updated dependencies [7015ec9] + - @clack/core@0.1.0 + +## 0.0.10 + +### Patch Changes + +- e0b49e5: Update spinner so it actually spins + +## 0.0.9 + +### Patch Changes + +- Update README + +## 0.0.8 + +### Patch Changes + +- Updated dependencies [9d371c3] + - @clack/core@0.0.12 + +## 0.0.7 + +### Patch Changes + +- Update README + +## 0.0.6 + +### Patch Changes + +- d20ef2a: Update keywords, URLs +- Updated dependencies [441d5b7] +- Updated dependencies [d20ef2a] +- Updated dependencies [fe13c2f] + - @clack/core@0.0.11 + +## 0.0.5 + +### Patch Changes + +- Update README + +## 0.0.4 + +### Patch Changes + +- 80404ab: Update README + +## 0.0.3 + +### Patch Changes + +- a0cb382: Add `main` entrypoint +- Updated dependencies [a0cb382] + - @clack/core@0.0.10 + +## 0.0.2 + +### Patch Changes + +- Updated dependencies + - @clack/core@0.0.9 + +## 0.0.1 + +### Patch Changes + +- a4b5e13: Initial release +- Updated dependencies [a4b5e13] + - @clack/core@0.0.8 diff --git a/node_modules/@clack/prompts/LICENSE b/node_modules/@clack/prompts/LICENSE new file mode 100644 index 0000000..1ca4cf2 --- /dev/null +++ b/node_modules/@clack/prompts/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Nate Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@clack/prompts/README.md b/node_modules/@clack/prompts/README.md new file mode 100644 index 0000000..2bc0d93 --- /dev/null +++ b/node_modules/@clack/prompts/README.md @@ -0,0 +1,207 @@ +# `@clack/prompts` + +Effortlessly build beautiful command-line apps 🪄 [Try the demo](https://stackblitz.com/edit/clack-prompts?file=index.js) + +![clack-prompt](https://github.com/natemoo-re/clack/blob/main/.github/assets/clack-demo.gif) + +--- + +`@clack/prompts` is an opinionated, pre-styled wrapper around [`@clack/core`](https://www.npmjs.com/package/@clack/core). + +- 🤏 80% smaller than other options +- 💎 Beautiful, minimal UI +- ✅ Simple API +- 🧱 Comes with `text`, `confirm`, `select`, `multiselect`, and `spinner` components + +## Basics + +### Setup + +The `intro` and `outro` functions will print a message to begin or end a prompt session, respectively. + +```js +import { intro, outro } from '@clack/prompts'; + +intro(`create-my-app`); +// Do stuff +outro(`You're all set!`); +``` + +### Cancellation + +The `isCancel` function is a guard that detects when a user cancels a question with `CTRL + C`. You should handle this situation for each prompt, optionally providing a nice cancellation message with the `cancel` utility. + +```js +import { isCancel, cancel, text } from '@clack/prompts'; + +const value = await text({ + message: 'What is the meaning of life?', +}); + +if (isCancel(value)) { + cancel('Operation cancelled.'); + process.exit(0); +} +``` + +## Components + +### Text + +The text component accepts a single line of text. + +```js +import { text } from '@clack/prompts'; + +const meaning = await text({ + message: 'What is the meaning of life?', + placeholder: 'Not sure', + initialValue: '42', + validate(value) { + if (value.length === 0) return `Value is required!`; + }, +}); +``` + +### Confirm + +The confirm component accepts a yes or no answer. The result is a boolean value of `true` or `false`. + +```js +import { confirm } from '@clack/prompts'; + +const shouldContinue = await confirm({ + message: 'Do you want to continue?', +}); +``` + +### Select + +The select component allows a user to choose one value from a list of options. The result is the `value` prop of a given option. + +```js +import { select } from '@clack/prompts'; + +const projectType = await select({ + message: 'Pick a project type.', + options: [ + { value: 'ts', label: 'TypeScript' }, + { value: 'js', label: 'JavaScript' }, + { value: 'coffee', label: 'CoffeeScript', hint: 'oh no' }, + ], +}); +``` + +### Multi-Select + +The `multiselect` component allows a user to choose many values from a list of options. The result is an array with all selected `value` props. + +```js +import { multiselect } from '@clack/prompts'; + +const additionalTools = await multiselect({ + message: 'Select additional tools.', + options: [ + { value: 'eslint', label: 'ESLint', hint: 'recommended' }, + { value: 'prettier', label: 'Prettier' }, + { value: 'gh-action', label: 'GitHub Action' }, + ], + required: false, +}); +``` + +### Spinner + +The spinner component surfaces a pending action, such as a long-running download or dependency installation. + +```js +import { spinner } from '@clack/prompts'; + +const s = spinner(); +s.start('Installing via npm'); +// Do installation here +s.stop('Installed via npm'); +``` + +## Utilities + +### Grouping + +Grouping prompts together is a great way to keep your code organized. This accepts a JSON object with a name that can be used to reference the group later. The second argument is an optional but has a `onCancel` callback that will be called if the user cancels one of the prompts in the group. + +```js +import * as p from '@clack/prompts'; + +const group = await p.group( + { + name: () => p.text({ message: 'What is your name?' }), + age: () => p.text({ message: 'What is your age?' }), + color: ({ results }) => + p.multiselect({ + message: `What is your favorite color ${results.name}?`, + options: [ + { value: 'red', label: 'Red' }, + { value: 'green', label: 'Green' }, + { value: 'blue', label: 'Blue' }, + ], + }), + }, + { + // On Cancel callback that wraps the group + // So if the user cancels one of the prompts in the group this function will be called + onCancel: ({ results }) => { + p.cancel('Operation cancelled.'); + process.exit(0); + }, + } +); + +console.log(group.name, group.age, group.color); +``` + +### Tasks + +Execute multiple tasks in spinners. + +```js +await p.tasks([ + { + title: 'Installing via npm', + task: async (message) => { + // Do installation here + return 'Installed via npm'; + }, + }, +]); +``` + +### Logs + +```js +import { log } from '@clack/prompts'; + +log.info('Info!'); +log.success('Success!'); +log.step('Step!'); +log.warn('Warn!'); +log.error('Error!'); +log.message('Hello, World', { symbol: color.cyan('~') }); +``` + + +### Stream + +When interacting with dynamic LLMs or other streaming message providers, use the `stream` APIs to log messages from an iterable, even an async one. + +```js +import { stream } from '@clack/prompts'; + +stream.info((function *() { yield 'Info!'; })()); +stream.success((function *() { yield 'Success!'; })()); +stream.step((function *() { yield 'Step!'; })()); +stream.warn((function *() { yield 'Warn!'; })()); +stream.error((function *() { yield 'Error!'; })()); +stream.message((function *() { yield 'Hello'; yield ", World" })(), { symbol: color.cyan('~') }); +``` + +[clack-log-prompts](https://github.com/natemoo-re/clack/blob/main/.github/assets/clack-logs.png) diff --git a/node_modules/@clack/prompts/dist/index.cjs b/node_modules/@clack/prompts/dist/index.cjs new file mode 100644 index 0000000..0d12ccc --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.cjs @@ -0,0 +1,87 @@ +"use strict";const node_util=require("node:util"),core=require("@clack/core"),process$1=require("node:process"),e=require("picocolors"),sisteransi=require("sisteransi");function _interopDefaultCompat(t){return t&&typeof t=="object"&&"default"in t?t.default:t}const process__default=_interopDefaultCompat(process$1),e__default=_interopDefaultCompat(e);function isUnicodeSupported(){return process__default.platform!=="win32"?process__default.env.TERM!=="linux":!!process__default.env.CI||!!process__default.env.WT_SESSION||!!process__default.env.TERMINUS_SUBLIME||process__default.env.ConEmuTask==="{cmd::Cmder}"||process__default.env.TERM_PROGRAM==="Terminus-Sublime"||process__default.env.TERM_PROGRAM==="vscode"||process__default.env.TERM==="xterm-256color"||process__default.env.TERM==="alacritty"||process__default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const P=isUnicodeSupported(),u=(t,o)=>P?t:o,ie=u("\u25C6","*"),L=u("\u25A0","x"),G=u("\u25B2","x"),S=u("\u25C7","o"),ae=u("\u250C","T"),a=u("\u2502","|"),d=u("\u2514","\u2014"),_=u("\u25CF",">"),A=u("\u25CB"," "),C=u("\u25FB","[\u2022]"),V=u("\u25FC","[+]"),N=u("\u25FB","[ ]"),oe=u("\u25AA","\u2022"),j=u("\u2500","-"),le=u("\u256E","+"),ce=u("\u251C","+"),ue=u("\u256F","+"),B=u("\u25CF","\u2022"),W=u("\u25C6","*"),H=u("\u25B2","!"),q=u("\u25A0","x"),v=t=>{switch(t){case"initial":case"active":return e__default.cyan(ie);case"cancel":return e__default.red(L);case"error":return e__default.yellow(G);case"submit":return e__default.green(S)}},E=t=>{const{cursor:o,options:s,style:r}=t,i=t.maxItems??Number.POSITIVE_INFINITY,n=Math.max(process.stdout.rows-4,0),c=Math.min(n,Math.max(i,5));let l=0;o>=l+c-3?l=Math.max(Math.min(o-c+3,s.length-c),0):o0,p=c{const x=y===0&&$,M=y===f.length-1&&p;return x||M?e__default.dim("..."):r(w,y+l===o)})},text=t=>new core.TextPrompt({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){const o=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`,s=t.placeholder?e__default.inverse(t.placeholder[0])+e__default.dim(t.placeholder.slice(1)):e__default.inverse(e__default.hidden("_")),r=this.value?this.valueWithCursor:s;switch(this.state){case"error":return`${o.trim()} +${e__default.yellow(a)} ${r} +${e__default.yellow(d)} ${e__default.yellow(this.error)} +`;case"submit":return`${o}${e__default.gray(a)} ${e__default.dim(this.value||t.placeholder)}`;case"cancel":return`${o}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(this.value??""))}${this.value?.trim()?` +${e__default.gray(a)}`:""}`;default:return`${o}${e__default.cyan(a)} ${r} +${e__default.cyan(d)} +`}}}).prompt(),password=t=>new core.PasswordPrompt({validate:t.validate,mask:t.mask??oe,render(){const o=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`,s=this.valueWithCursor,r=this.masked;switch(this.state){case"error":return`${o.trim()} +${e__default.yellow(a)} ${r} +${e__default.yellow(d)} ${e__default.yellow(this.error)} +`;case"submit":return`${o}${e__default.gray(a)} ${e__default.dim(r)}`;case"cancel":return`${o}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(r??""))}${r?` +${e__default.gray(a)}`:""}`;default:return`${o}${e__default.cyan(a)} ${s} +${e__default.cyan(d)} +`}}}).prompt(),confirm=t=>{const o=t.active??"Yes",s=t.inactive??"No";return new core.ConfirmPrompt({active:o,inactive:s,initialValue:t.initialValue??!0,render(){const r=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`,i=this.value?o:s;switch(this.state){case"submit":return`${r}${e__default.gray(a)} ${e__default.dim(i)}`;case"cancel":return`${r}${e__default.gray(a)} ${e__default.strikethrough(e__default.dim(i))} +${e__default.gray(a)}`;default:return`${r}${e__default.cyan(a)} ${this.value?`${e__default.green(_)} ${o}`:`${e__default.dim(A)} ${e__default.dim(o)}`} ${e__default.dim("/")} ${this.value?`${e__default.dim(A)} ${e__default.dim(s)}`:`${e__default.green(_)} ${s}`} +${e__default.cyan(d)} +`}}}).prompt()},select=t=>{const o=(s,r)=>{const i=s.label??String(s.value);switch(r){case"selected":return`${e__default.dim(i)}`;case"active":return`${e__default.green(_)} ${i} ${s.hint?e__default.dim(`(${s.hint})`):""}`;case"cancelled":return`${e__default.strikethrough(e__default.dim(i))}`;default:return`${e__default.dim(A)} ${e__default.dim(i)}`}};return new core.SelectPrompt({options:t.options,initialValue:t.initialValue,render(){const s=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${o(this.options[this.cursor],"selected")}`;case"cancel":return`${s}${e__default.gray(a)} ${o(this.options[this.cursor],"cancelled")} +${e__default.gray(a)}`;default:return`${s}${e__default.cyan(a)} ${E({cursor:this.cursor,options:this.options,maxItems:t.maxItems,style:(r,i)=>o(r,i?"active":"inactive")}).join(` +${e__default.cyan(a)} `)} +${e__default.cyan(d)} +`}}}).prompt()},selectKey=t=>{const o=(s,r="inactive")=>{const i=s.label??String(s.value);return r==="selected"?`${e__default.dim(i)}`:r==="cancelled"?`${e__default.strikethrough(e__default.dim(i))}`:r==="active"?`${e__default.bgCyan(e__default.gray(` ${s.value} `))} ${i} ${s.hint?e__default.dim(`(${s.hint})`):""}`:`${e__default.gray(e__default.bgWhite(e__default.inverse(` ${s.value} `)))} ${i} ${s.hint?e__default.dim(`(${s.hint})`):""}`};return new core.SelectKeyPrompt({options:t.options,initialValue:t.initialValue,render(){const s=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${o(this.options.find(r=>r.value===this.value)??t.options[0],"selected")}`;case"cancel":return`${s}${e__default.gray(a)} ${o(this.options[0],"cancelled")} +${e__default.gray(a)}`;default:return`${s}${e__default.cyan(a)} ${this.options.map((r,i)=>o(r,i===this.cursor?"active":"inactive")).join(` +${e__default.cyan(a)} `)} +${e__default.cyan(d)} +`}}}).prompt()},multiselect=t=>{const o=(s,r)=>{const i=s.label??String(s.value);return r==="active"?`${e__default.cyan(C)} ${i} ${s.hint?e__default.dim(`(${s.hint})`):""}`:r==="selected"?`${e__default.green(V)} ${e__default.dim(i)}`:r==="cancelled"?`${e__default.strikethrough(e__default.dim(i))}`:r==="active-selected"?`${e__default.green(V)} ${i} ${s.hint?e__default.dim(`(${s.hint})`):""}`:r==="submitted"?`${e__default.dim(i)}`:`${e__default.dim(N)} ${e__default.dim(i)}`};return new core.MultiSelectPrompt({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option. +${e__default.reset(e__default.dim(`Press ${e__default.gray(e__default.bgWhite(e__default.inverse(" space ")))} to select, ${e__default.gray(e__default.bgWhite(e__default.inverse(" enter ")))} to submit`))}`},render(){const s=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`,r=(i,n)=>{const c=this.value.includes(i.value);return n&&c?o(i,"active-selected"):c?o(i,"selected"):o(i,n?"active":"inactive")};switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>o(i,"submitted")).join(e__default.dim(", "))||e__default.dim("none")}`;case"cancel":{const i=this.options.filter(({value:n})=>this.value.includes(n)).map(n=>o(n,"cancelled")).join(e__default.dim(", "));return`${s}${e__default.gray(a)} ${i.trim()?`${i} +${e__default.gray(a)}`:""}`}case"error":{const i=this.error.split(` +`).map((n,c)=>c===0?`${e__default.yellow(d)} ${e__default.yellow(n)}`:` ${n}`).join(` +`);return`${s+e__default.yellow(a)} ${E({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(` +${e__default.yellow(a)} `)} +${i} +`}default:return`${s}${e__default.cyan(a)} ${E({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(` +${e__default.cyan(a)} `)} +${e__default.cyan(d)} +`}}}).prompt()},groupMultiselect=t=>{const o=(s,r,i=[])=>{const n=s.label??String(s.value),c=typeof s.group=="string",l=c&&(i[i.indexOf(s)+1]??{group:!0}),$=c&&l.group===!0,p=c?`${$?d:a} `:"";return r==="active"?`${e__default.dim(p)}${e__default.cyan(C)} ${n} ${s.hint?e__default.dim(`(${s.hint})`):""}`:r==="group-active"?`${p}${e__default.cyan(C)} ${e__default.dim(n)}`:r==="group-active-selected"?`${p}${e__default.green(V)} ${e__default.dim(n)}`:r==="selected"?`${e__default.dim(p)}${e__default.green(V)} ${e__default.dim(n)}`:r==="cancelled"?`${e__default.strikethrough(e__default.dim(n))}`:r==="active-selected"?`${e__default.dim(p)}${e__default.green(V)} ${n} ${s.hint?e__default.dim(`(${s.hint})`):""}`:r==="submitted"?`${e__default.dim(n)}`:`${e__default.dim(p)}${e__default.dim(N)} ${e__default.dim(n)}`};return new core.GroupMultiSelectPrompt({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option. +${e__default.reset(e__default.dim(`Press ${e__default.gray(e__default.bgWhite(e__default.inverse(" space ")))} to select, ${e__default.gray(e__default.bgWhite(e__default.inverse(" enter ")))} to submit`))}`},render(){const s=`${e__default.gray(a)} +${v(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e__default.gray(a)} ${this.options.filter(({value:r})=>this.value.includes(r)).map(r=>o(r,"submitted")).join(e__default.dim(", "))}`;case"cancel":{const r=this.options.filter(({value:i})=>this.value.includes(i)).map(i=>o(i,"cancelled")).join(e__default.dim(", "));return`${s}${e__default.gray(a)} ${r.trim()?`${r} +${e__default.gray(a)}`:""}`}case"error":{const r=this.error.split(` +`).map((i,n)=>n===0?`${e__default.yellow(d)} ${e__default.yellow(i)}`:` ${i}`).join(` +`);return`${s}${e__default.yellow(a)} ${this.options.map((i,n,c)=>{const l=this.value.includes(i.value)||i.group===!0&&this.isGroupSelected(`${i.value}`),$=n===this.cursor;return!$&&typeof i.group=="string"&&this.options[this.cursor].value===i.group?o(i,l?"group-active-selected":"group-active",c):$&&l?o(i,"active-selected",c):l?o(i,"selected",c):o(i,$?"active":"inactive",c)}).join(` +${e__default.yellow(a)} `)} +${r} +`}default:return`${s}${e__default.cyan(a)} ${this.options.map((r,i,n)=>{const c=this.value.includes(r.value)||r.group===!0&&this.isGroupSelected(`${r.value}`),l=i===this.cursor;return!l&&typeof r.group=="string"&&this.options[this.cursor].value===r.group?o(r,c?"group-active-selected":"group-active",n):l&&c?o(r,"active-selected",n):c?o(r,"selected",n):o(r,l?"active":"inactive",n)}).join(` +${e__default.cyan(a)} `)} +${e__default.cyan(d)} +`}}}).prompt()},note=(t="",o="")=>{const s=` +${t} +`.split(` +`),r=node_util.stripVTControlCharacters(o).length,i=Math.max(s.reduce((c,l)=>{const $=node_util.stripVTControlCharacters(l);return $.length>c?$.length:c},0),r)+2,n=s.map(c=>`${e__default.gray(a)} ${e__default.dim(c)}${" ".repeat(i-node_util.stripVTControlCharacters(c).length)}${e__default.gray(a)}`).join(` +`);process.stdout.write(`${e__default.gray(a)} +${e__default.green(S)} ${e__default.reset(o)} ${e__default.gray(j.repeat(Math.max(i-r-1,1))+le)} +${n} +${e__default.gray(ce+j.repeat(i+2)+ue)} +`)},cancel=(t="")=>{process.stdout.write(`${e__default.gray(d)} ${e__default.red(t)} + +`)},intro=(t="")=>{process.stdout.write(`${e__default.gray(ae)} ${t} +`)},outro=(t="")=>{process.stdout.write(`${e__default.gray(a)} +${e__default.gray(d)} ${t} + +`)},log={message:(t="",{symbol:o=e__default.gray(a)}={})=>{const s=[`${e__default.gray(a)}`];if(t){const[r,...i]=t.split(` +`);s.push(`${o} ${r}`,...i.map(n=>`${e__default.gray(a)} ${n}`))}process.stdout.write(`${s.join(` +`)} +`)},info:t=>{log.message(t,{symbol:e__default.blue(B)})},success:t=>{log.message(t,{symbol:e__default.green(W)})},step:t=>{log.message(t,{symbol:e__default.green(S)})},warn:t=>{log.message(t,{symbol:e__default.yellow(H)})},warning:t=>{log.warn(t)},error:t=>{log.message(t,{symbol:e__default.red(q)})}},D=`${e__default.gray(a)} `,stream={message:async(t,{symbol:o=e__default.gray(a)}={})=>{process.stdout.write(`${e__default.gray(a)} +${o} `);let s=3;for await(let r of t){r=r.replace(/\n/g,` +${D}`),r.includes(` +`)&&(s=3+node_util.stripVTControlCharacters(r.slice(r.lastIndexOf(` +`))).length);const i=node_util.stripVTControlCharacters(r).length;s+istream.message(t,{symbol:e__default.blue(B)}),success:t=>stream.message(t,{symbol:e__default.green(W)}),step:t=>stream.message(t,{symbol:e__default.green(S)}),warn:t=>stream.message(t,{symbol:e__default.yellow(H)}),warning:t=>stream.warn(t),error:t=>stream.message(t,{symbol:e__default.red(q)})},spinner=({indicator:t="dots"}={})=>{const o=P?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],s=P?80:120,r=process.env.CI==="true";let i,n,c=!1,l="",$,p=performance.now();const w=m=>{const h=m>1?"Something went wrong":"Canceled";c&&R(h,m)},y=()=>w(2),f=()=>w(1),x=()=>{process.on("uncaughtExceptionMonitor",y),process.on("unhandledRejection",y),process.on("SIGINT",f),process.on("SIGTERM",f),process.on("exit",w)},M=()=>{process.removeListener("uncaughtExceptionMonitor",y),process.removeListener("unhandledRejection",y),process.removeListener("SIGINT",f),process.removeListener("SIGTERM",f),process.removeListener("exit",w)},T=()=>{if($===void 0)return;r&&process.stdout.write(` +`);const m=$.split(` +`);process.stdout.write(sisteransi.cursor.move(-999,m.length-1)),process.stdout.write(sisteransi.erase.down(m.length))},I=m=>m.replace(/\.+$/,""),k=m=>{const h=(performance.now()-m)/1e3,g=Math.floor(h/60),b=Math.floor(h%60);return g>0?`[${g}m ${b}s]`:`[${b}s]`},O=(m="")=>{c=!0,i=core.block(),l=I(m),p=performance.now(),process.stdout.write(`${e__default.gray(a)} +`);let h=0,g=0;x(),n=setInterval(()=>{if(r&&l===$)return;T(),$=l;const b=e__default.magenta(o[h]);if(r)process.stdout.write(`${b} ${l}...`);else if(t==="timer")process.stdout.write(`${b} ${l} ${k(p)}`);else{const F=".".repeat(Math.floor(g)).slice(0,3);process.stdout.write(`${b} ${l}${F}`)}h=h+1{c=!1,clearInterval(n),T();const g=h===0?e__default.green(S):h===1?e__default.red(L):e__default.red(G);l=I(m??l),t==="timer"?process.stdout.write(`${g} ${l} ${k(p)} +`):process.stdout.write(`${g} ${l} +`),M(),i()};return{start:O,stop:R,message:(m="")=>{l=I(m??l)}}},group=async(t,o)=>{const s={},r=Object.keys(t);for(const i of r){const n=t[i],c=await n({results:s})?.catch(l=>{throw l});if(typeof o?.onCancel=="function"&&core.isCancel(c)){s[i]="canceled",o.onCancel({results:s});continue}s[i]=c}return s},tasks=async t=>{for(const o of t){if(o.enabled===!1)continue;const s=spinner();s.start(o.title);const r=await o.task(s.message);s.stop(r||o.title)}};exports.isCancel=core.isCancel,exports.updateSettings=core.updateSettings,exports.cancel=cancel,exports.confirm=confirm,exports.group=group,exports.groupMultiselect=groupMultiselect,exports.intro=intro,exports.log=log,exports.multiselect=multiselect,exports.note=note,exports.outro=outro,exports.password=password,exports.select=select,exports.selectKey=selectKey,exports.spinner=spinner,exports.stream=stream,exports.tasks=tasks,exports.text=text; +//# sourceMappingURL=index.cjs.map diff --git a/node_modules/@clack/prompts/dist/index.cjs.map b/node_modules/@clack/prompts/dist/index.cjs.map new file mode 100644 index 0000000..65a67e2 --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tif (process.platform !== 'win32') {\n\t\treturn process.env.TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(process.env.CI)\n\t\t|| Boolean(process.env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| process.env.TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| process.env.TERM_PROGRAM === 'vscode'\n\t\t|| process.env.TERM === 'xterm-256color'\n\t\t|| process.env.TERM === 'alacritty'\n\t\t|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import { stripVTControlCharacters as strip } from 'node:util';\nimport {\n\tConfirmPrompt,\n\tGroupMultiSelectPrompt,\n\tMultiSelectPrompt,\n\tPasswordPrompt,\n\tSelectKeyPrompt,\n\tSelectPrompt,\n\ttype State,\n\tTextPrompt,\n\tblock,\n\tisCancel,\n} from '@clack/core';\nimport isUnicodeSupported from 'is-unicode-supported';\nimport color from 'picocolors';\nimport { cursor, erase } from 'sisteransi';\n\nexport { isCancel } from '@clack/core';\nexport { updateSettings, type ClackSettings } from '@clack/core';\n\nconst unicode = isUnicodeSupported();\nconst s = (c: string, fallback: string) => (unicode ? c : fallback);\nconst S_STEP_ACTIVE = s('◆', '*');\nconst S_STEP_CANCEL = s('■', 'x');\nconst S_STEP_ERROR = s('▲', 'x');\nconst S_STEP_SUBMIT = s('◇', 'o');\n\nconst S_BAR_START = s('┌', 'T');\nconst S_BAR = s('│', '|');\nconst S_BAR_END = s('└', '—');\n\nconst S_RADIO_ACTIVE = s('●', '>');\nconst S_RADIO_INACTIVE = s('○', ' ');\nconst S_CHECKBOX_ACTIVE = s('◻', '[•]');\nconst S_CHECKBOX_SELECTED = s('◼', '[+]');\nconst S_CHECKBOX_INACTIVE = s('◻', '[ ]');\nconst S_PASSWORD_MASK = s('▪', '•');\n\nconst S_BAR_H = s('─', '-');\nconst S_CORNER_TOP_RIGHT = s('╮', '+');\nconst S_CONNECT_LEFT = s('├', '+');\nconst S_CORNER_BOTTOM_RIGHT = s('╯', '+');\n\nconst S_INFO = s('●', '•');\nconst S_SUCCESS = s('◆', '*');\nconst S_WARN = s('▲', '!');\nconst S_ERROR = s('■', 'x');\n\nconst symbol = (state: State) => {\n\tswitch (state) {\n\t\tcase 'initial':\n\t\tcase 'active':\n\t\t\treturn color.cyan(S_STEP_ACTIVE);\n\t\tcase 'cancel':\n\t\t\treturn color.red(S_STEP_CANCEL);\n\t\tcase 'error':\n\t\t\treturn color.yellow(S_STEP_ERROR);\n\t\tcase 'submit':\n\t\t\treturn color.green(S_STEP_SUBMIT);\n\t}\n};\n\ninterface LimitOptionsParams {\n\toptions: TOption[];\n\tmaxItems: number | undefined;\n\tcursor: number;\n\tstyle: (option: TOption, active: boolean) => string;\n}\n\nconst limitOptions = (params: LimitOptionsParams): string[] => {\n\tconst { cursor, options, style } = params;\n\n\tconst paramMaxItems = params.maxItems ?? Number.POSITIVE_INFINITY;\n\tconst outputMaxItems = Math.max(process.stdout.rows - 4, 0);\n\t// We clamp to minimum 5 because anything less doesn't make sense UX wise\n\tconst maxItems = Math.min(outputMaxItems, Math.max(paramMaxItems, 5));\n\tlet slidingWindowLocation = 0;\n\n\tif (cursor >= slidingWindowLocation + maxItems - 3) {\n\t\tslidingWindowLocation = Math.max(Math.min(cursor - maxItems + 3, options.length - maxItems), 0);\n\t} else if (cursor < slidingWindowLocation + 2) {\n\t\tslidingWindowLocation = Math.max(cursor - 2, 0);\n\t}\n\n\tconst shouldRenderTopEllipsis = maxItems < options.length && slidingWindowLocation > 0;\n\tconst shouldRenderBottomEllipsis =\n\t\tmaxItems < options.length && slidingWindowLocation + maxItems < options.length;\n\n\treturn options\n\t\t.slice(slidingWindowLocation, slidingWindowLocation + maxItems)\n\t\t.map((option, i, arr) => {\n\t\t\tconst isTopLimit = i === 0 && shouldRenderTopEllipsis;\n\t\t\tconst isBottomLimit = i === arr.length - 1 && shouldRenderBottomEllipsis;\n\t\t\treturn isTopLimit || isBottomLimit\n\t\t\t\t? color.dim('...')\n\t\t\t\t: style(option, i + slidingWindowLocation === cursor);\n\t\t});\n};\n\nexport interface TextOptions {\n\tmessage: string;\n\tplaceholder?: string;\n\tdefaultValue?: string;\n\tinitialValue?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const text = (opts: TextOptions) => {\n\treturn new TextPrompt({\n\t\tvalidate: opts.validate,\n\t\tplaceholder: opts.placeholder,\n\t\tdefaultValue: opts.defaultValue,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst placeholder = opts.placeholder\n\t\t\t\t? color.inverse(opts.placeholder[0]) + color.dim(opts.placeholder.slice(1))\n\t\t\t\t: color.inverse(color.hidden('_'));\n\t\t\tconst value = !this.value ? placeholder : this.valueWithCursor;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${value}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(this.value || opts.placeholder)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(this.value ?? '')\n\t\t\t\t\t)}${this.value?.trim() ? `\\n${color.gray(S_BAR)}` : ''}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface PasswordOptions {\n\tmessage: string;\n\tmask?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const password = (opts: PasswordOptions) => {\n\treturn new PasswordPrompt({\n\t\tvalidate: opts.validate,\n\t\tmask: opts.mask ?? S_PASSWORD_MASK,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.valueWithCursor;\n\t\t\tconst masked = this.masked;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${masked}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(masked)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(color.dim(masked ?? ''))}${\n\t\t\t\t\t\tmasked ? `\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface ConfirmOptions {\n\tmessage: string;\n\tactive?: string;\n\tinactive?: string;\n\tinitialValue?: boolean;\n}\nexport const confirm = (opts: ConfirmOptions) => {\n\tconst active = opts.active ?? 'Yes';\n\tconst inactive = opts.inactive ?? 'No';\n\treturn new ConfirmPrompt({\n\t\tactive,\n\t\tinactive,\n\t\tinitialValue: opts.initialValue ?? true,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.value ? active : inactive;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(value)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(value)\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${\n\t\t\t\t\t\tthis.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${active}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(active)}`\n\t\t\t\t\t} ${color.dim('/')} ${\n\t\t\t\t\t\t!this.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${inactive}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(inactive)}`\n\t\t\t\t\t}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\ntype Primitive = Readonly;\n\nexport type Option = Value extends Primitive\n\t? {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * The optional, user-facing text for this option.\n\t\t\t *\n\t\t\t * By default, the `value` is converted to a string.\n\t\t\t */\n\t\t\tlabel?: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t}\n\t: {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * Required. The user-facing text for this option.\n\t\t\t */\n\t\t\tlabel: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t};\n\nexport interface SelectOptions {\n\tmessage: string;\n\toptions: Option[];\n\tinitialValue?: Value;\n\tmaxItems?: number;\n}\n\nexport const select = (opts: SelectOptions) => {\n\tconst opt = (option: Option, state: 'inactive' | 'active' | 'selected' | 'cancelled') => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tswitch (state) {\n\t\t\tcase 'selected':\n\t\t\t\treturn `${color.dim(label)}`;\n\t\t\tcase 'active':\n\t\t\t\treturn `${color.green(S_RADIO_ACTIVE)} ${label} ${\n\t\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t\t}`;\n\t\t\tcase 'cancelled':\n\t\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t\tdefault:\n\t\t\t\treturn `${color.dim(S_RADIO_INACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t};\n\n\treturn new SelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[this.cursor], 'selected')}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options[this.cursor],\n\t\t\t\t\t\t'cancelled'\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: (item, active) => opt(item, active ? 'active' : 'inactive'),\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport const selectKey = (opts: SelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'cancelled' = 'inactive'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active') {\n\t\t\treturn `${color.bgCyan(color.gray(` ${option.value} `))} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\treturn `${color.gray(color.bgWhite(color.inverse(` ${option.value} `)))} ${label} ${\n\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t}`;\n\t};\n\n\treturn new SelectKeyPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options.find((opt) => opt.value === this.value) ?? opts.options[0],\n\t\t\t\t\t\t'selected'\n\t\t\t\t\t)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[0], 'cancelled')}\\n${color.gray(\n\t\t\t\t\t\tS_BAR\n\t\t\t\t\t)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i) => opt(option, i === this.cursor ? 'active' : 'inactive'))\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface MultiSelectOptions {\n\tmessage: string;\n\toptions: Option[];\n\tinitialValues?: Value[];\n\tmaxItems?: number;\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const multiselect = (opts: MultiSelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'active-selected' | 'submitted' | 'cancelled'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'active') {\n\t\t\treturn `${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new MultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tconst styleOption = (option: Option, active: boolean) => {\n\t\t\t\tconst selected = this.value.includes(option.value);\n\t\t\t\tif (active && selected) {\n\t\t\t\t\treturn opt(option, 'active-selected');\n\t\t\t\t}\n\t\t\t\tif (selected) {\n\t\t\t\t\treturn opt(option, 'selected');\n\t\t\t\t}\n\t\t\t\treturn opt(option, active ? 'active' : 'inactive');\n\t\t\t};\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tthis.options\n\t\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t\t.join(color.dim(', ')) || color.dim('none')\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title + color.yellow(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface GroupMultiSelectOptions {\n\tmessage: string;\n\toptions: Record[]>;\n\tinitialValues?: Value[];\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const groupMultiselect = (opts: GroupMultiSelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate:\n\t\t\t| 'inactive'\n\t\t\t| 'active'\n\t\t\t| 'selected'\n\t\t\t| 'active-selected'\n\t\t\t| 'group-active'\n\t\t\t| 'group-active-selected'\n\t\t\t| 'submitted'\n\t\t\t| 'cancelled',\n\t\toptions: Option[] = []\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tconst isItem = typeof (option as any).group === 'string';\n\t\tconst next = isItem && (options[options.indexOf(option) + 1] ?? { group: true });\n\t\tconst isLast = isItem && (next as any).group === true;\n\t\tconst prefix = isItem ? `${isLast ? S_BAR_END : S_BAR} ` : '';\n\n\t\tif (state === 'active') {\n\t\t\treturn `${color.dim(prefix)}${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'group-active') {\n\t\t\treturn `${prefix}${color.cyan(S_CHECKBOX_ACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'group-active-selected') {\n\t\t\treturn `${prefix}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(prefix)}${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new GroupMultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t.join(color.dim(', '))}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title}${color.yellow(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport const note = (message = '', title = '') => {\n\tconst lines = `\\n${message}\\n`.split('\\n');\n\tconst titleLen = strip(title).length;\n\tconst len =\n\t\tMath.max(\n\t\t\tlines.reduce((sum, ln) => {\n\t\t\t\tconst line = strip(ln);\n\t\t\t\treturn line.length > sum ? line.length : sum;\n\t\t\t}, 0),\n\t\t\ttitleLen\n\t\t) + 2;\n\tconst msg = lines\n\t\t.map(\n\t\t\t(ln) =>\n\t\t\t\t`${color.gray(S_BAR)} ${color.dim(ln)}${' '.repeat(len - strip(ln).length)}${color.gray(\n\t\t\t\t\tS_BAR\n\t\t\t\t)}`\n\t\t)\n\t\t.join('\\n');\n\tprocess.stdout.write(\n\t\t`${color.gray(S_BAR)}\\n${color.green(S_STEP_SUBMIT)} ${color.reset(title)} ${color.gray(\n\t\t\tS_BAR_H.repeat(Math.max(len - titleLen - 1, 1)) + S_CORNER_TOP_RIGHT\n\t\t)}\\n${msg}\\n${color.gray(S_CONNECT_LEFT + S_BAR_H.repeat(len + 2) + S_CORNER_BOTTOM_RIGHT)}\\n`\n\t);\n};\n\nexport const cancel = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_END)} ${color.red(message)}\\n\\n`);\n};\n\nexport const intro = (title = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_START)} ${title}\\n`);\n};\n\nexport const outro = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR)}\\n${color.gray(S_BAR_END)} ${message}\\n\\n`);\n};\n\nexport type LogMessageOptions = {\n\tsymbol?: string;\n};\nexport const log = {\n\tmessage: (message = '', { symbol = color.gray(S_BAR) }: LogMessageOptions = {}) => {\n\t\tconst parts = [`${color.gray(S_BAR)}`];\n\t\tif (message) {\n\t\t\tconst [firstLine, ...lines] = message.split('\\n');\n\t\t\tparts.push(`${symbol} ${firstLine}`, ...lines.map((ln) => `${color.gray(S_BAR)} ${ln}`));\n\t\t}\n\t\tprocess.stdout.write(`${parts.join('\\n')}\\n`);\n\t},\n\tinfo: (message: string) => {\n\t\tlog.message(message, { symbol: color.blue(S_INFO) });\n\t},\n\tsuccess: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_SUCCESS) });\n\t},\n\tstep: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_STEP_SUBMIT) });\n\t},\n\twarn: (message: string) => {\n\t\tlog.message(message, { symbol: color.yellow(S_WARN) });\n\t},\n\t/** alias for `log.warn()`. */\n\twarning: (message: string) => {\n\t\tlog.warn(message);\n\t},\n\terror: (message: string) => {\n\t\tlog.message(message, { symbol: color.red(S_ERROR) });\n\t},\n};\n\nconst prefix = `${color.gray(S_BAR)} `;\nexport const stream = {\n\tmessage: async (\n\t\titerable: Iterable | AsyncIterable,\n\t\t{ symbol = color.gray(S_BAR) }: LogMessageOptions = {}\n\t) => {\n\t\tprocess.stdout.write(`${color.gray(S_BAR)}\\n${symbol} `);\n\t\tlet lineWidth = 3;\n\t\tfor await (let chunk of iterable) {\n\t\t\tchunk = chunk.replace(/\\n/g, `\\n${prefix}`);\n\t\t\tif (chunk.includes('\\n')) {\n\t\t\t\tlineWidth = 3 + strip(chunk.slice(chunk.lastIndexOf('\\n'))).length;\n\t\t\t}\n\t\t\tconst chunkLen = strip(chunk).length;\n\t\t\tif (lineWidth + chunkLen < process.stdout.columns) {\n\t\t\t\tlineWidth += chunkLen;\n\t\t\t\tprocess.stdout.write(chunk);\n\t\t\t} else {\n\t\t\t\tprocess.stdout.write(`\\n${prefix}${chunk.trimStart()}`);\n\t\t\t\tlineWidth = 3 + strip(chunk.trimStart()).length;\n\t\t\t}\n\t\t}\n\t\tprocess.stdout.write('\\n');\n\t},\n\tinfo: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.blue(S_INFO) });\n\t},\n\tsuccess: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.green(S_SUCCESS) });\n\t},\n\tstep: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.green(S_STEP_SUBMIT) });\n\t},\n\twarn: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.yellow(S_WARN) });\n\t},\n\t/** alias for `log.warn()`. */\n\twarning: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.warn(iterable);\n\t},\n\terror: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.red(S_ERROR) });\n\t},\n};\n\nexport interface SpinnerOptions {\n\tindicator?: 'dots' | 'timer';\n}\n\nexport const spinner = ({ indicator = 'dots' }: SpinnerOptions = {}) => {\n\tconst frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];\n\tconst delay = unicode ? 80 : 120;\n\tconst isCI = process.env.CI === 'true';\n\n\tlet unblock: () => void;\n\tlet loop: NodeJS.Timeout;\n\tlet isSpinnerActive = false;\n\tlet _message = '';\n\tlet _prevMessage: string | undefined = undefined;\n\tlet _origin: number = performance.now();\n\n\tconst handleExit = (code: number) => {\n\t\tconst msg = code > 1 ? 'Something went wrong' : 'Canceled';\n\t\tif (isSpinnerActive) stop(msg, code);\n\t};\n\n\tconst errorEventHandler = () => handleExit(2);\n\tconst signalEventHandler = () => handleExit(1);\n\n\tconst registerHooks = () => {\n\t\t// Reference: https://nodejs.org/api/process.html#event-uncaughtexception\n\t\tprocess.on('uncaughtExceptionMonitor', errorEventHandler);\n\t\t// Reference: https://nodejs.org/api/process.html#event-unhandledrejection\n\t\tprocess.on('unhandledRejection', errorEventHandler);\n\t\t// Reference Signal Events: https://nodejs.org/api/process.html#signal-events\n\t\tprocess.on('SIGINT', signalEventHandler);\n\t\tprocess.on('SIGTERM', signalEventHandler);\n\t\tprocess.on('exit', handleExit);\n\t};\n\n\tconst clearHooks = () => {\n\t\tprocess.removeListener('uncaughtExceptionMonitor', errorEventHandler);\n\t\tprocess.removeListener('unhandledRejection', errorEventHandler);\n\t\tprocess.removeListener('SIGINT', signalEventHandler);\n\t\tprocess.removeListener('SIGTERM', signalEventHandler);\n\t\tprocess.removeListener('exit', handleExit);\n\t};\n\n\tconst clearPrevMessage = () => {\n\t\tif (_prevMessage === undefined) return;\n\t\tif (isCI) process.stdout.write('\\n');\n\t\tconst prevLines = _prevMessage.split('\\n');\n\t\tprocess.stdout.write(cursor.move(-999, prevLines.length - 1));\n\t\tprocess.stdout.write(erase.down(prevLines.length));\n\t};\n\n\tconst parseMessage = (msg: string): string => {\n\t\treturn msg.replace(/\\.+$/, '');\n\t};\n\n\tconst formatTimer = (origin: number): string => {\n\t\tconst duration = (performance.now() - origin) / 1000;\n\t\tconst min = Math.floor(duration / 60);\n\t\tconst secs = Math.floor(duration % 60);\n\t\treturn min > 0 ? `[${min}m ${secs}s]` : `[${secs}s]`;\n\t};\n\n\tconst start = (msg = ''): void => {\n\t\tisSpinnerActive = true;\n\t\tunblock = block();\n\t\t_message = parseMessage(msg);\n\t\t_origin = performance.now();\n\t\tprocess.stdout.write(`${color.gray(S_BAR)}\\n`);\n\t\tlet frameIndex = 0;\n\t\tlet indicatorTimer = 0;\n\t\tregisterHooks();\n\t\tloop = setInterval(() => {\n\t\t\tif (isCI && _message === _prevMessage) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tclearPrevMessage();\n\t\t\t_prevMessage = _message;\n\t\t\tconst frame = color.magenta(frames[frameIndex]);\n\n\t\t\tif (isCI) {\n\t\t\t\tprocess.stdout.write(`${frame} ${_message}...`);\n\t\t\t} else if (indicator === 'timer') {\n\t\t\t\tprocess.stdout.write(`${frame} ${_message} ${formatTimer(_origin)}`);\n\t\t\t} else {\n\t\t\t\tconst loadingDots = '.'.repeat(Math.floor(indicatorTimer)).slice(0, 3);\n\t\t\t\tprocess.stdout.write(`${frame} ${_message}${loadingDots}`);\n\t\t\t}\n\n\t\t\tframeIndex = frameIndex + 1 < frames.length ? frameIndex + 1 : 0;\n\t\t\tindicatorTimer = indicatorTimer < frames.length ? indicatorTimer + 0.125 : 0;\n\t\t}, delay);\n\t};\n\n\tconst stop = (msg = '', code = 0): void => {\n\t\tisSpinnerActive = false;\n\t\tclearInterval(loop);\n\t\tclearPrevMessage();\n\t\tconst step =\n\t\t\tcode === 0\n\t\t\t\t? color.green(S_STEP_SUBMIT)\n\t\t\t\t: code === 1\n\t\t\t\t\t? color.red(S_STEP_CANCEL)\n\t\t\t\t\t: color.red(S_STEP_ERROR);\n\t\t_message = parseMessage(msg ?? _message);\n\t\tif (indicator === 'timer') {\n\t\t\tprocess.stdout.write(`${step} ${_message} ${formatTimer(_origin)}\\n`);\n\t\t} else {\n\t\t\tprocess.stdout.write(`${step} ${_message}\\n`);\n\t\t}\n\t\tclearHooks();\n\t\tunblock();\n\t};\n\n\tconst message = (msg = ''): void => {\n\t\t_message = parseMessage(msg ?? _message);\n\t};\n\n\treturn {\n\t\tstart,\n\t\tstop,\n\t\tmessage,\n\t};\n};\n\nexport type PromptGroupAwaitedReturn = {\n\t[P in keyof T]: Exclude, symbol>;\n};\n\nexport interface PromptGroupOptions {\n\t/**\n\t * Control how the group can be canceled\n\t * if one of the prompts is canceled.\n\t */\n\tonCancel?: (opts: { results: Prettify>> }) => void;\n}\n\ntype Prettify = {\n\t[P in keyof T]: T[P];\n} & {};\n\nexport type PromptGroup = {\n\t[P in keyof T]: (opts: {\n\t\tresults: Prettify>>>;\n\t}) => undefined | Promise;\n};\n\n/**\n * Define a group of prompts to be displayed\n * and return a results of objects within the group\n */\nexport const group = async (\n\tprompts: PromptGroup,\n\topts?: PromptGroupOptions\n): Promise>> => {\n\tconst results = {} as any;\n\tconst promptNames = Object.keys(prompts);\n\n\tfor (const name of promptNames) {\n\t\tconst prompt = prompts[name as keyof T];\n\t\tconst result = await prompt({ results })?.catch((e) => {\n\t\t\tthrow e;\n\t\t});\n\n\t\t// Pass the results to the onCancel function\n\t\t// so the user can decide what to do with the results\n\t\t// TODO: Switch to callback within core to avoid isCancel Fn\n\t\tif (typeof opts?.onCancel === 'function' && isCancel(result)) {\n\t\t\tresults[name] = 'canceled';\n\t\t\topts.onCancel({ results });\n\t\t\tcontinue;\n\t\t}\n\n\t\tresults[name] = result;\n\t}\n\n\treturn results;\n};\n\nexport type Task = {\n\t/**\n\t * Task title\n\t */\n\ttitle: string;\n\t/**\n\t * Task function\n\t */\n\ttask: (message: (string: string) => void) => string | Promise | void | Promise;\n\n\t/**\n\t * If enabled === false the task will be skipped\n\t */\n\tenabled?: boolean;\n};\n\n/**\n * Define a group of tasks to be executed\n */\nexport const tasks = async (tasks: Task[]) => {\n\tfor (const task of tasks) {\n\t\tif (task.enabled === false) continue;\n\n\t\tconst s = spinner();\n\t\ts.start(task.title);\n\t\tconst result = await task.task(s.message);\n\t\ts.stop(result || task.title);\n\t}\n};\n"],"names":["process","unicode","isUnicodeSupported","s","c","fallback","S_STEP_ACTIVE","S_STEP_CANCEL","S_STEP_ERROR","S_STEP_SUBMIT","S_BAR_START","S_BAR","S_BAR_END","S_RADIO_ACTIVE","S_RADIO_INACTIVE","S_CHECKBOX_ACTIVE","S_CHECKBOX_SELECTED","S_CHECKBOX_INACTIVE","S_PASSWORD_MASK","S_BAR_H","S_CORNER_TOP_RIGHT","S_CONNECT_LEFT","S_CORNER_BOTTOM_RIGHT","S_INFO","S_SUCCESS","S_WARN","S_ERROR","symbol","state","color","limitOptions","params","cursor","options","style","paramMaxItems","outputMaxItems","maxItems","slidingWindowLocation","shouldRenderTopEllipsis","shouldRenderBottomEllipsis","option","i","arr","isTopLimit","isBottomLimit","opts","TextPrompt","title","placeholder","value","PasswordPrompt","masked","active","inactive","ConfirmPrompt","opt","label","SelectPrompt","item","SelectKeyPrompt","MultiSelectPrompt","selected","styleOption","footer","ln","isItem","next","isLast","prefix","GroupMultiSelectPrompt","message","lines","titleLen","strip","len","sum","line","msg","parts","firstLine","iterable","lineWidth","chunk","chunkLen","indicator","frames","delay","isCI","unblock","loop","isSpinnerActive","_message","_prevMessage","_origin","handleExit","code","stop","errorEventHandler","signalEventHandler","registerHooks","clearHooks","clearPrevMessage","prevLines","erase","parseMessage","formatTimer","origin","duration","min","secs","start","block","frameIndex","indicatorTimer","frame","loadingDots","step","prompts","results","promptNames","name","prompt","result","e","isCancel","tasks","task"],"mappings":"+VAEe,SAAS,oBAAqB,CAC5C,OAAIA,iBAAQ,WAAa,QACjBA,iBAAQ,IAAI,OAAS,QAGtB,EAAQA,iBAAQ,IAAI,IACvB,EAAQA,iBAAQ,IAAI,YACpB,EAAQA,iBAAQ,IAAI,kBACpBA,iBAAQ,IAAI,aAAe,gBAC3BA,iBAAQ,IAAI,eAAiB,oBAC7BA,iBAAQ,IAAI,eAAiB,UAC7BA,iBAAQ,IAAI,OAAS,kBACrBA,iBAAQ,IAAI,OAAS,aACrBA,iBAAQ,IAAI,oBAAsB,oBACvC,CCIA,MAAMC,EAAUC,qBACVC,EAAI,CAACC,EAAWC,IAAsBJ,EAAUG,EAAIC,EACpDC,GAAgBH,EAAE,SAAK,GAAG,EAC1BI,EAAgBJ,EAAE,SAAK,GAAG,EAC1BK,EAAeL,EAAE,SAAK,GAAG,EACzBM,EAAgBN,EAAE,SAAK,GAAG,EAE1BO,GAAcP,EAAE,SAAK,GAAG,EACxBQ,EAAQR,EAAE,SAAK,GAAG,EAClBS,EAAYT,EAAE,SAAK,QAAG,EAEtBU,EAAiBV,EAAE,SAAK,GAAG,EAC3BW,EAAmBX,EAAE,SAAK,GAAG,EAC7BY,EAAoBZ,EAAE,SAAK,UAAK,EAChCa,EAAsBb,EAAE,SAAK,KAAK,EAClCc,EAAsBd,EAAE,SAAK,KAAK,EAClCe,GAAkBf,EAAE,SAAK,QAAG,EAE5BgB,EAAUhB,EAAE,SAAK,GAAG,EACpBiB,GAAqBjB,EAAE,SAAK,GAAG,EAC/BkB,GAAiBlB,EAAE,SAAK,GAAG,EAC3BmB,GAAwBnB,EAAE,SAAK,GAAG,EAElCoB,EAASpB,EAAE,SAAK,QAAG,EACnBqB,EA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E,EAAS,MAAMD,EAAO,CAAE,QAAAH,CAAQ,CAAC,GAAG,MAAOK,GAAM,CACtD,MAAMA,CACP,CAAC,EAKD,GAAI,OAAO9E,GAAM,UAAa,YAAc+E,KAAAA,SAASF,CAAM,EAAG,CAC7DJ,EAAQE,CAAI,EAAI,WAChB3E,EAAK,SAAS,CAAE,QAAAyE,CAAQ,CAAC,EACzB,QACD,CAEAA,EAAQE,CAAI,EAAIE,CACjB,CAEA,OAAOJ,CACR,EAqBa,MAAQ,MAAOO,GAAkB,CAC7C,UAAWC,KAAQD,EAAO,CACzB,GAAIC,EAAK,UAAY,GAAO,SAE5B,MAAM5H,EAAI,UACVA,EAAE,MAAM4H,EAAK,KAAK,EAClB,MAAMJ,EAAS,MAAMI,EAAK,KAAK5H,EAAE,OAAO,EACxCA,EAAE,KAAKwH,GAAUI,EAAK,KAAK,CAC5B,CACD","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_modules/@clack/prompts/dist/index.d.cts b/node_modules/@clack/prompts/dist/index.d.cts new file mode 100644 index 0000000..3a1efba --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.d.cts @@ -0,0 +1,164 @@ +export { ClackSettings, isCancel, updateSettings } from '@clack/core'; + +interface TextOptions { + message: string; + placeholder?: string; + defaultValue?: string; + initialValue?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const text: (opts: TextOptions) => Promise; +interface PasswordOptions { + message: string; + mask?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const password: (opts: PasswordOptions) => Promise; +interface ConfirmOptions { + message: string; + active?: string; + inactive?: string; + initialValue?: boolean; +} +declare const confirm: (opts: ConfirmOptions) => Promise; +type Primitive = Readonly; +type Option = Value extends Primitive ? { + /** + * Internal data for this option. + */ + value: Value; + /** + * The optional, user-facing text for this option. + * + * By default, the `value` is converted to a string. + */ + label?: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +} : { + /** + * Internal data for this option. + */ + value: Value; + /** + * Required. The user-facing text for this option. + */ + label: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +}; +interface SelectOptions { + message: string; + options: Option[]; + initialValue?: Value; + maxItems?: number; +} +declare const select: (opts: SelectOptions) => Promise; +declare const selectKey: (opts: SelectOptions) => Promise; +interface MultiSelectOptions { + message: string; + options: Option[]; + initialValues?: Value[]; + maxItems?: number; + required?: boolean; + cursorAt?: Value; +} +declare const multiselect: (opts: MultiSelectOptions) => Promise; +interface GroupMultiSelectOptions { + message: string; + options: Record[]>; + initialValues?: Value[]; + required?: boolean; + cursorAt?: Value; +} +declare const groupMultiselect: (opts: GroupMultiSelectOptions) => Promise; +declare const note: (message?: string, title?: string) => void; +declare const cancel: (message?: string) => void; +declare const intro: (title?: string) => void; +declare const outro: (message?: string) => void; +type LogMessageOptions = { + symbol?: string; +}; +declare const log: { + message: (message?: string, { symbol }?: LogMessageOptions) => void; + info: (message: string) => void; + success: (message: string) => void; + step: (message: string) => void; + warn: (message: string) => void; + /** alias for `log.warn()`. */ + warning: (message: string) => void; + error: (message: string) => void; +}; +declare const stream: { + message: (iterable: Iterable | AsyncIterable, { symbol }?: LogMessageOptions) => Promise; + info: (iterable: Iterable | AsyncIterable) => Promise; + success: (iterable: Iterable | AsyncIterable) => Promise; + step: (iterable: Iterable | AsyncIterable) => Promise; + warn: (iterable: Iterable | AsyncIterable) => Promise; + /** alias for `log.warn()`. */ + warning: (iterable: Iterable | AsyncIterable) => Promise; + error: (iterable: Iterable | AsyncIterable) => Promise; +}; +interface SpinnerOptions { + indicator?: 'dots' | 'timer'; +} +declare const spinner: ({ indicator }?: SpinnerOptions) => { + start: (msg?: string) => void; + stop: (msg?: string, code?: number) => void; + message: (msg?: string) => void; +}; +type PromptGroupAwaitedReturn = { + [P in keyof T]: Exclude, symbol>; +}; +interface PromptGroupOptions { + /** + * Control how the group can be canceled + * if one of the prompts is canceled. + */ + onCancel?: (opts: { + results: Prettify>>; + }) => void; +} +type Prettify = { + [P in keyof T]: T[P]; +} & {}; +type PromptGroup = { + [P in keyof T]: (opts: { + results: Prettify>>>; + }) => undefined | Promise; +}; +/** + * Define a group of prompts to be displayed + * and return a results of objects within the group + */ +declare const group: (prompts: PromptGroup, opts?: PromptGroupOptions | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn]: PromptGroupAwaitedReturn[P]; }>; +type Task = { + /** + * Task title + */ + title: string; + /** + * Task function + */ + task: (message: (string: string) => void) => string | Promise | void | Promise; + /** + * If enabled === false the task will be skipped + */ + enabled?: boolean; +}; +/** + * Define a group of tasks to be executed + */ +declare const tasks: (tasks: Task[]) => Promise; + +export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type SpinnerOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, stream, tasks, text }; diff --git a/node_modules/@clack/prompts/dist/index.d.mts b/node_modules/@clack/prompts/dist/index.d.mts new file mode 100644 index 0000000..3a1efba --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.d.mts @@ -0,0 +1,164 @@ +export { ClackSettings, isCancel, updateSettings } from '@clack/core'; + +interface TextOptions { + message: string; + placeholder?: string; + defaultValue?: string; + initialValue?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const text: (opts: TextOptions) => Promise; +interface PasswordOptions { + message: string; + mask?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const password: (opts: PasswordOptions) => Promise; +interface ConfirmOptions { + message: string; + active?: string; + inactive?: string; + initialValue?: boolean; +} +declare const confirm: (opts: ConfirmOptions) => Promise; +type Primitive = Readonly; +type Option = Value extends Primitive ? { + /** + * Internal data for this option. + */ + value: Value; + /** + * The optional, user-facing text for this option. + * + * By default, the `value` is converted to a string. + */ + label?: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +} : { + /** + * Internal data for this option. + */ + value: Value; + /** + * Required. The user-facing text for this option. + */ + label: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +}; +interface SelectOptions { + message: string; + options: Option[]; + initialValue?: Value; + maxItems?: number; +} +declare const select: (opts: SelectOptions) => Promise; +declare const selectKey: (opts: SelectOptions) => Promise; +interface MultiSelectOptions { + message: string; + options: Option[]; + initialValues?: Value[]; + maxItems?: number; + required?: boolean; + cursorAt?: Value; +} +declare const multiselect: (opts: MultiSelectOptions) => Promise; +interface GroupMultiSelectOptions { + message: string; + options: Record[]>; + initialValues?: Value[]; + required?: boolean; + cursorAt?: Value; +} +declare const groupMultiselect: (opts: GroupMultiSelectOptions) => Promise; +declare const note: (message?: string, title?: string) => void; +declare const cancel: (message?: string) => void; +declare const intro: (title?: string) => void; +declare const outro: (message?: string) => void; +type LogMessageOptions = { + symbol?: string; +}; +declare const log: { + message: (message?: string, { symbol }?: LogMessageOptions) => void; + info: (message: string) => void; + success: (message: string) => void; + step: (message: string) => void; + warn: (message: string) => void; + /** alias for `log.warn()`. */ + warning: (message: string) => void; + error: (message: string) => void; +}; +declare const stream: { + message: (iterable: Iterable | AsyncIterable, { symbol }?: LogMessageOptions) => Promise; + info: (iterable: Iterable | AsyncIterable) => Promise; + success: (iterable: Iterable | AsyncIterable) => Promise; + step: (iterable: Iterable | AsyncIterable) => Promise; + warn: (iterable: Iterable | AsyncIterable) => Promise; + /** alias for `log.warn()`. */ + warning: (iterable: Iterable | AsyncIterable) => Promise; + error: (iterable: Iterable | AsyncIterable) => Promise; +}; +interface SpinnerOptions { + indicator?: 'dots' | 'timer'; +} +declare const spinner: ({ indicator }?: SpinnerOptions) => { + start: (msg?: string) => void; + stop: (msg?: string, code?: number) => void; + message: (msg?: string) => void; +}; +type PromptGroupAwaitedReturn = { + [P in keyof T]: Exclude, symbol>; +}; +interface PromptGroupOptions { + /** + * Control how the group can be canceled + * if one of the prompts is canceled. + */ + onCancel?: (opts: { + results: Prettify>>; + }) => void; +} +type Prettify = { + [P in keyof T]: T[P]; +} & {}; +type PromptGroup = { + [P in keyof T]: (opts: { + results: Prettify>>>; + }) => undefined | Promise; +}; +/** + * Define a group of prompts to be displayed + * and return a results of objects within the group + */ +declare const group: (prompts: PromptGroup, opts?: PromptGroupOptions | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn]: PromptGroupAwaitedReturn[P]; }>; +type Task = { + /** + * Task title + */ + title: string; + /** + * Task function + */ + task: (message: (string: string) => void) => string | Promise | void | Promise; + /** + * If enabled === false the task will be skipped + */ + enabled?: boolean; +}; +/** + * Define a group of tasks to be executed + */ +declare const tasks: (tasks: Task[]) => Promise; + +export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type SpinnerOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, stream, tasks, text }; diff --git a/node_modules/@clack/prompts/dist/index.d.ts b/node_modules/@clack/prompts/dist/index.d.ts new file mode 100644 index 0000000..3a1efba --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.d.ts @@ -0,0 +1,164 @@ +export { ClackSettings, isCancel, updateSettings } from '@clack/core'; + +interface TextOptions { + message: string; + placeholder?: string; + defaultValue?: string; + initialValue?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const text: (opts: TextOptions) => Promise; +interface PasswordOptions { + message: string; + mask?: string; + validate?: (value: string) => string | Error | undefined; +} +declare const password: (opts: PasswordOptions) => Promise; +interface ConfirmOptions { + message: string; + active?: string; + inactive?: string; + initialValue?: boolean; +} +declare const confirm: (opts: ConfirmOptions) => Promise; +type Primitive = Readonly; +type Option = Value extends Primitive ? { + /** + * Internal data for this option. + */ + value: Value; + /** + * The optional, user-facing text for this option. + * + * By default, the `value` is converted to a string. + */ + label?: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +} : { + /** + * Internal data for this option. + */ + value: Value; + /** + * Required. The user-facing text for this option. + */ + label: string; + /** + * An optional hint to display to the user when + * this option might be selected. + * + * By default, no `hint` is displayed. + */ + hint?: string; +}; +interface SelectOptions { + message: string; + options: Option[]; + initialValue?: Value; + maxItems?: number; +} +declare const select: (opts: SelectOptions) => Promise; +declare const selectKey: (opts: SelectOptions) => Promise; +interface MultiSelectOptions { + message: string; + options: Option[]; + initialValues?: Value[]; + maxItems?: number; + required?: boolean; + cursorAt?: Value; +} +declare const multiselect: (opts: MultiSelectOptions) => Promise; +interface GroupMultiSelectOptions { + message: string; + options: Record[]>; + initialValues?: Value[]; + required?: boolean; + cursorAt?: Value; +} +declare const groupMultiselect: (opts: GroupMultiSelectOptions) => Promise; +declare const note: (message?: string, title?: string) => void; +declare const cancel: (message?: string) => void; +declare const intro: (title?: string) => void; +declare const outro: (message?: string) => void; +type LogMessageOptions = { + symbol?: string; +}; +declare const log: { + message: (message?: string, { symbol }?: LogMessageOptions) => void; + info: (message: string) => void; + success: (message: string) => void; + step: (message: string) => void; + warn: (message: string) => void; + /** alias for `log.warn()`. */ + warning: (message: string) => void; + error: (message: string) => void; +}; +declare const stream: { + message: (iterable: Iterable | AsyncIterable, { symbol }?: LogMessageOptions) => Promise; + info: (iterable: Iterable | AsyncIterable) => Promise; + success: (iterable: Iterable | AsyncIterable) => Promise; + step: (iterable: Iterable | AsyncIterable) => Promise; + warn: (iterable: Iterable | AsyncIterable) => Promise; + /** alias for `log.warn()`. */ + warning: (iterable: Iterable | AsyncIterable) => Promise; + error: (iterable: Iterable | AsyncIterable) => Promise; +}; +interface SpinnerOptions { + indicator?: 'dots' | 'timer'; +} +declare const spinner: ({ indicator }?: SpinnerOptions) => { + start: (msg?: string) => void; + stop: (msg?: string, code?: number) => void; + message: (msg?: string) => void; +}; +type PromptGroupAwaitedReturn = { + [P in keyof T]: Exclude, symbol>; +}; +interface PromptGroupOptions { + /** + * Control how the group can be canceled + * if one of the prompts is canceled. + */ + onCancel?: (opts: { + results: Prettify>>; + }) => void; +} +type Prettify = { + [P in keyof T]: T[P]; +} & {}; +type PromptGroup = { + [P in keyof T]: (opts: { + results: Prettify>>>; + }) => undefined | Promise; +}; +/** + * Define a group of prompts to be displayed + * and return a results of objects within the group + */ +declare const group: (prompts: PromptGroup, opts?: PromptGroupOptions | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn]: PromptGroupAwaitedReturn[P]; }>; +type Task = { + /** + * Task title + */ + title: string; + /** + * Task function + */ + task: (message: (string: string) => void) => string | Promise | void | Promise; + /** + * If enabled === false the task will be skipped + */ + enabled?: boolean; +}; +/** + * Define a group of tasks to be executed + */ +declare const tasks: (tasks: Task[]) => Promise; + +export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type Option, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type SpinnerOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, stream, tasks, text }; diff --git a/node_modules/@clack/prompts/dist/index.mjs b/node_modules/@clack/prompts/dist/index.mjs new file mode 100644 index 0000000..688171b --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.mjs @@ -0,0 +1,87 @@ +import{stripVTControlCharacters as S}from"node:util";import{TextPrompt as Q,PasswordPrompt as X,ConfirmPrompt as Z,SelectPrompt as ee,SelectKeyPrompt as te,MultiSelectPrompt as se,GroupMultiSelectPrompt as re,isCancel as ie,block as ne}from"@clack/core";export{isCancel,updateSettings}from"@clack/core";import g from"node:process";import e from"picocolors";import{cursor as oe,erase as ae}from"sisteransi";function ce(){return g.platform!=="win32"?g.env.TERM!=="linux":!!g.env.CI||!!g.env.WT_SESSION||!!g.env.TERMINUS_SUBLIME||g.env.ConEmuTask==="{cmd::Cmder}"||g.env.TERM_PROGRAM==="Terminus-Sublime"||g.env.TERM_PROGRAM==="vscode"||g.env.TERM==="xterm-256color"||g.env.TERM==="alacritty"||g.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const V=ce(),u=(t,n)=>V?t:n,le=u("\u25C6","*"),L=u("\u25A0","x"),W=u("\u25B2","x"),C=u("\u25C7","o"),ue=u("\u250C","T"),o=u("\u2502","|"),d=u("\u2514","\u2014"),k=u("\u25CF",">"),P=u("\u25CB"," "),A=u("\u25FB","[\u2022]"),T=u("\u25FC","[+]"),F=u("\u25FB","[ ]"),$e=u("\u25AA","\u2022"),_=u("\u2500","-"),me=u("\u256E","+"),de=u("\u251C","+"),pe=u("\u256F","+"),q=u("\u25CF","\u2022"),D=u("\u25C6","*"),U=u("\u25B2","!"),K=u("\u25A0","x"),w=t=>{switch(t){case"initial":case"active":return e.cyan(le);case"cancel":return e.red(L);case"error":return e.yellow(W);case"submit":return e.green(C)}},B=t=>{const{cursor:n,options:s,style:r}=t,i=t.maxItems??Number.POSITIVE_INFINITY,a=Math.max(process.stdout.rows-4,0),c=Math.min(a,Math.max(i,5));let l=0;n>=l+c-3?l=Math.max(Math.min(n-c+3,s.length-c),0):n0,p=c{const j=v===0&&$,E=v===x.length-1&&p;return j||E?e.dim("..."):r(M,v+l===n)})},he=t=>new Q({validate:t.validate,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.initialValue,render(){const n=`${e.gray(o)} +${w(this.state)} ${t.message} +`,s=t.placeholder?e.inverse(t.placeholder[0])+e.dim(t.placeholder.slice(1)):e.inverse(e.hidden("_")),r=this.value?this.valueWithCursor:s;switch(this.state){case"error":return`${n.trim()} +${e.yellow(o)} ${r} +${e.yellow(d)} ${e.yellow(this.error)} +`;case"submit":return`${n}${e.gray(o)} ${e.dim(this.value||t.placeholder)}`;case"cancel":return`${n}${e.gray(o)} ${e.strikethrough(e.dim(this.value??""))}${this.value?.trim()?` +${e.gray(o)}`:""}`;default:return`${n}${e.cyan(o)} ${r} +${e.cyan(d)} +`}}}).prompt(),ge=t=>new X({validate:t.validate,mask:t.mask??$e,render(){const n=`${e.gray(o)} +${w(this.state)} ${t.message} +`,s=this.valueWithCursor,r=this.masked;switch(this.state){case"error":return`${n.trim()} +${e.yellow(o)} ${r} +${e.yellow(d)} ${e.yellow(this.error)} +`;case"submit":return`${n}${e.gray(o)} ${e.dim(r)}`;case"cancel":return`${n}${e.gray(o)} ${e.strikethrough(e.dim(r??""))}${r?` +${e.gray(o)}`:""}`;default:return`${n}${e.cyan(o)} ${s} +${e.cyan(d)} +`}}}).prompt(),ye=t=>{const n=t.active??"Yes",s=t.inactive??"No";return new Z({active:n,inactive:s,initialValue:t.initialValue??!0,render(){const r=`${e.gray(o)} +${w(this.state)} ${t.message} +`,i=this.value?n:s;switch(this.state){case"submit":return`${r}${e.gray(o)} ${e.dim(i)}`;case"cancel":return`${r}${e.gray(o)} ${e.strikethrough(e.dim(i))} +${e.gray(o)}`;default:return`${r}${e.cyan(o)} ${this.value?`${e.green(k)} ${n}`:`${e.dim(P)} ${e.dim(n)}`} ${e.dim("/")} ${this.value?`${e.dim(P)} ${e.dim(s)}`:`${e.green(k)} ${s}`} +${e.cyan(d)} +`}}}).prompt()},ve=t=>{const n=(s,r)=>{const i=s.label??String(s.value);switch(r){case"selected":return`${e.dim(i)}`;case"active":return`${e.green(k)} ${i} ${s.hint?e.dim(`(${s.hint})`):""}`;case"cancelled":return`${e.strikethrough(e.dim(i))}`;default:return`${e.dim(P)} ${e.dim(i)}`}};return new ee({options:t.options,initialValue:t.initialValue,render(){const s=`${e.gray(o)} +${w(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e.gray(o)} ${n(this.options[this.cursor],"selected")}`;case"cancel":return`${s}${e.gray(o)} ${n(this.options[this.cursor],"cancelled")} +${e.gray(o)}`;default:return`${s}${e.cyan(o)} ${B({cursor:this.cursor,options:this.options,maxItems:t.maxItems,style:(r,i)=>n(r,i?"active":"inactive")}).join(` +${e.cyan(o)} `)} +${e.cyan(d)} +`}}}).prompt()},we=t=>{const n=(s,r="inactive")=>{const i=s.label??String(s.value);return r==="selected"?`${e.dim(i)}`:r==="cancelled"?`${e.strikethrough(e.dim(i))}`:r==="active"?`${e.bgCyan(e.gray(` ${s.value} `))} ${i} ${s.hint?e.dim(`(${s.hint})`):""}`:`${e.gray(e.bgWhite(e.inverse(` ${s.value} `)))} ${i} ${s.hint?e.dim(`(${s.hint})`):""}`};return new te({options:t.options,initialValue:t.initialValue,render(){const s=`${e.gray(o)} +${w(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e.gray(o)} ${n(this.options.find(r=>r.value===this.value)??t.options[0],"selected")}`;case"cancel":return`${s}${e.gray(o)} ${n(this.options[0],"cancelled")} +${e.gray(o)}`;default:return`${s}${e.cyan(o)} ${this.options.map((r,i)=>n(r,i===this.cursor?"active":"inactive")).join(` +${e.cyan(o)} `)} +${e.cyan(d)} +`}}}).prompt()},fe=t=>{const n=(s,r)=>{const i=s.label??String(s.value);return r==="active"?`${e.cyan(A)} ${i} ${s.hint?e.dim(`(${s.hint})`):""}`:r==="selected"?`${e.green(T)} ${e.dim(i)}`:r==="cancelled"?`${e.strikethrough(e.dim(i))}`:r==="active-selected"?`${e.green(T)} ${i} ${s.hint?e.dim(`(${s.hint})`):""}`:r==="submitted"?`${e.dim(i)}`:`${e.dim(F)} ${e.dim(i)}`};return new se({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option. +${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){const s=`${e.gray(o)} +${w(this.state)} ${t.message} +`,r=(i,a)=>{const c=this.value.includes(i.value);return a&&c?n(i,"active-selected"):c?n(i,"selected"):n(i,a?"active":"inactive")};switch(this.state){case"submit":return`${s}${e.gray(o)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>n(i,"submitted")).join(e.dim(", "))||e.dim("none")}`;case"cancel":{const i=this.options.filter(({value:a})=>this.value.includes(a)).map(a=>n(a,"cancelled")).join(e.dim(", "));return`${s}${e.gray(o)} ${i.trim()?`${i} +${e.gray(o)}`:""}`}case"error":{const i=this.error.split(` +`).map((a,c)=>c===0?`${e.yellow(d)} ${e.yellow(a)}`:` ${a}`).join(` +`);return`${s+e.yellow(o)} ${B({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(` +${e.yellow(o)} `)} +${i} +`}default:return`${s}${e.cyan(o)} ${B({options:this.options,cursor:this.cursor,maxItems:t.maxItems,style:r}).join(` +${e.cyan(o)} `)} +${e.cyan(d)} +`}}}).prompt()},be=t=>{const n=(s,r,i=[])=>{const a=s.label??String(s.value),c=typeof s.group=="string",l=c&&(i[i.indexOf(s)+1]??{group:!0}),$=c&&l.group===!0,p=c?`${$?d:o} `:"";return r==="active"?`${e.dim(p)}${e.cyan(A)} ${a} ${s.hint?e.dim(`(${s.hint})`):""}`:r==="group-active"?`${p}${e.cyan(A)} ${e.dim(a)}`:r==="group-active-selected"?`${p}${e.green(T)} ${e.dim(a)}`:r==="selected"?`${e.dim(p)}${e.green(T)} ${e.dim(a)}`:r==="cancelled"?`${e.strikethrough(e.dim(a))}`:r==="active-selected"?`${e.dim(p)}${e.green(T)} ${a} ${s.hint?e.dim(`(${s.hint})`):""}`:r==="submitted"?`${e.dim(a)}`:`${e.dim(p)}${e.dim(F)} ${e.dim(a)}`};return new re({options:t.options,initialValues:t.initialValues,required:t.required??!0,cursorAt:t.cursorAt,validate(s){if(this.required&&s.length===0)return`Please select at least one option. +${e.reset(e.dim(`Press ${e.gray(e.bgWhite(e.inverse(" space ")))} to select, ${e.gray(e.bgWhite(e.inverse(" enter ")))} to submit`))}`},render(){const s=`${e.gray(o)} +${w(this.state)} ${t.message} +`;switch(this.state){case"submit":return`${s}${e.gray(o)} ${this.options.filter(({value:r})=>this.value.includes(r)).map(r=>n(r,"submitted")).join(e.dim(", "))}`;case"cancel":{const r=this.options.filter(({value:i})=>this.value.includes(i)).map(i=>n(i,"cancelled")).join(e.dim(", "));return`${s}${e.gray(o)} ${r.trim()?`${r} +${e.gray(o)}`:""}`}case"error":{const r=this.error.split(` +`).map((i,a)=>a===0?`${e.yellow(d)} ${e.yellow(i)}`:` ${i}`).join(` +`);return`${s}${e.yellow(o)} ${this.options.map((i,a,c)=>{const l=this.value.includes(i.value)||i.group===!0&&this.isGroupSelected(`${i.value}`),$=a===this.cursor;return!$&&typeof i.group=="string"&&this.options[this.cursor].value===i.group?n(i,l?"group-active-selected":"group-active",c):$&&l?n(i,"active-selected",c):l?n(i,"selected",c):n(i,$?"active":"inactive",c)}).join(` +${e.yellow(o)} `)} +${r} +`}default:return`${s}${e.cyan(o)} ${this.options.map((r,i,a)=>{const c=this.value.includes(r.value)||r.group===!0&&this.isGroupSelected(`${r.value}`),l=i===this.cursor;return!l&&typeof r.group=="string"&&this.options[this.cursor].value===r.group?n(r,c?"group-active-selected":"group-active",a):l&&c?n(r,"active-selected",a):c?n(r,"selected",a):n(r,l?"active":"inactive",a)}).join(` +${e.cyan(o)} `)} +${e.cyan(d)} +`}}}).prompt()},Me=(t="",n="")=>{const s=` +${t} +`.split(` +`),r=S(n).length,i=Math.max(s.reduce((c,l)=>{const $=S(l);return $.length>c?$.length:c},0),r)+2,a=s.map(c=>`${e.gray(o)} ${e.dim(c)}${" ".repeat(i-S(c).length)}${e.gray(o)}`).join(` +`);process.stdout.write(`${e.gray(o)} +${e.green(C)} ${e.reset(n)} ${e.gray(_.repeat(Math.max(i-r-1,1))+me)} +${a} +${e.gray(de+_.repeat(i+2)+pe)} +`)},xe=(t="")=>{process.stdout.write(`${e.gray(d)} ${e.red(t)} + +`)},Ie=(t="")=>{process.stdout.write(`${e.gray(ue)} ${t} +`)},Se=(t="")=>{process.stdout.write(`${e.gray(o)} +${e.gray(d)} ${t} + +`)},f={message:(t="",{symbol:n=e.gray(o)}={})=>{const s=[`${e.gray(o)}`];if(t){const[r,...i]=t.split(` +`);s.push(`${n} ${r}`,...i.map(a=>`${e.gray(o)} ${a}`))}process.stdout.write(`${s.join(` +`)} +`)},info:t=>{f.message(t,{symbol:e.blue(q)})},success:t=>{f.message(t,{symbol:e.green(D)})},step:t=>{f.message(t,{symbol:e.green(C)})},warn:t=>{f.message(t,{symbol:e.yellow(U)})},warning:t=>{f.warn(t)},error:t=>{f.message(t,{symbol:e.red(K)})}},J=`${e.gray(o)} `,b={message:async(t,{symbol:n=e.gray(o)}={})=>{process.stdout.write(`${e.gray(o)} +${n} `);let s=3;for await(let r of t){r=r.replace(/\n/g,` +${J}`),r.includes(` +`)&&(s=3+S(r.slice(r.lastIndexOf(` +`))).length);const i=S(r).length;s+ib.message(t,{symbol:e.blue(q)}),success:t=>b.message(t,{symbol:e.green(D)}),step:t=>b.message(t,{symbol:e.green(C)}),warn:t=>b.message(t,{symbol:e.yellow(U)}),warning:t=>b.warn(t),error:t=>b.message(t,{symbol:e.red(K)})},Y=({indicator:t="dots"}={})=>{const n=V?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],s=V?80:120,r=process.env.CI==="true";let i,a,c=!1,l="",$,p=performance.now();const M=m=>{const h=m>1?"Something went wrong":"Canceled";c&&N(h,m)},v=()=>M(2),x=()=>M(1),j=()=>{process.on("uncaughtExceptionMonitor",v),process.on("unhandledRejection",v),process.on("SIGINT",x),process.on("SIGTERM",x),process.on("exit",M)},E=()=>{process.removeListener("uncaughtExceptionMonitor",v),process.removeListener("unhandledRejection",v),process.removeListener("SIGINT",x),process.removeListener("SIGTERM",x),process.removeListener("exit",M)},O=()=>{if($===void 0)return;r&&process.stdout.write(` +`);const m=$.split(` +`);process.stdout.write(oe.move(-999,m.length-1)),process.stdout.write(ae.down(m.length))},R=m=>m.replace(/\.+$/,""),G=m=>{const h=(performance.now()-m)/1e3,y=Math.floor(h/60),I=Math.floor(h%60);return y>0?`[${y}m ${I}s]`:`[${I}s]`},H=(m="")=>{c=!0,i=ne(),l=R(m),p=performance.now(),process.stdout.write(`${e.gray(o)} +`);let h=0,y=0;j(),a=setInterval(()=>{if(r&&l===$)return;O(),$=l;const I=e.magenta(n[h]);if(r)process.stdout.write(`${I} ${l}...`);else if(t==="timer")process.stdout.write(`${I} ${l} ${G(p)}`);else{const z=".".repeat(Math.floor(y)).slice(0,3);process.stdout.write(`${I} ${l}${z}`)}h=h+1{c=!1,clearInterval(a),O();const y=h===0?e.green(C):h===1?e.red(L):e.red(W);l=R(m??l),t==="timer"?process.stdout.write(`${y} ${l} ${G(p)} +`):process.stdout.write(`${y} ${l} +`),E(),i()};return{start:H,stop:N,message:(m="")=>{l=R(m??l)}}},Ce=async(t,n)=>{const s={},r=Object.keys(t);for(const i of r){const a=t[i],c=await a({results:s})?.catch(l=>{throw l});if(typeof n?.onCancel=="function"&&ie(c)){s[i]="canceled",n.onCancel({results:s});continue}s[i]=c}return s},Te=async t=>{for(const n of t){if(n.enabled===!1)continue;const s=Y();s.start(n.title);const r=await n.task(s.message);s.stop(r||n.title)}};export{xe as cancel,ye as confirm,Ce as group,be as groupMultiselect,Ie as intro,f as log,fe as multiselect,Me as note,Se as outro,ge as password,ve as select,we as selectKey,Y as spinner,b as stream,Te as tasks,he as text}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/@clack/prompts/dist/index.mjs.map b/node_modules/@clack/prompts/dist/index.mjs.map new file mode 100644 index 0000000..42a061e --- /dev/null +++ b/node_modules/@clack/prompts/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["../../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tif (process.platform !== 'win32') {\n\t\treturn process.env.TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(process.env.CI)\n\t\t|| Boolean(process.env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| process.env.TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| process.env.TERM_PROGRAM === 'vscode'\n\t\t|| process.env.TERM === 'xterm-256color'\n\t\t|| process.env.TERM === 'alacritty'\n\t\t|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n","import { stripVTControlCharacters as strip } from 'node:util';\nimport {\n\tConfirmPrompt,\n\tGroupMultiSelectPrompt,\n\tMultiSelectPrompt,\n\tPasswordPrompt,\n\tSelectKeyPrompt,\n\tSelectPrompt,\n\ttype State,\n\tTextPrompt,\n\tblock,\n\tisCancel,\n} from '@clack/core';\nimport isUnicodeSupported from 'is-unicode-supported';\nimport color from 'picocolors';\nimport { cursor, erase } from 'sisteransi';\n\nexport { isCancel } from '@clack/core';\nexport { updateSettings, type ClackSettings } from '@clack/core';\n\nconst unicode = isUnicodeSupported();\nconst s = (c: string, fallback: string) => (unicode ? c : fallback);\nconst S_STEP_ACTIVE = s('◆', '*');\nconst S_STEP_CANCEL = s('■', 'x');\nconst S_STEP_ERROR = s('▲', 'x');\nconst S_STEP_SUBMIT = s('◇', 'o');\n\nconst S_BAR_START = s('┌', 'T');\nconst S_BAR = s('│', '|');\nconst S_BAR_END = s('└', '—');\n\nconst S_RADIO_ACTIVE = s('●', '>');\nconst S_RADIO_INACTIVE = s('○', ' ');\nconst S_CHECKBOX_ACTIVE = s('◻', '[•]');\nconst S_CHECKBOX_SELECTED = s('◼', '[+]');\nconst S_CHECKBOX_INACTIVE = s('◻', '[ ]');\nconst S_PASSWORD_MASK = s('▪', '•');\n\nconst S_BAR_H = s('─', '-');\nconst S_CORNER_TOP_RIGHT = s('╮', '+');\nconst S_CONNECT_LEFT = s('├', '+');\nconst S_CORNER_BOTTOM_RIGHT = s('╯', '+');\n\nconst S_INFO = s('●', '•');\nconst S_SUCCESS = s('◆', '*');\nconst S_WARN = s('▲', '!');\nconst S_ERROR = s('■', 'x');\n\nconst symbol = (state: State) => {\n\tswitch (state) {\n\t\tcase 'initial':\n\t\tcase 'active':\n\t\t\treturn color.cyan(S_STEP_ACTIVE);\n\t\tcase 'cancel':\n\t\t\treturn color.red(S_STEP_CANCEL);\n\t\tcase 'error':\n\t\t\treturn color.yellow(S_STEP_ERROR);\n\t\tcase 'submit':\n\t\t\treturn color.green(S_STEP_SUBMIT);\n\t}\n};\n\ninterface LimitOptionsParams {\n\toptions: TOption[];\n\tmaxItems: number | undefined;\n\tcursor: number;\n\tstyle: (option: TOption, active: boolean) => string;\n}\n\nconst limitOptions = (params: LimitOptionsParams): string[] => {\n\tconst { cursor, options, style } = params;\n\n\tconst paramMaxItems = params.maxItems ?? Number.POSITIVE_INFINITY;\n\tconst outputMaxItems = Math.max(process.stdout.rows - 4, 0);\n\t// We clamp to minimum 5 because anything less doesn't make sense UX wise\n\tconst maxItems = Math.min(outputMaxItems, Math.max(paramMaxItems, 5));\n\tlet slidingWindowLocation = 0;\n\n\tif (cursor >= slidingWindowLocation + maxItems - 3) {\n\t\tslidingWindowLocation = Math.max(Math.min(cursor - maxItems + 3, options.length - maxItems), 0);\n\t} else if (cursor < slidingWindowLocation + 2) {\n\t\tslidingWindowLocation = Math.max(cursor - 2, 0);\n\t}\n\n\tconst shouldRenderTopEllipsis = maxItems < options.length && slidingWindowLocation > 0;\n\tconst shouldRenderBottomEllipsis =\n\t\tmaxItems < options.length && slidingWindowLocation + maxItems < options.length;\n\n\treturn options\n\t\t.slice(slidingWindowLocation, slidingWindowLocation + maxItems)\n\t\t.map((option, i, arr) => {\n\t\t\tconst isTopLimit = i === 0 && shouldRenderTopEllipsis;\n\t\t\tconst isBottomLimit = i === arr.length - 1 && shouldRenderBottomEllipsis;\n\t\t\treturn isTopLimit || isBottomLimit\n\t\t\t\t? color.dim('...')\n\t\t\t\t: style(option, i + slidingWindowLocation === cursor);\n\t\t});\n};\n\nexport interface TextOptions {\n\tmessage: string;\n\tplaceholder?: string;\n\tdefaultValue?: string;\n\tinitialValue?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const text = (opts: TextOptions) => {\n\treturn new TextPrompt({\n\t\tvalidate: opts.validate,\n\t\tplaceholder: opts.placeholder,\n\t\tdefaultValue: opts.defaultValue,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst placeholder = opts.placeholder\n\t\t\t\t? color.inverse(opts.placeholder[0]) + color.dim(opts.placeholder.slice(1))\n\t\t\t\t: color.inverse(color.hidden('_'));\n\t\t\tconst value = !this.value ? placeholder : this.valueWithCursor;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${value}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(this.value || opts.placeholder)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(this.value ?? '')\n\t\t\t\t\t)}${this.value?.trim() ? `\\n${color.gray(S_BAR)}` : ''}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface PasswordOptions {\n\tmessage: string;\n\tmask?: string;\n\tvalidate?: (value: string) => string | Error | undefined;\n}\nexport const password = (opts: PasswordOptions) => {\n\treturn new PasswordPrompt({\n\t\tvalidate: opts.validate,\n\t\tmask: opts.mask ?? S_PASSWORD_MASK,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.valueWithCursor;\n\t\t\tconst masked = this.masked;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'error':\n\t\t\t\t\treturn `${title.trim()}\\n${color.yellow(S_BAR)} ${masked}\\n${color.yellow(\n\t\t\t\t\t\tS_BAR_END\n\t\t\t\t\t)} ${color.yellow(this.error)}\\n`;\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(masked)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(color.dim(masked ?? ''))}${\n\t\t\t\t\t\tmasked ? `\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\tdefault:\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${value}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface ConfirmOptions {\n\tmessage: string;\n\tactive?: string;\n\tinactive?: string;\n\tinitialValue?: boolean;\n}\nexport const confirm = (opts: ConfirmOptions) => {\n\tconst active = opts.active ?? 'Yes';\n\tconst inactive = opts.inactive ?? 'No';\n\treturn new ConfirmPrompt({\n\t\tactive,\n\t\tinactive,\n\t\tinitialValue: opts.initialValue ?? true,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\t\t\tconst value = this.value ? active : inactive;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.dim(value)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${color.strikethrough(\n\t\t\t\t\t\tcolor.dim(value)\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${\n\t\t\t\t\t\tthis.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${active}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(active)}`\n\t\t\t\t\t} ${color.dim('/')} ${\n\t\t\t\t\t\t!this.value\n\t\t\t\t\t\t\t? `${color.green(S_RADIO_ACTIVE)} ${inactive}`\n\t\t\t\t\t\t\t: `${color.dim(S_RADIO_INACTIVE)} ${color.dim(inactive)}`\n\t\t\t\t\t}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\ntype Primitive = Readonly;\n\nexport type Option = Value extends Primitive\n\t? {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * The optional, user-facing text for this option.\n\t\t\t *\n\t\t\t * By default, the `value` is converted to a string.\n\t\t\t */\n\t\t\tlabel?: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t}\n\t: {\n\t\t\t/**\n\t\t\t * Internal data for this option.\n\t\t\t */\n\t\t\tvalue: Value;\n\t\t\t/**\n\t\t\t * Required. The user-facing text for this option.\n\t\t\t */\n\t\t\tlabel: string;\n\t\t\t/**\n\t\t\t * An optional hint to display to the user when\n\t\t\t * this option might be selected.\n\t\t\t *\n\t\t\t * By default, no `hint` is displayed.\n\t\t\t */\n\t\t\thint?: string;\n\t\t};\n\nexport interface SelectOptions {\n\tmessage: string;\n\toptions: Option[];\n\tinitialValue?: Value;\n\tmaxItems?: number;\n}\n\nexport const select = (opts: SelectOptions) => {\n\tconst opt = (option: Option, state: 'inactive' | 'active' | 'selected' | 'cancelled') => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tswitch (state) {\n\t\t\tcase 'selected':\n\t\t\t\treturn `${color.dim(label)}`;\n\t\t\tcase 'active':\n\t\t\t\treturn `${color.green(S_RADIO_ACTIVE)} ${label} ${\n\t\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t\t}`;\n\t\t\tcase 'cancelled':\n\t\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t\tdefault:\n\t\t\t\treturn `${color.dim(S_RADIO_INACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t};\n\n\treturn new SelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[this.cursor], 'selected')}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options[this.cursor],\n\t\t\t\t\t\t'cancelled'\n\t\t\t\t\t)}\\n${color.gray(S_BAR)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: (item, active) => opt(item, active ? 'active' : 'inactive'),\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport const selectKey = (opts: SelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'cancelled' = 'inactive'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active') {\n\t\t\treturn `${color.bgCyan(color.gray(` ${option.value} `))} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\treturn `${color.gray(color.bgWhite(color.inverse(` ${option.value} `)))} ${label} ${\n\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t}`;\n\t};\n\n\treturn new SelectKeyPrompt({\n\t\toptions: opts.options,\n\t\tinitialValue: opts.initialValue,\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(\n\t\t\t\t\t\tthis.options.find((opt) => opt.value === this.value) ?? opts.options[0],\n\t\t\t\t\t\t'selected'\n\t\t\t\t\t)}`;\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${opt(this.options[0], 'cancelled')}\\n${color.gray(\n\t\t\t\t\t\tS_BAR\n\t\t\t\t\t)}`;\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i) => opt(option, i === this.cursor ? 'active' : 'inactive'))\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface MultiSelectOptions {\n\tmessage: string;\n\toptions: Option[];\n\tinitialValues?: Value[];\n\tmaxItems?: number;\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const multiselect = (opts: MultiSelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate: 'inactive' | 'active' | 'selected' | 'active-selected' | 'submitted' | 'cancelled'\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tif (state === 'active') {\n\t\t\treturn `${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new MultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tconst styleOption = (option: Option, active: boolean) => {\n\t\t\t\tconst selected = this.value.includes(option.value);\n\t\t\t\tif (active && selected) {\n\t\t\t\t\treturn opt(option, 'active-selected');\n\t\t\t\t}\n\t\t\t\tif (selected) {\n\t\t\t\t\treturn opt(option, 'selected');\n\t\t\t\t}\n\t\t\t\treturn opt(option, active ? 'active' : 'inactive');\n\t\t\t};\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tthis.options\n\t\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t\t.join(color.dim(', ')) || color.dim('none')\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title + color.yellow(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${limitOptions({\n\t\t\t\t\t\toptions: this.options,\n\t\t\t\t\t\tcursor: this.cursor,\n\t\t\t\t\t\tmaxItems: opts.maxItems,\n\t\t\t\t\t\tstyle: styleOption,\n\t\t\t\t\t}).join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport interface GroupMultiSelectOptions {\n\tmessage: string;\n\toptions: Record[]>;\n\tinitialValues?: Value[];\n\trequired?: boolean;\n\tcursorAt?: Value;\n}\nexport const groupMultiselect = (opts: GroupMultiSelectOptions) => {\n\tconst opt = (\n\t\toption: Option,\n\t\tstate:\n\t\t\t| 'inactive'\n\t\t\t| 'active'\n\t\t\t| 'selected'\n\t\t\t| 'active-selected'\n\t\t\t| 'group-active'\n\t\t\t| 'group-active-selected'\n\t\t\t| 'submitted'\n\t\t\t| 'cancelled',\n\t\toptions: Option[] = []\n\t) => {\n\t\tconst label = option.label ?? String(option.value);\n\t\tconst isItem = typeof (option as any).group === 'string';\n\t\tconst next = isItem && (options[options.indexOf(option) + 1] ?? { group: true });\n\t\tconst isLast = isItem && (next as any).group === true;\n\t\tconst prefix = isItem ? `${isLast ? S_BAR_END : S_BAR} ` : '';\n\n\t\tif (state === 'active') {\n\t\t\treturn `${color.dim(prefix)}${color.cyan(S_CHECKBOX_ACTIVE)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'group-active') {\n\t\t\treturn `${prefix}${color.cyan(S_CHECKBOX_ACTIVE)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'group-active-selected') {\n\t\t\treturn `${prefix}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${color.dim(label)}`;\n\t\t}\n\t\tif (state === 'cancelled') {\n\t\t\treturn `${color.strikethrough(color.dim(label))}`;\n\t\t}\n\t\tif (state === 'active-selected') {\n\t\t\treturn `${color.dim(prefix)}${color.green(S_CHECKBOX_SELECTED)} ${label} ${\n\t\t\t\toption.hint ? color.dim(`(${option.hint})`) : ''\n\t\t\t}`;\n\t\t}\n\t\tif (state === 'submitted') {\n\t\t\treturn `${color.dim(label)}`;\n\t\t}\n\t\treturn `${color.dim(prefix)}${color.dim(S_CHECKBOX_INACTIVE)} ${color.dim(label)}`;\n\t};\n\n\treturn new GroupMultiSelectPrompt({\n\t\toptions: opts.options,\n\t\tinitialValues: opts.initialValues,\n\t\trequired: opts.required ?? true,\n\t\tcursorAt: opts.cursorAt,\n\t\tvalidate(selected: Value[]) {\n\t\t\tif (this.required && selected.length === 0)\n\t\t\t\treturn `Please select at least one option.\\n${color.reset(\n\t\t\t\t\tcolor.dim(\n\t\t\t\t\t\t`Press ${color.gray(color.bgWhite(color.inverse(' space ')))} to select, ${color.gray(\n\t\t\t\t\t\t\tcolor.bgWhite(color.inverse(' enter '))\n\t\t\t\t\t\t)} to submit`\n\t\t\t\t\t)\n\t\t\t\t)}`;\n\t\t},\n\t\trender() {\n\t\t\tconst title = `${color.gray(S_BAR)}\\n${symbol(this.state)} ${opts.message}\\n`;\n\n\t\t\tswitch (this.state) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'submitted'))\n\t\t\t\t\t\t.join(color.dim(', '))}`;\n\t\t\t\t}\n\t\t\t\tcase 'cancel': {\n\t\t\t\t\tconst label = this.options\n\t\t\t\t\t\t.filter(({ value }) => this.value.includes(value))\n\t\t\t\t\t\t.map((option) => opt(option, 'cancelled'))\n\t\t\t\t\t\t.join(color.dim(', '));\n\t\t\t\t\treturn `${title}${color.gray(S_BAR)} ${\n\t\t\t\t\t\tlabel.trim() ? `${label}\\n${color.gray(S_BAR)}` : ''\n\t\t\t\t\t}`;\n\t\t\t\t}\n\t\t\t\tcase 'error': {\n\t\t\t\t\tconst footer = this.error\n\t\t\t\t\t\t.split('\\n')\n\t\t\t\t\t\t.map((ln, i) =>\n\t\t\t\t\t\t\ti === 0 ? `${color.yellow(S_BAR_END)} ${color.yellow(ln)}` : ` ${ln}`\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.join('\\n');\n\t\t\t\t\treturn `${title}${color.yellow(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.yellow(S_BAR)} `)}\\n${footer}\\n`;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn `${title}${color.cyan(S_BAR)} ${this.options\n\t\t\t\t\t\t.map((option, i, options) => {\n\t\t\t\t\t\t\tconst selected =\n\t\t\t\t\t\t\t\tthis.value.includes(option.value) ||\n\t\t\t\t\t\t\t\t(option.group === true && this.isGroupSelected(`${option.value}`));\n\t\t\t\t\t\t\tconst active = i === this.cursor;\n\t\t\t\t\t\t\tconst groupActive =\n\t\t\t\t\t\t\t\t!active &&\n\t\t\t\t\t\t\t\ttypeof option.group === 'string' &&\n\t\t\t\t\t\t\t\tthis.options[this.cursor].value === option.group;\n\t\t\t\t\t\t\tif (groupActive) {\n\t\t\t\t\t\t\t\treturn opt(option, selected ? 'group-active-selected' : 'group-active', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (active && selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'active-selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (selected) {\n\t\t\t\t\t\t\t\treturn opt(option, 'selected', options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn opt(option, active ? 'active' : 'inactive', options);\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join(`\\n${color.cyan(S_BAR)} `)}\\n${color.cyan(S_BAR_END)}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}).prompt() as Promise;\n};\n\nexport const note = (message = '', title = '') => {\n\tconst lines = `\\n${message}\\n`.split('\\n');\n\tconst titleLen = strip(title).length;\n\tconst len =\n\t\tMath.max(\n\t\t\tlines.reduce((sum, ln) => {\n\t\t\t\tconst line = strip(ln);\n\t\t\t\treturn line.length > sum ? line.length : sum;\n\t\t\t}, 0),\n\t\t\ttitleLen\n\t\t) + 2;\n\tconst msg = lines\n\t\t.map(\n\t\t\t(ln) =>\n\t\t\t\t`${color.gray(S_BAR)} ${color.dim(ln)}${' '.repeat(len - strip(ln).length)}${color.gray(\n\t\t\t\t\tS_BAR\n\t\t\t\t)}`\n\t\t)\n\t\t.join('\\n');\n\tprocess.stdout.write(\n\t\t`${color.gray(S_BAR)}\\n${color.green(S_STEP_SUBMIT)} ${color.reset(title)} ${color.gray(\n\t\t\tS_BAR_H.repeat(Math.max(len - titleLen - 1, 1)) + S_CORNER_TOP_RIGHT\n\t\t)}\\n${msg}\\n${color.gray(S_CONNECT_LEFT + S_BAR_H.repeat(len + 2) + S_CORNER_BOTTOM_RIGHT)}\\n`\n\t);\n};\n\nexport const cancel = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_END)} ${color.red(message)}\\n\\n`);\n};\n\nexport const intro = (title = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR_START)} ${title}\\n`);\n};\n\nexport const outro = (message = '') => {\n\tprocess.stdout.write(`${color.gray(S_BAR)}\\n${color.gray(S_BAR_END)} ${message}\\n\\n`);\n};\n\nexport type LogMessageOptions = {\n\tsymbol?: string;\n};\nexport const log = {\n\tmessage: (message = '', { symbol = color.gray(S_BAR) }: LogMessageOptions = {}) => {\n\t\tconst parts = [`${color.gray(S_BAR)}`];\n\t\tif (message) {\n\t\t\tconst [firstLine, ...lines] = message.split('\\n');\n\t\t\tparts.push(`${symbol} ${firstLine}`, ...lines.map((ln) => `${color.gray(S_BAR)} ${ln}`));\n\t\t}\n\t\tprocess.stdout.write(`${parts.join('\\n')}\\n`);\n\t},\n\tinfo: (message: string) => {\n\t\tlog.message(message, { symbol: color.blue(S_INFO) });\n\t},\n\tsuccess: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_SUCCESS) });\n\t},\n\tstep: (message: string) => {\n\t\tlog.message(message, { symbol: color.green(S_STEP_SUBMIT) });\n\t},\n\twarn: (message: string) => {\n\t\tlog.message(message, { symbol: color.yellow(S_WARN) });\n\t},\n\t/** alias for `log.warn()`. */\n\twarning: (message: string) => {\n\t\tlog.warn(message);\n\t},\n\terror: (message: string) => {\n\t\tlog.message(message, { symbol: color.red(S_ERROR) });\n\t},\n};\n\nconst prefix = `${color.gray(S_BAR)} `;\nexport const stream = {\n\tmessage: async (\n\t\titerable: Iterable | AsyncIterable,\n\t\t{ symbol = color.gray(S_BAR) }: LogMessageOptions = {}\n\t) => {\n\t\tprocess.stdout.write(`${color.gray(S_BAR)}\\n${symbol} `);\n\t\tlet lineWidth = 3;\n\t\tfor await (let chunk of iterable) {\n\t\t\tchunk = chunk.replace(/\\n/g, `\\n${prefix}`);\n\t\t\tif (chunk.includes('\\n')) {\n\t\t\t\tlineWidth = 3 + strip(chunk.slice(chunk.lastIndexOf('\\n'))).length;\n\t\t\t}\n\t\t\tconst chunkLen = strip(chunk).length;\n\t\t\tif (lineWidth + chunkLen < process.stdout.columns) {\n\t\t\t\tlineWidth += chunkLen;\n\t\t\t\tprocess.stdout.write(chunk);\n\t\t\t} else {\n\t\t\t\tprocess.stdout.write(`\\n${prefix}${chunk.trimStart()}`);\n\t\t\t\tlineWidth = 3 + strip(chunk.trimStart()).length;\n\t\t\t}\n\t\t}\n\t\tprocess.stdout.write('\\n');\n\t},\n\tinfo: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.blue(S_INFO) });\n\t},\n\tsuccess: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.green(S_SUCCESS) });\n\t},\n\tstep: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.green(S_STEP_SUBMIT) });\n\t},\n\twarn: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.yellow(S_WARN) });\n\t},\n\t/** alias for `log.warn()`. */\n\twarning: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.warn(iterable);\n\t},\n\terror: (iterable: Iterable | AsyncIterable) => {\n\t\treturn stream.message(iterable, { symbol: color.red(S_ERROR) });\n\t},\n};\n\nexport interface SpinnerOptions {\n\tindicator?: 'dots' | 'timer';\n}\n\nexport const spinner = ({ indicator = 'dots' }: SpinnerOptions = {}) => {\n\tconst frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];\n\tconst delay = unicode ? 80 : 120;\n\tconst isCI = process.env.CI === 'true';\n\n\tlet unblock: () => void;\n\tlet loop: NodeJS.Timeout;\n\tlet isSpinnerActive = false;\n\tlet _message = '';\n\tlet _prevMessage: string | undefined = undefined;\n\tlet _origin: number = performance.now();\n\n\tconst handleExit = (code: number) => {\n\t\tconst msg = code > 1 ? 'Something went wrong' : 'Canceled';\n\t\tif (isSpinnerActive) stop(msg, code);\n\t};\n\n\tconst errorEventHandler = () => handleExit(2);\n\tconst signalEventHandler = () => handleExit(1);\n\n\tconst registerHooks = () => {\n\t\t// Reference: https://nodejs.org/api/process.html#event-uncaughtexception\n\t\tprocess.on('uncaughtExceptionMonitor', errorEventHandler);\n\t\t// Reference: https://nodejs.org/api/process.html#event-unhandledrejection\n\t\tprocess.on('unhandledRejection', errorEventHandler);\n\t\t// Reference Signal Events: https://nodejs.org/api/process.html#signal-events\n\t\tprocess.on('SIGINT', signalEventHandler);\n\t\tprocess.on('SIGTERM', signalEventHandler);\n\t\tprocess.on('exit', handleExit);\n\t};\n\n\tconst clearHooks = () => {\n\t\tprocess.removeListener('uncaughtExceptionMonitor', errorEventHandler);\n\t\tprocess.removeListener('unhandledRejection', errorEventHandler);\n\t\tprocess.removeListener('SIGINT', signalEventHandler);\n\t\tprocess.removeListener('SIGTERM', signalEventHandler);\n\t\tprocess.removeListener('exit', handleExit);\n\t};\n\n\tconst clearPrevMessage = () => {\n\t\tif (_prevMessage === undefined) return;\n\t\tif (isCI) process.stdout.write('\\n');\n\t\tconst prevLines = _prevMessage.split('\\n');\n\t\tprocess.stdout.write(cursor.move(-999, prevLines.length - 1));\n\t\tprocess.stdout.write(erase.down(prevLines.length));\n\t};\n\n\tconst parseMessage = (msg: string): string => {\n\t\treturn msg.replace(/\\.+$/, '');\n\t};\n\n\tconst formatTimer = (origin: number): string => {\n\t\tconst duration = (performance.now() - origin) / 1000;\n\t\tconst min = Math.floor(duration / 60);\n\t\tconst secs = Math.floor(duration % 60);\n\t\treturn min > 0 ? `[${min}m ${secs}s]` : `[${secs}s]`;\n\t};\n\n\tconst start = (msg = ''): void => {\n\t\tisSpinnerActive = true;\n\t\tunblock = block();\n\t\t_message = parseMessage(msg);\n\t\t_origin = performance.now();\n\t\tprocess.stdout.write(`${color.gray(S_BAR)}\\n`);\n\t\tlet frameIndex = 0;\n\t\tlet indicatorTimer = 0;\n\t\tregisterHooks();\n\t\tloop = setInterval(() => {\n\t\t\tif (isCI && _message === _prevMessage) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tclearPrevMessage();\n\t\t\t_prevMessage = _message;\n\t\t\tconst frame = color.magenta(frames[frameIndex]);\n\n\t\t\tif (isCI) {\n\t\t\t\tprocess.stdout.write(`${frame} ${_message}...`);\n\t\t\t} else if (indicator === 'timer') {\n\t\t\t\tprocess.stdout.write(`${frame} ${_message} ${formatTimer(_origin)}`);\n\t\t\t} else {\n\t\t\t\tconst loadingDots = '.'.repeat(Math.floor(indicatorTimer)).slice(0, 3);\n\t\t\t\tprocess.stdout.write(`${frame} ${_message}${loadingDots}`);\n\t\t\t}\n\n\t\t\tframeIndex = frameIndex + 1 < frames.length ? frameIndex + 1 : 0;\n\t\t\tindicatorTimer = indicatorTimer < frames.length ? indicatorTimer + 0.125 : 0;\n\t\t}, delay);\n\t};\n\n\tconst stop = (msg = '', code = 0): void => {\n\t\tisSpinnerActive = false;\n\t\tclearInterval(loop);\n\t\tclearPrevMessage();\n\t\tconst step =\n\t\t\tcode === 0\n\t\t\t\t? color.green(S_STEP_SUBMIT)\n\t\t\t\t: code === 1\n\t\t\t\t\t? color.red(S_STEP_CANCEL)\n\t\t\t\t\t: color.red(S_STEP_ERROR);\n\t\t_message = parseMessage(msg ?? _message);\n\t\tif (indicator === 'timer') {\n\t\t\tprocess.stdout.write(`${step} ${_message} ${formatTimer(_origin)}\\n`);\n\t\t} else {\n\t\t\tprocess.stdout.write(`${step} ${_message}\\n`);\n\t\t}\n\t\tclearHooks();\n\t\tunblock();\n\t};\n\n\tconst message = (msg = ''): void => {\n\t\t_message = parseMessage(msg ?? _message);\n\t};\n\n\treturn {\n\t\tstart,\n\t\tstop,\n\t\tmessage,\n\t};\n};\n\nexport type PromptGroupAwaitedReturn = {\n\t[P in keyof T]: Exclude, symbol>;\n};\n\nexport interface PromptGroupOptions {\n\t/**\n\t * Control how the group can be canceled\n\t * if one of the prompts is canceled.\n\t */\n\tonCancel?: (opts: { results: Prettify>> }) => void;\n}\n\ntype Prettify = {\n\t[P in keyof T]: T[P];\n} & {};\n\nexport type PromptGroup = {\n\t[P in keyof T]: (opts: {\n\t\tresults: Prettify>>>;\n\t}) => undefined | Promise;\n};\n\n/**\n * Define a group of prompts to be displayed\n * and return a results of objects within the group\n */\nexport const group = async (\n\tprompts: PromptGroup,\n\topts?: PromptGroupOptions\n): Promise>> => {\n\tconst results = {} as any;\n\tconst promptNames = Object.keys(prompts);\n\n\tfor (const name of promptNames) {\n\t\tconst prompt = prompts[name as keyof T];\n\t\tconst result = await prompt({ results })?.catch((e) => {\n\t\t\tthrow e;\n\t\t});\n\n\t\t// Pass the results to the onCancel function\n\t\t// so the user can decide what to do with the results\n\t\t// TODO: Switch to callback within core to avoid isCancel Fn\n\t\tif (typeof opts?.onCancel === 'function' && isCancel(result)) {\n\t\t\tresults[name] = 'canceled';\n\t\t\topts.onCancel({ results });\n\t\t\tcontinue;\n\t\t}\n\n\t\tresults[name] = result;\n\t}\n\n\treturn results;\n};\n\nexport type Task = {\n\t/**\n\t * Task title\n\t */\n\ttitle: string;\n\t/**\n\t * Task function\n\t */\n\ttask: (message: (string: string) => void) => string | Promise | void | Promise;\n\n\t/**\n\t * If enabled === false the task will be skipped\n\t */\n\tenabled?: boolean;\n};\n\n/**\n * Define a group of tasks to be executed\n */\nexport const tasks = async (tasks: Task[]) => {\n\tfor (const task of tasks) {\n\t\tif (task.enabled === false) continue;\n\n\t\tconst s = spinner();\n\t\ts.start(task.title);\n\t\tconst result = await task.task(s.message);\n\t\ts.stop(result || task.title);\n\t}\n};\n"],"names":["isUnicodeSupported","process","unicode","s","c","fallback","S_STEP_ACTIVE","S_STEP_CANCEL","S_STEP_ERROR","S_STEP_SUBMIT","S_BAR_START","S_BAR","S_BAR_END","S_RADIO_ACTIVE","S_RADIO_INACTIVE","S_CHECKBOX_ACTIVE","S_CHECKBOX_SELECTED","S_CHECKBOX_INACTIVE","S_PASSWORD_MASK","S_BAR_H","S_CORNER_TOP_RIGHT","S_CONNECT_LEFT","S_CORNER_BOTTOM_RIGHT","S_INFO","S_SUCCESS","S_WARN","S_ERROR","symbol","state","color","limitOptions","params","cursor","options","style","paramMaxItems","outputMaxItems","maxItems","slidingWindowLocation","shouldRenderTopEllipsis","shouldRenderBottomEllipsis","option","i","arr","isTopLimit","isBottomLimit","text","opts","TextPrompt","title","placeholder","value","password","PasswordPrompt","masked","confirm","active","inactive","ConfirmPrompt","select","opt","label","SelectPrompt","item","selectKey","SelectKeyPrompt","multiselect","MultiSelectPrompt","selected","styleOption","footer","ln","groupMultiselect","isItem","next","isLast","prefix","GroupMultiSelectPrompt","note","message","lines","titleLen","strip","len","sum","line","msg","cancel","intro","outro","log","parts","firstLine","stream","iterable","lineWidth","chunk","chunkLen","spinner","indicator","frames","delay","isCI","unblock","loop","isSpinnerActive","_message","_prevMessage","_origin","handleExit","code","stop","errorEventHandler","signalEventHandler","registerHooks","clearHooks","clearPrevMessage","prevLines","erase","parseMessage","formatTimer","origin","duration","min","secs","start","block","frameIndex","indicatorTimer","frame","loadingDots","step","group","prompts","results","promptNames","name","prompt","result","e","isCancel","tasks","task"],"mappings":"sZAEe,SAASA,IAAqB,CAC5C,OAAIC,EAAQ,WAAa,QACjBA,EAAQ,IAAI,OAAS,QAGtB,EAAQA,EAAQ,IAAI,IACvB,EAAQA,EAAQ,IAAI,YACpB,EAAQA,EAAQ,IAAI,kBACpBA,EAAQ,IAAI,aAAe,gBAC3BA,EAAQ,IAAI,eAAiB,oBAC7BA,EAAQ,IAAI,eAAiB,UAC7BA,EAAQ,IAAI,OAAS,kBACrBA,EAAQ,IAAI,OAAS,aACrBA,EAAQ,IAAI,oBAAsB,oBACvC,CCIA,MAAMC,EAAUF,KACVG,EAAI,CAACC,EAAWC,IAAsBH,EAAUE,EAAIC,EACpDC,GAAgBH,EAAE,SAAK,GAAG,EAC1BI,EAAgBJ,EAAE,SAAK,GAAG,EAC1BK,EAAeL,EAAE,SAAK,GAAG,EACzBM,EAA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ACjB,QAAQ,OAAO,MAAM,GAAGgC,CAAI,KAAKzB,CAAQ,IAAIc,EAAYZ,CAAO,CAAC;AAAA,CAAI,EAErE,QAAQ,OAAO,MAAM,GAAGuB,CAAI,KAAKzB,CAAQ;AAAA,CAAI,EAE9CS,EAAAA,EACAZ,EAAAA,CACD,EAMA,MAAO,CACN,MAAAsB,EACA,KAAAd,EACA,QAPe,CAACzB,EAAM,KAAa,CACnCoB,EAAWa,EAAajC,GAAOoB,CAAQ,CACxC,CAMA,CACD,EA4Ba0B,GAAQ,MACpBC,EACAtF,IACoD,CACpD,MAAMuF,EAAU,CACVC,EAAAA,EAAc,OAAO,KAAKF,CAAO,EAEvC,UAAWG,KAAQD,EAAa,CAC/B,MAAME,EAASJ,EAAQG,CAAe,EAChCE,EAAS,MAAMD,EAAO,CAAE,QAAAH,CAAQ,CAAC,GAAG,MAAOK,GAAM,CACtD,MAAMA,CACP,CAAC,EAKD,GAAI,OAAO5F,GAAM,UAAa,YAAc6F,GAASF,CAAM,EAAG,CAC7DJ,EAAQE,CAAI,EAAI,WAChBzF,EAAK,SAAS,CAAE,QAAAuF,CAAQ,CAAC,EACzB,QACD,CAEAA,EAAQE,CAAI,EAAIE,CACjB,CAEA,OAAOJ,CACR,EAqBaO,GAAQ,MAAOA,GAAkB,CAC7C,UAAWC,KAAQD,EAAO,CACzB,GAAIC,EAAK,UAAY,GAAO,SAE5B,MAAM3I,EAAI+F,IACV/F,EAAE,MAAM2I,EAAK,KAAK,EAClB,MAAMJ,EAAS,MAAMI,EAAK,KAAK3I,EAAE,OAAO,EACxCA,EAAE,KAAKuI,GAAUI,EAAK,KAAK,CAC5B,CACD","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/node_modules/@clack/prompts/package.json b/node_modules/@clack/prompts/package.json new file mode 100644 index 0000000..470a10a --- /dev/null +++ b/node_modules/@clack/prompts/package.json @@ -0,0 +1,61 @@ +{ + "name": "@clack/prompts", + "version": "0.10.0", + "type": "module", + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/natemoo-re/clack", + "directory": "packages/prompts" + }, + "bugs": { + "url": "https://github.com/natemoo-re/clack/issues" + }, + "homepage": "https://github.com/natemoo-re/clack/tree/main/packages/prompts#readme", + "files": [ + "dist", + "CHANGELOG.md" + ], + "author": { + "name": "Nate Moore", + "email": "nate@natemoo.re", + "url": "https://twitter.com/n_moore" + }, + "license": "MIT", + "keywords": [ + "ask", + "clack", + "cli", + "command-line", + "command", + "input", + "interact", + "interface", + "menu", + "prompt", + "prompts", + "stdin", + "ui" + ], + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5", + "@clack/core": "0.4.1" + }, + "devDependencies": { + "is-unicode-supported": "^1.3.0" + }, + "scripts": { + "build": "unbuild" + } +} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/LICENSE b/node_modules/@discordjs/builders/LICENSE new file mode 100644 index 0000000..cbe9c65 --- /dev/null +++ b/node_modules/@discordjs/builders/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021 Noel Buechler + Copyright 2021 Vlad Frangu + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@discordjs/builders/README.md b/node_modules/@discordjs/builders/README.md new file mode 100644 index 0000000..dc88b7f --- /dev/null +++ b/node_modules/@discordjs/builders/README.md @@ -0,0 +1,72 @@ +
+
+

+ discord.js +

+
+

+ Discord server + npm version + npm downloads + Build status + Code coverage +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`@discordjs/builders` is a utility package for easily building Discord API payloads. + +## Installation + +**Node.js 16.11.0 or newer is required.** + +```sh +npm install @discordjs/builders +yarn add @discordjs/builders +pnpm add @discordjs/builders +``` + +## Examples + +You can find examples of how to use the builders in the [Slash Command Builders][example] examples. + +## Links + +- [Website][website] ([source][website-source]) +- [Documentation][documentation] +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[example]: https://github.com/discordjs/discord.js/blob/main/packages/builders/docs/examples/Slash%20Command%20Builders.md +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/builders/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/builders +[npm]: https://www.npmjs.com/package/@discordjs/builders +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/node_modules/@discordjs/builders/dist/index.d.mts b/node_modules/@discordjs/builders/dist/index.d.mts new file mode 100644 index 0000000..ac28cd2 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.d.mts @@ -0,0 +1,2043 @@ +import * as _sapphire_shapeshift from '@sapphire/shapeshift'; +import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10'; +export * from '@discordjs/formatters'; +import { JSONEncodable, Equatable } from '@discordjs/util'; + +declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator; +declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator; +declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator; +declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{ + name: string; + value: string; + inline: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>>; +declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>[], _sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>>; +declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator; +declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void; +declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator; +declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator; +declare const urlPredicate: _sapphire_shapeshift.UnionValidator; +declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{ + name: string | null; + iconURL: string | null | undefined; + url: string | null | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name: string | null; + iconURL: string | null | undefined; + url: string | null | undefined; +}>>; +declare const RGBPredicate: _sapphire_shapeshift.NumberValidator; +declare const colorPredicate: _sapphire_shapeshift.UnionValidator; +declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator; +declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator; +declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{ + text: string | null; + iconURL: string | null | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + text: string | null; + iconURL: string | null | undefined; +}>>; +declare const timestampPredicate: _sapphire_shapeshift.UnionValidator; +declare const titlePredicate: _sapphire_shapeshift.UnionValidator; + +declare const Assertions$5_RGBPredicate: typeof RGBPredicate; +declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate; +declare const Assertions$5_colorPredicate: typeof colorPredicate; +declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate; +declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate; +declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate; +declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate; +declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate; +declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate; +declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate; +declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate; +declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate; +declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate; +declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate; +declare const Assertions$5_timestampPredicate: typeof timestampPredicate; +declare const Assertions$5_titlePredicate: typeof titlePredicate; +declare const Assertions$5_urlPredicate: typeof urlPredicate; +declare const Assertions$5_validateFieldLength: typeof validateFieldLength; +declare namespace Assertions$5 { + export { Assertions$5_RGBPredicate as RGBPredicate, Assertions$5_authorNamePredicate as authorNamePredicate, Assertions$5_colorPredicate as colorPredicate, Assertions$5_descriptionPredicate as descriptionPredicate, Assertions$5_embedAuthorPredicate as embedAuthorPredicate, Assertions$5_embedFieldPredicate as embedFieldPredicate, Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$5_embedFooterPredicate as embedFooterPredicate, Assertions$5_fieldInlinePredicate as fieldInlinePredicate, Assertions$5_fieldLengthPredicate as fieldLengthPredicate, Assertions$5_fieldNamePredicate as fieldNamePredicate, Assertions$5_fieldValuePredicate as fieldValuePredicate, Assertions$5_footerTextPredicate as footerTextPredicate, Assertions$5_imageURLPredicate as imageURLPredicate, Assertions$5_timestampPredicate as timestampPredicate, Assertions$5_titlePredicate as titlePredicate, Assertions$5_urlPredicate as urlPredicate, Assertions$5_validateFieldLength as validateFieldLength }; +} + +/** + * Normalizes data that is a rest parameter or an array into an array with a depth of 1. + * + * @typeParam ItemType - The data that must satisfy {@link RestOrArray}. + * @param arr - The (possibly variadic) data to normalize + */ +declare function normalizeArray(arr: RestOrArray): ItemType[]; +/** + * Represents data that may be an array or came from a rest parameter. + * + * @remarks + * This type is used throughout builders to ensure both an array and variadic arguments + * may be used. It is normalized with {@link normalizeArray}. + */ +type RestOrArray = Type[] | [Type[]]; + +/** + * A tuple satisfying the RGB color model. + * + * @see {@link https://developer.mozilla.org/docs/Glossary/RGB} + */ +type RGBTuple = [red: number, green: number, blue: number]; +/** + * The base icon data typically used in payloads. + */ +interface IconData { + /** + * The URL of the icon. + */ + iconURL?: string; + /** + * The proxy URL of the icon. + */ + proxyIconURL?: string; +} +/** + * Represents the author data of an embed. + */ +interface EmbedAuthorData extends IconData, Omit { +} +/** + * Represents the author options of an embed. + */ +interface EmbedAuthorOptions extends Omit { +} +/** + * Represents the footer data of an embed. + */ +interface EmbedFooterData extends IconData, Omit { +} +/** + * Represents the footer options of an embed. + */ +interface EmbedFooterOptions extends Omit { +} +/** + * Represents the image data of an embed. + */ +interface EmbedImageData extends Omit { + /** + * The proxy URL for the image. + */ + proxyURL?: string; +} +/** + * A builder that creates API-compatible JSON data for embeds. + */ +declare class EmbedBuilder { + /** + * The API data associated with this embed. + */ + readonly data: APIEmbed; + /** + * Creates a new embed from API data. + * + * @param data - The API data to create this embed with + */ + constructor(data?: APIEmbed); + /** + * Appends fields to the embed. + * + * @remarks + * This method accepts either an array of fields or a variable number of field parameters. + * The maximum amount of fields that can be added is 25. + * @example + * Using an array: + * ```ts + * const fields: APIEmbedField[] = ...; + * const embed = new EmbedBuilder() + * .addFields(fields); + * ``` + * @example + * Using rest parameters (variadic): + * ```ts + * const embed = new EmbedBuilder() + * .addFields( + * { name: 'Field 1', value: 'Value 1' }, + * { name: 'Field 2', value: 'Value 2' }, + * ); + * ``` + * @param fields - The fields to add + */ + addFields(...fields: RestOrArray): this; + /** + * Removes, replaces, or inserts fields for this embed. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}. + * The maximum amount of fields that can be added is 25. + * + * It's useful for modifying and adjusting order of the already-existing fields of an embed. + * @example + * Remove the first field: + * ```ts + * embed.spliceFields(0, 1); + * ``` + * @example + * Remove the first n fields: + * ```ts + * const n = 4; + * embed.spliceFields(0, n); + * ``` + * @example + * Remove the last field: + * ```ts + * embed.spliceFields(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of fields to remove + * @param fields - The replacing field objects + */ + spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this; + /** + * Sets the fields for this embed. + * + * @remarks + * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically, + * it splices the entire array of fields, replacing them with the provided fields. + * + * You can set a maximum of 25 fields. + * @param fields - The fields to set + */ + setFields(...fields: RestOrArray): this; + /** + * Sets the author of this embed. + * + * @param options - The options to use + */ + setAuthor(options: EmbedAuthorOptions | null): this; + /** + * Sets the color of this embed. + * + * @param color - The color to use + */ + setColor(color: RGBTuple | number | null): this; + /** + * Sets the description of this embed. + * + * @param description - The description to use + */ + setDescription(description: string | null): this; + /** + * Sets the footer of this embed. + * + * @param options - The footer to use + */ + setFooter(options: EmbedFooterOptions | null): this; + /** + * Sets the image of this embed. + * + * @param url - The image URL to use + */ + setImage(url: string | null): this; + /** + * Sets the thumbnail of this embed. + * + * @param url - The thumbnail URL to use + */ + setThumbnail(url: string | null): this; + /** + * Sets the timestamp of this embed. + * + * @param timestamp - The timestamp or date to use + */ + setTimestamp(timestamp?: Date | number | null): this; + /** + * Sets the title for this embed. + * + * @param title - The title to use + */ + setTitle(title: string | null): this; + /** + * Sets the URL of this embed. + * + * @param url - The URL to use + */ + setURL(url: string | null): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIEmbed; +} + +/** + * A builder that creates API-compatible JSON data for string select menu options. + */ +declare class StringSelectMenuOptionBuilder implements JSONEncodable { + data: Partial; + /** + * Creates a new string select menu option from API data. + * + * @param data - The API data to create this string select menu option with + * @example + * Creating a string select menu option from an API data object: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * label: 'catchy label', + * value: '1', + * }); + * ``` + * @example + * Creating a string select menu option using setters and API data: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * default: true, + * value: '1', + * }) + * .setLabel('woah'); + * ``` + */ + constructor(data?: Partial); + /** + * Sets the label for this option. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * Sets the value for this option. + * + * @param value - The value to use + */ + setValue(value: string): this; + /** + * Sets the description for this option. + * + * @param description - The description to use + */ + setDescription(description: string): this; + /** + * Sets whether this option is selected by default. + * + * @param isDefault - Whether this option is selected by default + */ + setDefault(isDefault?: boolean): this; + /** + * Sets the emoji to display for this option. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji: APIMessageComponentEmoji): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APISelectMenuOption; +} + +declare const customIdValidator: _sapphire_shapeshift.StringValidator; +declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; +}>>; +declare const disabledValidator: _sapphire_shapeshift.BooleanValidator; +declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator; +declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator; +declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator; +declare const minMaxValidator: _sapphire_shapeshift.NumberValidator; +declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator; +declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{ + label: string; + value: string; + description: string | undefined; + emoji: _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; + }> | undefined; + default: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + label: string; + value: string; + description: string | undefined; + emoji: _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; + }> | undefined; + default: boolean | undefined; +}>>; +declare const optionValidator: _sapphire_shapeshift.InstanceValidator; +declare const optionsValidator: _sapphire_shapeshift.ArrayValidator; +declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator; +declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void; +declare const defaultValidator: _sapphire_shapeshift.BooleanValidator; +declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void; +declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator; +declare const urlValidator: _sapphire_shapeshift.StringValidator; +declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, skuId?: string, url?: string): void; + +declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator; +declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator; +declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator; +declare const Assertions$4_customIdValidator: typeof customIdValidator; +declare const Assertions$4_defaultValidator: typeof defaultValidator; +declare const Assertions$4_disabledValidator: typeof disabledValidator; +declare const Assertions$4_emojiValidator: typeof emojiValidator; +declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator; +declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator; +declare const Assertions$4_minMaxValidator: typeof minMaxValidator; +declare const Assertions$4_optionValidator: typeof optionValidator; +declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator; +declare const Assertions$4_optionsValidator: typeof optionsValidator; +declare const Assertions$4_urlValidator: typeof urlValidator; +declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters; +declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters; +declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters; +declare namespace Assertions$4 { + export { Assertions$4_buttonLabelValidator as buttonLabelValidator, Assertions$4_buttonStyleValidator as buttonStyleValidator, Assertions$4_channelTypesValidator as channelTypesValidator, Assertions$4_customIdValidator as customIdValidator, Assertions$4_defaultValidator as defaultValidator, Assertions$4_disabledValidator as disabledValidator, Assertions$4_emojiValidator as emojiValidator, Assertions$4_jsonOptionValidator as jsonOptionValidator, Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$4_minMaxValidator as minMaxValidator, Assertions$4_optionValidator as optionValidator, Assertions$4_optionsLengthValidator as optionsLengthValidator, Assertions$4_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$4_urlValidator as urlValidator, Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters }; +} + +/** + * Any action row component data represented as an object. + */ +type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes; +/** + * The base component builder that contains common symbols for all sorts of components. + * + * @typeParam DataType - The type of internal API data that is stored within the component + */ +declare abstract class ComponentBuilder> = APIBaseComponent> implements JSONEncodable { + /** + * The API data associated with this component. + */ + readonly data: Partial; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + abstract toJSON(): AnyAPIActionRowComponent; + /** + * Constructs a new kind of component. + * + * @param data - The data to construct a component out of + */ + constructor(data: Partial); +} + +/** + * A builder that creates API-compatible JSON data for buttons. + */ +declare class ButtonBuilder extends ComponentBuilder { + /** + * Creates a new button from API data. + * + * @param data - The API data to create this button with + * @example + * Creating a button from an API data object: + * ```ts + * const button = new ButtonBuilder({ + * custom_id: 'a cool button', + * style: ButtonStyle.Primary, + * label: 'Click Me', + * emoji: { + * name: 'smile', + * id: '123456789012345678', + * }, + * }); + * ``` + * @example + * Creating a button using setters and API data: + * ```ts + * const button = new ButtonBuilder({ + * style: ButtonStyle.Secondary, + * label: 'Click Me', + * }) + * .setEmoji({ name: '🙂' }) + * .setCustomId('another cool button'); + * ``` + */ + constructor(data?: Partial); + /** + * Sets the style of this button. + * + * @param style - The style to use + */ + setStyle(style: ButtonStyle): this; + /** + * Sets the URL for this button. + * + * @remarks + * This method is only available to buttons using the `Link` button style. + * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`. + * @param url - The URL to use + */ + setURL(url: string): this; + /** + * Sets the custom id for this button. + * + * @remarks + * This method is only applicable to buttons that are not using the `Link` button style. + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets the SKU id that represents a purchasable SKU for this button. + * + * @remarks Only available when using premium-style buttons. + * @param skuId - The SKU id to use + */ + setSKUId(skuId: Snowflake): this; + /** + * Sets the emoji to display on this button. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji: APIMessageComponentEmoji): this; + /** + * Sets whether this button is disabled. + * + * @param disabled - Whether to disable this button + */ + setDisabled(disabled?: boolean): this; + /** + * Sets the label for this button. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIButtonComponent; +} + +/** + * The base select menu builder that contains common symbols for select menu builders. + * + * @typeParam SelectMenuType - The type of select menu this would be instantiated for. + */ +declare abstract class BaseSelectMenuBuilder extends ComponentBuilder { + /** + * Sets the placeholder for this select menu. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder: string): this; + /** + * Sets the minimum values that must be selected in the select menu. + * + * @param minValues - The minimum values that must be selected + */ + setMinValues(minValues: number): this; + /** + * Sets the maximum values that must be selected in the select menu. + * + * @param maxValues - The maximum values that must be selected + */ + setMaxValues(maxValues: number): this; + /** + * Sets the custom id for this select menu. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets whether this select menu is disabled. + * + * @param disabled - Whether this select menu is disabled + */ + setDisabled(disabled?: boolean): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): SelectMenuType; +} + +/** + * A builder that creates API-compatible JSON data for channel select menus. + */ +declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement) + * .setMinValues(2); + * ``` + */ + constructor(data?: Partial); + /** + * Adds channel types to this select menu. + * + * @param types - The channel types to use + */ + addChannelTypes(...types: RestOrArray): this; + /** + * Sets channel types for this select menu. + * + * @param types - The channel types to use + */ + setChannelTypes(...types: RestOrArray): this; + /** + * Adds default channels to this auto populated select menu. + * + * @param channels - The channels to add + */ + addDefaultChannels(...channels: RestOrArray): this; + /** + * Sets default channels for this auto populated select menu. + * + * @param channels - The channels to set + */ + setDefaultChannels(...channels: RestOrArray): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APIChannelSelectComponent; +} + +/** + * A builder that creates API-compatible JSON data for mentionable select menus. + */ +declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles: RestOrArray): this; + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users: RestOrArray): this; + /** + * Adds default values to this auto populated select menu. + * + * @param values - The values to add + */ + addDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this; + /** + * Sets default values for this auto populated select menu. + * + * @param values - The values to set + */ + setDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this; +} + +/** + * A builder that creates API-compatible JSON data for role select menus. + */ +declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles: RestOrArray): this; + /** + * Sets default roles for this auto populated select menu. + * + * @param roles - The roles to set + */ + setDefaultRoles(...roles: RestOrArray): this; +} + +/** + * A builder that creates API-compatible JSON data for string select menus. + */ +declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * The options within this select menu. + */ + readonly options: StringSelectMenuOptionBuilder[]; + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * options: [ + * { label: 'option 1', value: '1' }, + * { label: 'option 2', value: '2' }, + * { label: 'option 3', value: '3' }, + * ], + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1) + * .addOptions({ + * label: 'Catchy', + * value: 'catch', + * }); + * ``` + */ + constructor(data?: Partial); + /** + * Adds options to this select menu. + * + * @param options - The options to add + */ + addOptions(...options: RestOrArray): this; + /** + * Sets the options for this select menu. + * + * @param options - The options to set + */ + setOptions(...options: RestOrArray): this; + /** + * Removes, replaces, or inserts options for this select menu. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}. + * It's useful for modifying and adjusting the order of existing options. + * @example + * Remove the first option: + * ```ts + * selectMenu.spliceOptions(0, 1); + * ``` + * @example + * Remove the first n option: + * ```ts + * const n = 4; + * selectMenu.spliceOptions(0, n); + * ``` + * @example + * Remove the last option: + * ```ts + * selectMenu.spliceOptions(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of options to remove + * @param options - The replacing option objects or builders + */ + spliceOptions(index: number, deleteCount: number, ...options: RestOrArray): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APIStringSelectComponent; +} + +/** + * A builder that creates API-compatible JSON data for user select menus. + */ +declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users: RestOrArray): this; + /** + * Sets default users for this auto populated select menu. + * + * @param users - The users to set + */ + setDefaultUsers(...users: RestOrArray): this; +} + +/** + * A builder that creates API-compatible JSON data for text inputs. + */ +declare class TextInputBuilder extends ComponentBuilder implements Equatable> { + /** + * Creates a new text input from API data. + * + * @param data - The API data to create this text input with + * @example + * Creating a text input from an API data object: + * ```ts + * const textInput = new TextInputBuilder({ + * custom_id: 'a cool text input', + * label: 'Type something', + * style: TextInputStyle.Short, + * }); + * ``` + * @example + * Creating a text input using setters and API data: + * ```ts + * const textInput = new TextInputBuilder({ + * label: 'Type something else', + * }) + * .setCustomId('woah') + * .setStyle(TextInputStyle.Paragraph); + * ``` + */ + constructor(data?: APITextInputComponent & { + type?: ComponentType.TextInput; + }); + /** + * Sets the custom id for this text input. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets the label for this text input. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * Sets the style for this text input. + * + * @param style - The style to use + */ + setStyle(style: TextInputStyle): this; + /** + * Sets the minimum length of text for this text input. + * + * @param minLength - The minimum length of text for this text input + */ + setMinLength(minLength: number): this; + /** + * Sets the maximum length of text for this text input. + * + * @param maxLength - The maximum length of text for this text input + */ + setMaxLength(maxLength: number): this; + /** + * Sets the placeholder for this text input. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder: string): this; + /** + * Sets the value for this text input. + * + * @param value - The value to use + */ + setValue(value: string): this; + /** + * Sets whether this text input is required. + * + * @param required - Whether this text input is required + */ + setRequired(required?: boolean): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APITextInputComponent; + /** + * Whether this is equal to another structure. + */ + equals(other: APITextInputComponent | JSONEncodable): boolean; +} + +/** + * The builders that may be used for messages. + */ +type MessageComponentBuilder = ActionRowBuilder | MessageActionRowComponentBuilder; +/** + * The builders that may be used for modals. + */ +type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder; +/** + * The builders that may be used within an action row for messages. + */ +type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder; +/** + * The builders that may be used within an action row for modals. + */ +type ModalActionRowComponentBuilder = TextInputBuilder; +/** + * Any builder. + */ +type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder; +/** + * A builder that creates API-compatible JSON data for action rows. + * + * @typeParam ComponentType - The types of components this action row holds + */ +declare class ActionRowBuilder extends ComponentBuilder> { + /** + * The components within this action row. + */ + readonly components: ComponentType[]; + /** + * Creates a new action row from API data. + * + * @param data - The API data to create this action row with + * @example + * Creating an action row from an API data object: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Type something", + * style: TextInputStyle.Short, + * type: ComponentType.TextInput, + * }, + * ], + * }); + * ``` + * @example + * Creating an action row using setters and API data: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Click me", + * style: ButtonStyle.Primary, + * type: ComponentType.Button, + * }, + * ], + * }) + * .addComponents(button2, button3); + * ``` + */ + constructor({ components, ...data }?: Partial>); + /** + * Adds components to this action row. + * + * @param components - The components to add + */ + addComponents(...components: RestOrArray): this; + /** + * Sets components for this action row. + * + * @param components - The components to set + */ + setComponents(...components: RestOrArray): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIActionRowComponent>; +} + +/** + * Components here are mapped to their respective builder. + */ +interface MappedComponentTypes { + /** + * The action row component type is associated with an {@link ActionRowBuilder}. + */ + [ComponentType.ActionRow]: ActionRowBuilder; + /** + * The button component type is associated with a {@link ButtonBuilder}. + */ + [ComponentType.Button]: ButtonBuilder; + /** + * The string select component type is associated with a {@link StringSelectMenuBuilder}. + */ + [ComponentType.StringSelect]: StringSelectMenuBuilder; + /** + * The text input component type is associated with a {@link TextInputBuilder}. + */ + [ComponentType.TextInput]: TextInputBuilder; + /** + * The user select component type is associated with a {@link UserSelectMenuBuilder}. + */ + [ComponentType.UserSelect]: UserSelectMenuBuilder; + /** + * The role select component type is associated with a {@link RoleSelectMenuBuilder}. + */ + [ComponentType.RoleSelect]: RoleSelectMenuBuilder; + /** + * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}. + */ + [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder; + /** + * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}. + */ + [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder; +} +/** + * Factory for creating components from API data. + * + * @typeParam ComponentType - The type of component to use + * @param data - The API data to transform to a component class + */ +declare function createComponentBuilder(data: (APIModalComponent | APIMessageComponent) & { + type: ComponentType; +}): MappedComponentTypes[ComponentType]; +/** + * Factory for creating components from API data. + * + * @typeParam ComponentBuilder - The type of component to use + * @param data - The API data to transform to a component class + */ +declare function createComponentBuilder(data: ComponentBuilder): ComponentBuilder; + +declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator; +declare const minLengthValidator: _sapphire_shapeshift.NumberValidator; +declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator; +declare const requiredValidator: _sapphire_shapeshift.BooleanValidator; +declare const valueValidator: _sapphire_shapeshift.StringValidator; +declare const placeholderValidator: _sapphire_shapeshift.StringValidator; +declare const labelValidator: _sapphire_shapeshift.StringValidator; +declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void; + +declare const Assertions$3_labelValidator: typeof labelValidator; +declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator; +declare const Assertions$3_minLengthValidator: typeof minLengthValidator; +declare const Assertions$3_placeholderValidator: typeof placeholderValidator; +declare const Assertions$3_requiredValidator: typeof requiredValidator; +declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator; +declare const Assertions$3_valueValidator: typeof valueValidator; +declare namespace Assertions$3 { + export { Assertions$3_labelValidator as labelValidator, Assertions$3_maxLengthValidator as maxLengthValidator, Assertions$3_minLengthValidator as minLengthValidator, Assertions$3_placeholderValidator as placeholderValidator, Assertions$3_requiredValidator as requiredValidator, Assertions$3_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$3_valueValidator as valueValidator }; +} + +/** + * A builder that creates API-compatible JSON data for modals. + */ +declare class ModalBuilder implements JSONEncodable { + /** + * The API data associated with this modal. + */ + readonly data: Partial; + /** + * The components within this modal. + */ + readonly components: ActionRowBuilder[]; + /** + * Creates a new modal from API data. + * + * @param data - The API data to create this modal with + */ + constructor({ components, ...data }?: Partial); + /** + * Sets the title of this modal. + * + * @param title - The title to use + */ + setTitle(title: string): this; + /** + * Sets the custom id of this modal. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Adds components to this modal. + * + * @param components - The components to add + */ + addComponents(...components: RestOrArray | APIActionRowComponent>): this; + /** + * Sets components for this modal. + * + * @param components - The components to set + */ + setComponents(...components: RestOrArray>): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIModalInteractionResponseCallbackData; +} + +declare const titleValidator: _sapphire_shapeshift.StringValidator; +declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder, ...ActionRowBuilder[]], ActionRowBuilder>; +declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder[]): void; + +declare const Assertions$2_componentsValidator: typeof componentsValidator; +declare const Assertions$2_titleValidator: typeof titleValidator; +declare namespace Assertions$2 { + export { Assertions$2_componentsValidator as componentsValidator, Assertions$2_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters }; +} + +/** + * This mixin holds name and description symbols for slash commands. + */ +declare class SharedNameAndDescription { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The description of this command. + */ + readonly description: string; + /** + * The description localizations of this command. + */ + readonly description_localizations?: LocalizationMap; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name: string): this; + /** + * Sets the description of this command. + * + * @param description - The description to use + */ + setDescription(description: string): this; + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale: LocaleString, localizedName: string | null): this; + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames: LocalizationMap | null): this; + /** + * Sets a description localization for this command. + * + * @param locale - The locale to set + * @param localizedDescription - The localized description for the given locale + */ + setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this; + /** + * Sets the description localizations for this command. + * + * @param localizedDescriptions - The object of localized descriptions to set + */ + setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this; +} + +/** + * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands. + */ +declare class SharedSlashCommand { + readonly name: string; + readonly name_localizations?: LocalizationMap; + readonly description: string; + readonly description_localizations?: LocalizationMap; + readonly options: ToAPIApplicationCommandOptions[]; + readonly contexts?: InteractionContextType[]; + /** + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + readonly default_member_permissions: Permissions | null | undefined; + /** + * @deprecated Use {@link SharedSlashCommand.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + readonly integration_types?: ApplicationIntegrationType[]; + readonly nsfw: boolean | undefined; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts: RestOrArray): this; + /** + * Sets the integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes: RestOrArray): this; + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether or not to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + setDefaultPermission(value: boolean): this; + /** + * Sets the default permissions a member should have in order to run the command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this; + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated + * Use {@link SharedSlashCommand.setContexts} instead. + */ + setDMPermission(enabled: boolean | null | undefined): this; + /** + * Sets whether this command is NSFW. + * + * @param nsfw - Whether this command is NSFW + */ + setNSFW(nsfw?: boolean): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody; +} + +/** + * The base application command option builder that contains common symbols for application command builders. + */ +declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription { + /** + * The type of this option. + */ + abstract readonly type: ApplicationCommandOptionType; + /** + * Whether this option is required. + * + * @defaultValue `false` + */ + readonly required: boolean; + /** + * Sets whether this option is required. + * + * @param required - Whether this option should be required + */ + setRequired(required: boolean): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + abstract toJSON(): APIApplicationCommandBasicOption; + /** + * This method runs required validators on this builder. + */ + protected runRequiredValidations(): void; +} + +/** + * A slash command attachment option. + */ +declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Attachment; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandAttachmentOption; +} + +/** + * A slash command boolean option. + */ +declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Boolean; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandBooleanOption; +} + +/** + * The allowed channel types used for a channel option in a slash command builder. + * + * @privateRemarks This can't be dynamic because const enums are erased at runtime. + * @internal + */ +declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum, ChannelType.GuildMedia]; +/** + * The type of allowed channel types used for a channel option. + */ +type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number]; +/** + * This mixin holds channel type symbols used for options. + */ +declare class ApplicationCommandOptionChannelTypesMixin { + /** + * The channel types of this option. + */ + readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[]; + /** + * Adds channel types to this option. + * + * @param channelTypes - The channel types + */ + addChannelTypes(...channelTypes: RestOrArray): this; +} + +/** + * A slash command channel option. + */ +declare class SlashCommandChannelOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Channel; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandChannelOption; +} +interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin { +} + +/** + * This mixin holds minimum and maximum symbols used for options. + */ +declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The maximum value of this option. + */ + readonly max_value?: number; + /** + * The minimum value of this option. + */ + readonly min_value?: number; + /** + * Sets the maximum number value of this option. + * + * @param max - The maximum value this option can be + */ + abstract setMaxValue(max: number): this; + /** + * Sets the minimum number value of this option. + * + * @param min - The minimum value this option can be + */ + abstract setMinValue(min: number): this; +} + +/** + * This mixin holds choices and autocomplete symbols used for options. + */ +declare class ApplicationCommandOptionWithAutocompleteMixin { + /** + * Whether this option utilizes autocomplete. + */ + readonly autocomplete?: boolean; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + readonly type: ApplicationCommandOptionType; + /** + * Whether this option uses autocomplete. + * + * @param autocomplete - Whether this option should use autocomplete + */ + setAutocomplete(autocomplete: boolean): this; +} + +/** + * This mixin holds choices and autocomplete symbols used for options. + */ +declare class ApplicationCommandOptionWithChoicesMixin { + /** + * The choices of this option. + */ + readonly choices?: APIApplicationCommandOptionChoice[]; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + readonly type: ApplicationCommandOptionType; + /** + * Adds multiple choices to this option. + * + * @param choices - The choices to add + */ + addChoices(...choices: RestOrArray>): this; + /** + * Sets multiple choices for this option. + * + * @param choices - The choices to set + */ + setChoices>(...choices: RestOrArray): this; +} + +/** + * A slash command integer option. + */ +declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Integer; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max: number): this; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandIntegerOption; +} +interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command mentionable option. + */ +declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Mentionable; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandMentionableOption; +} + +/** + * A slash command number option. + */ +declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Number; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max: number): this; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandNumberOption; +} +interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command role option. + */ +declare class SlashCommandRoleOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Role; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandRoleOption; +} + +/** + * A slash command string option. + */ +declare class SlashCommandStringOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.String; + /** + * The maximum length of this option. + */ + readonly max_length?: number; + /** + * The minimum length of this option. + */ + readonly min_length?: number; + /** + * Sets the maximum length of this string option. + * + * @param max - The maximum length this option can be + */ + setMaxLength(max: number): this; + /** + * Sets the minimum length of this string option. + * + * @param min - The minimum length this option can be + */ + setMinLength(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandStringOption; +} +interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command user option. + */ +declare class SlashCommandUserOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.User; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandUserOption; +} + +/** + * This mixin holds symbols that can be shared in slash command options. + * + * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option. + */ +declare class SharedSlashCommandOptions> { + readonly options: ToAPIApplicationCommandOptions[]; + /** + * Adds a boolean option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): TypeAfterAddingOptions; + /** + * Adds a user option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): TypeAfterAddingOptions; + /** + * Adds a channel option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): TypeAfterAddingOptions; + /** + * Adds a role option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): TypeAfterAddingOptions; + /** + * Adds an attachment option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): TypeAfterAddingOptions; + /** + * Adds a mentionable option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): TypeAfterAddingOptions; + /** + * Adds a string option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): TypeAfterAddingOptions; + /** + * Adds an integer option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): TypeAfterAddingOptions; + /** + * Adds a number option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): TypeAfterAddingOptions; + /** + * Where the actual adding magic happens. ✨ + * + * @param input - The input. What else? + * @param Instance - The instance of whatever is being added + * @internal + */ + private _sharedAddOptionMethod; +} + +/** + * Represents a folder for subcommands. + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} + */ +declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions { + /** + * The name of this subcommand group. + */ + readonly name: string; + /** + * The description of this subcommand group. + */ + readonly description: string; + /** + * The subcommands within this subcommand group. + */ + readonly options: SlashCommandSubcommandBuilder[]; + /** + * Adds a new subcommand to this group. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIApplicationCommandSubcommandGroupOption; +} +interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription { +} +/** + * A builder that creates API-compatible JSON data for slash command subcommands. + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} + */ +declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions { + /** + * The name of this subcommand. + */ + readonly name: string; + /** + * The description of this subcommand. + */ + readonly description: string; + /** + * The options within this subcommand. + */ + readonly options: ApplicationCommandOptionBase[]; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIApplicationCommandSubcommandOption; +} +interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { +} + +/** + * This mixin holds symbols that can be shared in slash subcommands. + * + * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group. + */ +declare class SharedSlashCommandSubcommands> { + readonly options: ToAPIApplicationCommandOptions[]; + /** + * Adds a new subcommand group to this command. + * + * @param input - A function that returns a subcommand group builder or an already built builder + */ + addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): TypeAfterAddingSubcommands; + /** + * Adds a new subcommand to this command. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands; +} + +/** + * A builder that creates API-compatible JSON data for slash commands. + */ +declare class SlashCommandBuilder { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The description of this command. + */ + readonly description: string; + /** + * The description localizations of this command. + */ + readonly description_localizations?: LocalizationMap; + /** + * The options of this command. + */ + readonly options: ToAPIApplicationCommandOptions[]; + /** + * The contexts for this command. + */ + readonly contexts?: InteractionContextType[]; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + /** + * The set of permissions represented as a bit set for the command. + */ + readonly default_member_permissions: Permissions | null | undefined; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link SlashCommandBuilder.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + /** + * The integration types for this command. + */ + readonly integration_types?: ApplicationIntegrationType[]; + /** + * Whether this command is NSFW. + */ + readonly nsfw: boolean | undefined; +} +interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, SharedSlashCommand { +} +/** + * An interface specifically for slash command subcommands. + */ +interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand { +} +/** + * An interface specifically for slash command options. + */ +interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommand { +} +/** + * An interface that ensures the `toJSON()` call will return something + * that can be serialized into API-compatible data. + */ +interface ToAPIApplicationCommandOptions { + toJSON(): APIApplicationCommandOption; +} + +declare function validateName$1(name: unknown): asserts name is string; +declare function validateDescription(description: unknown): asserts description is string; +declare function validateLocale(locale: unknown): Locale; +declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[]; +declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void; +declare function validateDefaultPermission$1(value: unknown): asserts value is boolean; +declare function validateRequired(required: unknown): asserts required is boolean; +declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void; +declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType; +declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional>> | null | undefined>; +declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap; +declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined; +declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined; +declare function validateNSFW(value: unknown): asserts value is boolean; +declare const contextsPredicate$1: _sapphire_shapeshift.ArrayValidator; +declare const integrationTypesPredicate$1: _sapphire_shapeshift.ArrayValidator; + +declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder; +declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate; +declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength; +declare const Assertions$1_validateDescription: typeof validateDescription; +declare const Assertions$1_validateLocale: typeof validateLocale; +declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap; +declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength; +declare const Assertions$1_validateNSFW: typeof validateNSFW; +declare const Assertions$1_validateRequired: typeof validateRequired; +declare namespace Assertions$1 { + export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, contextsPredicate$1 as contextsPredicate, integrationTypesPredicate$1 as integrationTypesPredicate, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters }; +} + +/** + * The type a context menu command can be. + */ +type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User; +/** + * A builder that creates API-compatible JSON data for context menu commands. + */ +declare class ContextMenuCommandBuilder { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The type of this command. + */ + readonly type: ContextMenuCommandType; + /** + * The contexts for this command. + */ + readonly contexts?: InteractionContextType[]; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + /** + * The set of permissions represented as a bit set for the command. + */ + readonly default_member_permissions: Permissions | null | undefined; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link ContextMenuCommandBuilder.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + /** + * The integration types for this command. + */ + readonly integration_types?: ApplicationIntegrationType[]; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts: RestOrArray): this; + /** + * Sets integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes: RestOrArray): this; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name: string): this; + /** + * Sets the type of this command. + * + * @param type - The type to use + */ + setType(type: ContextMenuCommandType): this; + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + setDefaultPermission(value: boolean): this; + /** + * Sets the default permissions a member should have in order to run this command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this; + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead. + */ + setDMPermission(enabled: boolean | null | undefined): this; + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale: LocaleString, localizedName: string | null): this; + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames: LocalizationMap | null): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody; +} + +declare function validateDefaultPermission(value: unknown): asserts value is boolean; +declare function validateName(name: unknown): asserts name is string; +declare function validateType(type: unknown): asserts type is ContextMenuCommandType; +declare function validateRequiredParameters(name: string, type: number): void; +declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined; +declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined; +declare const contextsPredicate: _sapphire_shapeshift.ArrayValidator; +declare const integrationTypesPredicate: _sapphire_shapeshift.ArrayValidator; + +declare const Assertions_contextsPredicate: typeof contextsPredicate; +declare const Assertions_integrationTypesPredicate: typeof integrationTypesPredicate; +declare const Assertions_validateDMPermission: typeof validateDMPermission; +declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions; +declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission; +declare const Assertions_validateName: typeof validateName; +declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters; +declare const Assertions_validateType: typeof validateType; +declare namespace Assertions { + export { Assertions_contextsPredicate as contextsPredicate, Assertions_integrationTypesPredicate as integrationTypesPredicate, Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType }; +} + +/** + * Calculates the length of the embed. + * + * @param data - The embed data to check + */ +declare function embedLength(data: APIEmbed): number; + +/** + * Enables validators. + * + * @returns Whether validation is occurring. + */ +declare function enableValidators(): boolean; +/** + * Disables validators. + * + * @returns Whether validation is occurring. + */ +declare function disableValidators(): boolean; +/** + * Checks whether validation is occurring. + */ +declare function isValidationEnabled(): boolean; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version + * that you are currently using. + * + * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild. + */ +declare const version: string; + +export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version }; diff --git a/node_modules/@discordjs/builders/dist/index.d.ts b/node_modules/@discordjs/builders/dist/index.d.ts new file mode 100644 index 0000000..ac28cd2 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.d.ts @@ -0,0 +1,2043 @@ +import * as _sapphire_shapeshift from '@sapphire/shapeshift'; +import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, Snowflake, APISelectMenuComponent, APIChannelSelectComponent, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, InteractionContextType, Permissions, ApplicationIntegrationType, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10'; +export * from '@discordjs/formatters'; +import { JSONEncodable, Equatable } from '@discordjs/util'; + +declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator; +declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator; +declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator; +declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{ + name: string; + value: string; + inline: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>>; +declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>[], _sapphire_shapeshift.UndefinedToOptional<{ + name: string; + value: string; + inline: boolean | undefined; +}>>; +declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator; +declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void; +declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator; +declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator; +declare const urlPredicate: _sapphire_shapeshift.UnionValidator; +declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{ + name: string | null; + iconURL: string | null | undefined; + url: string | null | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name: string | null; + iconURL: string | null | undefined; + url: string | null | undefined; +}>>; +declare const RGBPredicate: _sapphire_shapeshift.NumberValidator; +declare const colorPredicate: _sapphire_shapeshift.UnionValidator; +declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator; +declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator; +declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{ + text: string | null; + iconURL: string | null | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + text: string | null; + iconURL: string | null | undefined; +}>>; +declare const timestampPredicate: _sapphire_shapeshift.UnionValidator; +declare const titlePredicate: _sapphire_shapeshift.UnionValidator; + +declare const Assertions$5_RGBPredicate: typeof RGBPredicate; +declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate; +declare const Assertions$5_colorPredicate: typeof colorPredicate; +declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate; +declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate; +declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate; +declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate; +declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate; +declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate; +declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate; +declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate; +declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate; +declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate; +declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate; +declare const Assertions$5_timestampPredicate: typeof timestampPredicate; +declare const Assertions$5_titlePredicate: typeof titlePredicate; +declare const Assertions$5_urlPredicate: typeof urlPredicate; +declare const Assertions$5_validateFieldLength: typeof validateFieldLength; +declare namespace Assertions$5 { + export { Assertions$5_RGBPredicate as RGBPredicate, Assertions$5_authorNamePredicate as authorNamePredicate, Assertions$5_colorPredicate as colorPredicate, Assertions$5_descriptionPredicate as descriptionPredicate, Assertions$5_embedAuthorPredicate as embedAuthorPredicate, Assertions$5_embedFieldPredicate as embedFieldPredicate, Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$5_embedFooterPredicate as embedFooterPredicate, Assertions$5_fieldInlinePredicate as fieldInlinePredicate, Assertions$5_fieldLengthPredicate as fieldLengthPredicate, Assertions$5_fieldNamePredicate as fieldNamePredicate, Assertions$5_fieldValuePredicate as fieldValuePredicate, Assertions$5_footerTextPredicate as footerTextPredicate, Assertions$5_imageURLPredicate as imageURLPredicate, Assertions$5_timestampPredicate as timestampPredicate, Assertions$5_titlePredicate as titlePredicate, Assertions$5_urlPredicate as urlPredicate, Assertions$5_validateFieldLength as validateFieldLength }; +} + +/** + * Normalizes data that is a rest parameter or an array into an array with a depth of 1. + * + * @typeParam ItemType - The data that must satisfy {@link RestOrArray}. + * @param arr - The (possibly variadic) data to normalize + */ +declare function normalizeArray(arr: RestOrArray): ItemType[]; +/** + * Represents data that may be an array or came from a rest parameter. + * + * @remarks + * This type is used throughout builders to ensure both an array and variadic arguments + * may be used. It is normalized with {@link normalizeArray}. + */ +type RestOrArray = Type[] | [Type[]]; + +/** + * A tuple satisfying the RGB color model. + * + * @see {@link https://developer.mozilla.org/docs/Glossary/RGB} + */ +type RGBTuple = [red: number, green: number, blue: number]; +/** + * The base icon data typically used in payloads. + */ +interface IconData { + /** + * The URL of the icon. + */ + iconURL?: string; + /** + * The proxy URL of the icon. + */ + proxyIconURL?: string; +} +/** + * Represents the author data of an embed. + */ +interface EmbedAuthorData extends IconData, Omit { +} +/** + * Represents the author options of an embed. + */ +interface EmbedAuthorOptions extends Omit { +} +/** + * Represents the footer data of an embed. + */ +interface EmbedFooterData extends IconData, Omit { +} +/** + * Represents the footer options of an embed. + */ +interface EmbedFooterOptions extends Omit { +} +/** + * Represents the image data of an embed. + */ +interface EmbedImageData extends Omit { + /** + * The proxy URL for the image. + */ + proxyURL?: string; +} +/** + * A builder that creates API-compatible JSON data for embeds. + */ +declare class EmbedBuilder { + /** + * The API data associated with this embed. + */ + readonly data: APIEmbed; + /** + * Creates a new embed from API data. + * + * @param data - The API data to create this embed with + */ + constructor(data?: APIEmbed); + /** + * Appends fields to the embed. + * + * @remarks + * This method accepts either an array of fields or a variable number of field parameters. + * The maximum amount of fields that can be added is 25. + * @example + * Using an array: + * ```ts + * const fields: APIEmbedField[] = ...; + * const embed = new EmbedBuilder() + * .addFields(fields); + * ``` + * @example + * Using rest parameters (variadic): + * ```ts + * const embed = new EmbedBuilder() + * .addFields( + * { name: 'Field 1', value: 'Value 1' }, + * { name: 'Field 2', value: 'Value 2' }, + * ); + * ``` + * @param fields - The fields to add + */ + addFields(...fields: RestOrArray): this; + /** + * Removes, replaces, or inserts fields for this embed. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}. + * The maximum amount of fields that can be added is 25. + * + * It's useful for modifying and adjusting order of the already-existing fields of an embed. + * @example + * Remove the first field: + * ```ts + * embed.spliceFields(0, 1); + * ``` + * @example + * Remove the first n fields: + * ```ts + * const n = 4; + * embed.spliceFields(0, n); + * ``` + * @example + * Remove the last field: + * ```ts + * embed.spliceFields(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of fields to remove + * @param fields - The replacing field objects + */ + spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this; + /** + * Sets the fields for this embed. + * + * @remarks + * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically, + * it splices the entire array of fields, replacing them with the provided fields. + * + * You can set a maximum of 25 fields. + * @param fields - The fields to set + */ + setFields(...fields: RestOrArray): this; + /** + * Sets the author of this embed. + * + * @param options - The options to use + */ + setAuthor(options: EmbedAuthorOptions | null): this; + /** + * Sets the color of this embed. + * + * @param color - The color to use + */ + setColor(color: RGBTuple | number | null): this; + /** + * Sets the description of this embed. + * + * @param description - The description to use + */ + setDescription(description: string | null): this; + /** + * Sets the footer of this embed. + * + * @param options - The footer to use + */ + setFooter(options: EmbedFooterOptions | null): this; + /** + * Sets the image of this embed. + * + * @param url - The image URL to use + */ + setImage(url: string | null): this; + /** + * Sets the thumbnail of this embed. + * + * @param url - The thumbnail URL to use + */ + setThumbnail(url: string | null): this; + /** + * Sets the timestamp of this embed. + * + * @param timestamp - The timestamp or date to use + */ + setTimestamp(timestamp?: Date | number | null): this; + /** + * Sets the title for this embed. + * + * @param title - The title to use + */ + setTitle(title: string | null): this; + /** + * Sets the URL of this embed. + * + * @param url - The URL to use + */ + setURL(url: string | null): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIEmbed; +} + +/** + * A builder that creates API-compatible JSON data for string select menu options. + */ +declare class StringSelectMenuOptionBuilder implements JSONEncodable { + data: Partial; + /** + * Creates a new string select menu option from API data. + * + * @param data - The API data to create this string select menu option with + * @example + * Creating a string select menu option from an API data object: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * label: 'catchy label', + * value: '1', + * }); + * ``` + * @example + * Creating a string select menu option using setters and API data: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * default: true, + * value: '1', + * }) + * .setLabel('woah'); + * ``` + */ + constructor(data?: Partial); + /** + * Sets the label for this option. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * Sets the value for this option. + * + * @param value - The value to use + */ + setValue(value: string): this; + /** + * Sets the description for this option. + * + * @param description - The description to use + */ + setDescription(description: string): this; + /** + * Sets whether this option is selected by default. + * + * @param isDefault - Whether this option is selected by default + */ + setDefault(isDefault?: boolean): this; + /** + * Sets the emoji to display for this option. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji: APIMessageComponentEmoji): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APISelectMenuOption; +} + +declare const customIdValidator: _sapphire_shapeshift.StringValidator; +declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; +}>>; +declare const disabledValidator: _sapphire_shapeshift.BooleanValidator; +declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator; +declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator; +declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator; +declare const minMaxValidator: _sapphire_shapeshift.NumberValidator; +declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator; +declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{ + label: string; + value: string; + description: string | undefined; + emoji: _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; + }> | undefined; + default: boolean | undefined; +}, _sapphire_shapeshift.UndefinedToOptional<{ + label: string; + value: string; + description: string | undefined; + emoji: _sapphire_shapeshift.UndefinedToOptional<{ + name?: string | undefined; + id?: string | undefined; + animated?: boolean | undefined; + }> | undefined; + default: boolean | undefined; +}>>; +declare const optionValidator: _sapphire_shapeshift.InstanceValidator; +declare const optionsValidator: _sapphire_shapeshift.ArrayValidator; +declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator; +declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void; +declare const defaultValidator: _sapphire_shapeshift.BooleanValidator; +declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void; +declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator; +declare const urlValidator: _sapphire_shapeshift.StringValidator; +declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, skuId?: string, url?: string): void; + +declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator; +declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator; +declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator; +declare const Assertions$4_customIdValidator: typeof customIdValidator; +declare const Assertions$4_defaultValidator: typeof defaultValidator; +declare const Assertions$4_disabledValidator: typeof disabledValidator; +declare const Assertions$4_emojiValidator: typeof emojiValidator; +declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator; +declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator; +declare const Assertions$4_minMaxValidator: typeof minMaxValidator; +declare const Assertions$4_optionValidator: typeof optionValidator; +declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator; +declare const Assertions$4_optionsValidator: typeof optionsValidator; +declare const Assertions$4_urlValidator: typeof urlValidator; +declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters; +declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters; +declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters; +declare namespace Assertions$4 { + export { Assertions$4_buttonLabelValidator as buttonLabelValidator, Assertions$4_buttonStyleValidator as buttonStyleValidator, Assertions$4_channelTypesValidator as channelTypesValidator, Assertions$4_customIdValidator as customIdValidator, Assertions$4_defaultValidator as defaultValidator, Assertions$4_disabledValidator as disabledValidator, Assertions$4_emojiValidator as emojiValidator, Assertions$4_jsonOptionValidator as jsonOptionValidator, Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$4_minMaxValidator as minMaxValidator, Assertions$4_optionValidator as optionValidator, Assertions$4_optionsLengthValidator as optionsLengthValidator, Assertions$4_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$4_urlValidator as urlValidator, Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters }; +} + +/** + * Any action row component data represented as an object. + */ +type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes; +/** + * The base component builder that contains common symbols for all sorts of components. + * + * @typeParam DataType - The type of internal API data that is stored within the component + */ +declare abstract class ComponentBuilder> = APIBaseComponent> implements JSONEncodable { + /** + * The API data associated with this component. + */ + readonly data: Partial; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + abstract toJSON(): AnyAPIActionRowComponent; + /** + * Constructs a new kind of component. + * + * @param data - The data to construct a component out of + */ + constructor(data: Partial); +} + +/** + * A builder that creates API-compatible JSON data for buttons. + */ +declare class ButtonBuilder extends ComponentBuilder { + /** + * Creates a new button from API data. + * + * @param data - The API data to create this button with + * @example + * Creating a button from an API data object: + * ```ts + * const button = new ButtonBuilder({ + * custom_id: 'a cool button', + * style: ButtonStyle.Primary, + * label: 'Click Me', + * emoji: { + * name: 'smile', + * id: '123456789012345678', + * }, + * }); + * ``` + * @example + * Creating a button using setters and API data: + * ```ts + * const button = new ButtonBuilder({ + * style: ButtonStyle.Secondary, + * label: 'Click Me', + * }) + * .setEmoji({ name: '🙂' }) + * .setCustomId('another cool button'); + * ``` + */ + constructor(data?: Partial); + /** + * Sets the style of this button. + * + * @param style - The style to use + */ + setStyle(style: ButtonStyle): this; + /** + * Sets the URL for this button. + * + * @remarks + * This method is only available to buttons using the `Link` button style. + * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`. + * @param url - The URL to use + */ + setURL(url: string): this; + /** + * Sets the custom id for this button. + * + * @remarks + * This method is only applicable to buttons that are not using the `Link` button style. + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets the SKU id that represents a purchasable SKU for this button. + * + * @remarks Only available when using premium-style buttons. + * @param skuId - The SKU id to use + */ + setSKUId(skuId: Snowflake): this; + /** + * Sets the emoji to display on this button. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji: APIMessageComponentEmoji): this; + /** + * Sets whether this button is disabled. + * + * @param disabled - Whether to disable this button + */ + setDisabled(disabled?: boolean): this; + /** + * Sets the label for this button. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIButtonComponent; +} + +/** + * The base select menu builder that contains common symbols for select menu builders. + * + * @typeParam SelectMenuType - The type of select menu this would be instantiated for. + */ +declare abstract class BaseSelectMenuBuilder extends ComponentBuilder { + /** + * Sets the placeholder for this select menu. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder: string): this; + /** + * Sets the minimum values that must be selected in the select menu. + * + * @param minValues - The minimum values that must be selected + */ + setMinValues(minValues: number): this; + /** + * Sets the maximum values that must be selected in the select menu. + * + * @param maxValues - The maximum values that must be selected + */ + setMaxValues(maxValues: number): this; + /** + * Sets the custom id for this select menu. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets whether this select menu is disabled. + * + * @param disabled - Whether this select menu is disabled + */ + setDisabled(disabled?: boolean): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): SelectMenuType; +} + +/** + * A builder that creates API-compatible JSON data for channel select menus. + */ +declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement) + * .setMinValues(2); + * ``` + */ + constructor(data?: Partial); + /** + * Adds channel types to this select menu. + * + * @param types - The channel types to use + */ + addChannelTypes(...types: RestOrArray): this; + /** + * Sets channel types for this select menu. + * + * @param types - The channel types to use + */ + setChannelTypes(...types: RestOrArray): this; + /** + * Adds default channels to this auto populated select menu. + * + * @param channels - The channels to add + */ + addDefaultChannels(...channels: RestOrArray): this; + /** + * Sets default channels for this auto populated select menu. + * + * @param channels - The channels to set + */ + setDefaultChannels(...channels: RestOrArray): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APIChannelSelectComponent; +} + +/** + * A builder that creates API-compatible JSON data for mentionable select menus. + */ +declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles: RestOrArray): this; + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users: RestOrArray): this; + /** + * Adds default values to this auto populated select menu. + * + * @param values - The values to add + */ + addDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this; + /** + * Sets default values for this auto populated select menu. + * + * @param values - The values to set + */ + setDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this; +} + +/** + * A builder that creates API-compatible JSON data for role select menus. + */ +declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles: RestOrArray): this; + /** + * Sets default roles for this auto populated select menu. + * + * @param roles - The roles to set + */ + setDefaultRoles(...roles: RestOrArray): this; +} + +/** + * A builder that creates API-compatible JSON data for string select menus. + */ +declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * The options within this select menu. + */ + readonly options: StringSelectMenuOptionBuilder[]; + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * options: [ + * { label: 'option 1', value: '1' }, + * { label: 'option 2', value: '2' }, + * { label: 'option 3', value: '3' }, + * ], + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1) + * .addOptions({ + * label: 'Catchy', + * value: 'catch', + * }); + * ``` + */ + constructor(data?: Partial); + /** + * Adds options to this select menu. + * + * @param options - The options to add + */ + addOptions(...options: RestOrArray): this; + /** + * Sets the options for this select menu. + * + * @param options - The options to set + */ + setOptions(...options: RestOrArray): this; + /** + * Removes, replaces, or inserts options for this select menu. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}. + * It's useful for modifying and adjusting the order of existing options. + * @example + * Remove the first option: + * ```ts + * selectMenu.spliceOptions(0, 1); + * ``` + * @example + * Remove the first n option: + * ```ts + * const n = 4; + * selectMenu.spliceOptions(0, n); + * ``` + * @example + * Remove the last option: + * ```ts + * selectMenu.spliceOptions(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of options to remove + * @param options - The replacing option objects or builders + */ + spliceOptions(index: number, deleteCount: number, ...options: RestOrArray): this; + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON(): APIStringSelectComponent; +} + +/** + * A builder that creates API-compatible JSON data for user select menus. + */ +declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder { + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data?: Partial); + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users: RestOrArray): this; + /** + * Sets default users for this auto populated select menu. + * + * @param users - The users to set + */ + setDefaultUsers(...users: RestOrArray): this; +} + +/** + * A builder that creates API-compatible JSON data for text inputs. + */ +declare class TextInputBuilder extends ComponentBuilder implements Equatable> { + /** + * Creates a new text input from API data. + * + * @param data - The API data to create this text input with + * @example + * Creating a text input from an API data object: + * ```ts + * const textInput = new TextInputBuilder({ + * custom_id: 'a cool text input', + * label: 'Type something', + * style: TextInputStyle.Short, + * }); + * ``` + * @example + * Creating a text input using setters and API data: + * ```ts + * const textInput = new TextInputBuilder({ + * label: 'Type something else', + * }) + * .setCustomId('woah') + * .setStyle(TextInputStyle.Paragraph); + * ``` + */ + constructor(data?: APITextInputComponent & { + type?: ComponentType.TextInput; + }); + /** + * Sets the custom id for this text input. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Sets the label for this text input. + * + * @param label - The label to use + */ + setLabel(label: string): this; + /** + * Sets the style for this text input. + * + * @param style - The style to use + */ + setStyle(style: TextInputStyle): this; + /** + * Sets the minimum length of text for this text input. + * + * @param minLength - The minimum length of text for this text input + */ + setMinLength(minLength: number): this; + /** + * Sets the maximum length of text for this text input. + * + * @param maxLength - The maximum length of text for this text input + */ + setMaxLength(maxLength: number): this; + /** + * Sets the placeholder for this text input. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder: string): this; + /** + * Sets the value for this text input. + * + * @param value - The value to use + */ + setValue(value: string): this; + /** + * Sets whether this text input is required. + * + * @param required - Whether this text input is required + */ + setRequired(required?: boolean): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APITextInputComponent; + /** + * Whether this is equal to another structure. + */ + equals(other: APITextInputComponent | JSONEncodable): boolean; +} + +/** + * The builders that may be used for messages. + */ +type MessageComponentBuilder = ActionRowBuilder | MessageActionRowComponentBuilder; +/** + * The builders that may be used for modals. + */ +type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder; +/** + * The builders that may be used within an action row for messages. + */ +type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder; +/** + * The builders that may be used within an action row for modals. + */ +type ModalActionRowComponentBuilder = TextInputBuilder; +/** + * Any builder. + */ +type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder; +/** + * A builder that creates API-compatible JSON data for action rows. + * + * @typeParam ComponentType - The types of components this action row holds + */ +declare class ActionRowBuilder extends ComponentBuilder> { + /** + * The components within this action row. + */ + readonly components: ComponentType[]; + /** + * Creates a new action row from API data. + * + * @param data - The API data to create this action row with + * @example + * Creating an action row from an API data object: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Type something", + * style: TextInputStyle.Short, + * type: ComponentType.TextInput, + * }, + * ], + * }); + * ``` + * @example + * Creating an action row using setters and API data: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Click me", + * style: ButtonStyle.Primary, + * type: ComponentType.Button, + * }, + * ], + * }) + * .addComponents(button2, button3); + * ``` + */ + constructor({ components, ...data }?: Partial>); + /** + * Adds components to this action row. + * + * @param components - The components to add + */ + addComponents(...components: RestOrArray): this; + /** + * Sets components for this action row. + * + * @param components - The components to set + */ + setComponents(...components: RestOrArray): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIActionRowComponent>; +} + +/** + * Components here are mapped to their respective builder. + */ +interface MappedComponentTypes { + /** + * The action row component type is associated with an {@link ActionRowBuilder}. + */ + [ComponentType.ActionRow]: ActionRowBuilder; + /** + * The button component type is associated with a {@link ButtonBuilder}. + */ + [ComponentType.Button]: ButtonBuilder; + /** + * The string select component type is associated with a {@link StringSelectMenuBuilder}. + */ + [ComponentType.StringSelect]: StringSelectMenuBuilder; + /** + * The text input component type is associated with a {@link TextInputBuilder}. + */ + [ComponentType.TextInput]: TextInputBuilder; + /** + * The user select component type is associated with a {@link UserSelectMenuBuilder}. + */ + [ComponentType.UserSelect]: UserSelectMenuBuilder; + /** + * The role select component type is associated with a {@link RoleSelectMenuBuilder}. + */ + [ComponentType.RoleSelect]: RoleSelectMenuBuilder; + /** + * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}. + */ + [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder; + /** + * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}. + */ + [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder; +} +/** + * Factory for creating components from API data. + * + * @typeParam ComponentType - The type of component to use + * @param data - The API data to transform to a component class + */ +declare function createComponentBuilder(data: (APIModalComponent | APIMessageComponent) & { + type: ComponentType; +}): MappedComponentTypes[ComponentType]; +/** + * Factory for creating components from API data. + * + * @typeParam ComponentBuilder - The type of component to use + * @param data - The API data to transform to a component class + */ +declare function createComponentBuilder(data: ComponentBuilder): ComponentBuilder; + +declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator; +declare const minLengthValidator: _sapphire_shapeshift.NumberValidator; +declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator; +declare const requiredValidator: _sapphire_shapeshift.BooleanValidator; +declare const valueValidator: _sapphire_shapeshift.StringValidator; +declare const placeholderValidator: _sapphire_shapeshift.StringValidator; +declare const labelValidator: _sapphire_shapeshift.StringValidator; +declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void; + +declare const Assertions$3_labelValidator: typeof labelValidator; +declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator; +declare const Assertions$3_minLengthValidator: typeof minLengthValidator; +declare const Assertions$3_placeholderValidator: typeof placeholderValidator; +declare const Assertions$3_requiredValidator: typeof requiredValidator; +declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator; +declare const Assertions$3_valueValidator: typeof valueValidator; +declare namespace Assertions$3 { + export { Assertions$3_labelValidator as labelValidator, Assertions$3_maxLengthValidator as maxLengthValidator, Assertions$3_minLengthValidator as minLengthValidator, Assertions$3_placeholderValidator as placeholderValidator, Assertions$3_requiredValidator as requiredValidator, Assertions$3_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$3_valueValidator as valueValidator }; +} + +/** + * A builder that creates API-compatible JSON data for modals. + */ +declare class ModalBuilder implements JSONEncodable { + /** + * The API data associated with this modal. + */ + readonly data: Partial; + /** + * The components within this modal. + */ + readonly components: ActionRowBuilder[]; + /** + * Creates a new modal from API data. + * + * @param data - The API data to create this modal with + */ + constructor({ components, ...data }?: Partial); + /** + * Sets the title of this modal. + * + * @param title - The title to use + */ + setTitle(title: string): this; + /** + * Sets the custom id of this modal. + * + * @param customId - The custom id to use + */ + setCustomId(customId: string): this; + /** + * Adds components to this modal. + * + * @param components - The components to add + */ + addComponents(...components: RestOrArray | APIActionRowComponent>): this; + /** + * Sets components for this modal. + * + * @param components - The components to set + */ + setComponents(...components: RestOrArray>): this; + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON(): APIModalInteractionResponseCallbackData; +} + +declare const titleValidator: _sapphire_shapeshift.StringValidator; +declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder, ...ActionRowBuilder[]], ActionRowBuilder>; +declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder[]): void; + +declare const Assertions$2_componentsValidator: typeof componentsValidator; +declare const Assertions$2_titleValidator: typeof titleValidator; +declare namespace Assertions$2 { + export { Assertions$2_componentsValidator as componentsValidator, Assertions$2_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters }; +} + +/** + * This mixin holds name and description symbols for slash commands. + */ +declare class SharedNameAndDescription { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The description of this command. + */ + readonly description: string; + /** + * The description localizations of this command. + */ + readonly description_localizations?: LocalizationMap; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name: string): this; + /** + * Sets the description of this command. + * + * @param description - The description to use + */ + setDescription(description: string): this; + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale: LocaleString, localizedName: string | null): this; + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames: LocalizationMap | null): this; + /** + * Sets a description localization for this command. + * + * @param locale - The locale to set + * @param localizedDescription - The localized description for the given locale + */ + setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this; + /** + * Sets the description localizations for this command. + * + * @param localizedDescriptions - The object of localized descriptions to set + */ + setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this; +} + +/** + * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands. + */ +declare class SharedSlashCommand { + readonly name: string; + readonly name_localizations?: LocalizationMap; + readonly description: string; + readonly description_localizations?: LocalizationMap; + readonly options: ToAPIApplicationCommandOptions[]; + readonly contexts?: InteractionContextType[]; + /** + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + readonly default_member_permissions: Permissions | null | undefined; + /** + * @deprecated Use {@link SharedSlashCommand.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + readonly integration_types?: ApplicationIntegrationType[]; + readonly nsfw: boolean | undefined; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts: RestOrArray): this; + /** + * Sets the integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes: RestOrArray): this; + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether or not to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + setDefaultPermission(value: boolean): this; + /** + * Sets the default permissions a member should have in order to run the command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this; + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated + * Use {@link SharedSlashCommand.setContexts} instead. + */ + setDMPermission(enabled: boolean | null | undefined): this; + /** + * Sets whether this command is NSFW. + * + * @param nsfw - Whether this command is NSFW + */ + setNSFW(nsfw?: boolean): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody; +} + +/** + * The base application command option builder that contains common symbols for application command builders. + */ +declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription { + /** + * The type of this option. + */ + abstract readonly type: ApplicationCommandOptionType; + /** + * Whether this option is required. + * + * @defaultValue `false` + */ + readonly required: boolean; + /** + * Sets whether this option is required. + * + * @param required - Whether this option should be required + */ + setRequired(required: boolean): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + abstract toJSON(): APIApplicationCommandBasicOption; + /** + * This method runs required validators on this builder. + */ + protected runRequiredValidations(): void; +} + +/** + * A slash command attachment option. + */ +declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Attachment; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandAttachmentOption; +} + +/** + * A slash command boolean option. + */ +declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Boolean; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandBooleanOption; +} + +/** + * The allowed channel types used for a channel option in a slash command builder. + * + * @privateRemarks This can't be dynamic because const enums are erased at runtime. + * @internal + */ +declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum, ChannelType.GuildMedia]; +/** + * The type of allowed channel types used for a channel option. + */ +type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number]; +/** + * This mixin holds channel type symbols used for options. + */ +declare class ApplicationCommandOptionChannelTypesMixin { + /** + * The channel types of this option. + */ + readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[]; + /** + * Adds channel types to this option. + * + * @param channelTypes - The channel types + */ + addChannelTypes(...channelTypes: RestOrArray): this; +} + +/** + * A slash command channel option. + */ +declare class SlashCommandChannelOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Channel; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandChannelOption; +} +interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin { +} + +/** + * This mixin holds minimum and maximum symbols used for options. + */ +declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The maximum value of this option. + */ + readonly max_value?: number; + /** + * The minimum value of this option. + */ + readonly min_value?: number; + /** + * Sets the maximum number value of this option. + * + * @param max - The maximum value this option can be + */ + abstract setMaxValue(max: number): this; + /** + * Sets the minimum number value of this option. + * + * @param min - The minimum value this option can be + */ + abstract setMinValue(min: number): this; +} + +/** + * This mixin holds choices and autocomplete symbols used for options. + */ +declare class ApplicationCommandOptionWithAutocompleteMixin { + /** + * Whether this option utilizes autocomplete. + */ + readonly autocomplete?: boolean; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + readonly type: ApplicationCommandOptionType; + /** + * Whether this option uses autocomplete. + * + * @param autocomplete - Whether this option should use autocomplete + */ + setAutocomplete(autocomplete: boolean): this; +} + +/** + * This mixin holds choices and autocomplete symbols used for options. + */ +declare class ApplicationCommandOptionWithChoicesMixin { + /** + * The choices of this option. + */ + readonly choices?: APIApplicationCommandOptionChoice[]; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + readonly type: ApplicationCommandOptionType; + /** + * Adds multiple choices to this option. + * + * @param choices - The choices to add + */ + addChoices(...choices: RestOrArray>): this; + /** + * Sets multiple choices for this option. + * + * @param choices - The choices to set + */ + setChoices>(...choices: RestOrArray): this; +} + +/** + * A slash command integer option. + */ +declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Integer; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max: number): this; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandIntegerOption; +} +interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command mentionable option. + */ +declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Mentionable; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandMentionableOption; +} + +/** + * A slash command number option. + */ +declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Number; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max: number): this; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandNumberOption; +} +interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command role option. + */ +declare class SlashCommandRoleOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.Role; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandRoleOption; +} + +/** + * A slash command string option. + */ +declare class SlashCommandStringOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.String; + /** + * The maximum length of this option. + */ + readonly max_length?: number; + /** + * The minimum length of this option. + */ + readonly min_length?: number; + /** + * Sets the maximum length of this string option. + * + * @param max - The maximum length this option can be + */ + setMaxLength(max: number): this; + /** + * Sets the minimum length of this string option. + * + * @param min - The minimum length this option can be + */ + setMinLength(min: number): this; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandStringOption; +} +interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin { +} + +/** + * A slash command user option. + */ +declare class SlashCommandUserOption extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + readonly type: ApplicationCommandOptionType.User; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON(): APIApplicationCommandUserOption; +} + +/** + * This mixin holds symbols that can be shared in slash command options. + * + * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option. + */ +declare class SharedSlashCommandOptions> { + readonly options: ToAPIApplicationCommandOptions[]; + /** + * Adds a boolean option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): TypeAfterAddingOptions; + /** + * Adds a user option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): TypeAfterAddingOptions; + /** + * Adds a channel option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): TypeAfterAddingOptions; + /** + * Adds a role option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): TypeAfterAddingOptions; + /** + * Adds an attachment option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): TypeAfterAddingOptions; + /** + * Adds a mentionable option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): TypeAfterAddingOptions; + /** + * Adds a string option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): TypeAfterAddingOptions; + /** + * Adds an integer option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): TypeAfterAddingOptions; + /** + * Adds a number option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): TypeAfterAddingOptions; + /** + * Where the actual adding magic happens. ✨ + * + * @param input - The input. What else? + * @param Instance - The instance of whatever is being added + * @internal + */ + private _sharedAddOptionMethod; +} + +/** + * Represents a folder for subcommands. + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} + */ +declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions { + /** + * The name of this subcommand group. + */ + readonly name: string; + /** + * The description of this subcommand group. + */ + readonly description: string; + /** + * The subcommands within this subcommand group. + */ + readonly options: SlashCommandSubcommandBuilder[]; + /** + * Adds a new subcommand to this group. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIApplicationCommandSubcommandGroupOption; +} +interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription { +} +/** + * A builder that creates API-compatible JSON data for slash command subcommands. + * + * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups} + */ +declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions { + /** + * The name of this subcommand. + */ + readonly name: string; + /** + * The description of this subcommand. + */ + readonly description: string; + /** + * The options within this subcommand. + */ + readonly options: ApplicationCommandOptionBase[]; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): APIApplicationCommandSubcommandOption; +} +interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { +} + +/** + * This mixin holds symbols that can be shared in slash subcommands. + * + * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group. + */ +declare class SharedSlashCommandSubcommands> { + readonly options: ToAPIApplicationCommandOptions[]; + /** + * Adds a new subcommand group to this command. + * + * @param input - A function that returns a subcommand group builder or an already built builder + */ + addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): TypeAfterAddingSubcommands; + /** + * Adds a new subcommand to this command. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands; +} + +/** + * A builder that creates API-compatible JSON data for slash commands. + */ +declare class SlashCommandBuilder { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The description of this command. + */ + readonly description: string; + /** + * The description localizations of this command. + */ + readonly description_localizations?: LocalizationMap; + /** + * The options of this command. + */ + readonly options: ToAPIApplicationCommandOptions[]; + /** + * The contexts for this command. + */ + readonly contexts?: InteractionContextType[]; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + /** + * The set of permissions represented as a bit set for the command. + */ + readonly default_member_permissions: Permissions | null | undefined; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link SlashCommandBuilder.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + /** + * The integration types for this command. + */ + readonly integration_types?: ApplicationIntegrationType[]; + /** + * Whether this command is NSFW. + */ + readonly nsfw: boolean | undefined; +} +interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, SharedSlashCommand { +} +/** + * An interface specifically for slash command subcommands. + */ +interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand { +} +/** + * An interface specifically for slash command options. + */ +interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommand { +} +/** + * An interface that ensures the `toJSON()` call will return something + * that can be serialized into API-compatible data. + */ +interface ToAPIApplicationCommandOptions { + toJSON(): APIApplicationCommandOption; +} + +declare function validateName$1(name: unknown): asserts name is string; +declare function validateDescription(description: unknown): asserts description is string; +declare function validateLocale(locale: unknown): Locale; +declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[]; +declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void; +declare function validateDefaultPermission$1(value: unknown): asserts value is boolean; +declare function validateRequired(required: unknown): asserts required is boolean; +declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void; +declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType; +declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional>> | null | undefined>; +declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap; +declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined; +declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined; +declare function validateNSFW(value: unknown): asserts value is boolean; +declare const contextsPredicate$1: _sapphire_shapeshift.ArrayValidator; +declare const integrationTypesPredicate$1: _sapphire_shapeshift.ArrayValidator; + +declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder; +declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate; +declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength; +declare const Assertions$1_validateDescription: typeof validateDescription; +declare const Assertions$1_validateLocale: typeof validateLocale; +declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap; +declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength; +declare const Assertions$1_validateNSFW: typeof validateNSFW; +declare const Assertions$1_validateRequired: typeof validateRequired; +declare namespace Assertions$1 { + export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, contextsPredicate$1 as contextsPredicate, integrationTypesPredicate$1 as integrationTypesPredicate, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters }; +} + +/** + * The type a context menu command can be. + */ +type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User; +/** + * A builder that creates API-compatible JSON data for context menu commands. + */ +declare class ContextMenuCommandBuilder { + /** + * The name of this command. + */ + readonly name: string; + /** + * The name localizations of this command. + */ + readonly name_localizations?: LocalizationMap; + /** + * The type of this command. + */ + readonly type: ContextMenuCommandType; + /** + * The contexts for this command. + */ + readonly contexts?: InteractionContextType[]; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + readonly default_permission: boolean | undefined; + /** + * The set of permissions represented as a bit set for the command. + */ + readonly default_member_permissions: Permissions | null | undefined; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link ContextMenuCommandBuilder.contexts} instead. + */ + readonly dm_permission: boolean | undefined; + /** + * The integration types for this command. + */ + readonly integration_types?: ApplicationIntegrationType[]; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts: RestOrArray): this; + /** + * Sets integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes: RestOrArray): this; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name: string): this; + /** + * Sets the type of this command. + * + * @param type - The type to use + */ + setType(type: ContextMenuCommandType): this; + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + setDefaultPermission(value: boolean): this; + /** + * Sets the default permissions a member should have in order to run this command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this; + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead. + */ + setDMPermission(enabled: boolean | null | undefined): this; + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale: LocaleString, localizedName: string | null): this; + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames: LocalizationMap | null): this; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody; +} + +declare function validateDefaultPermission(value: unknown): asserts value is boolean; +declare function validateName(name: unknown): asserts name is string; +declare function validateType(type: unknown): asserts type is ContextMenuCommandType; +declare function validateRequiredParameters(name: string, type: number): void; +declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined; +declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined; +declare const contextsPredicate: _sapphire_shapeshift.ArrayValidator; +declare const integrationTypesPredicate: _sapphire_shapeshift.ArrayValidator; + +declare const Assertions_contextsPredicate: typeof contextsPredicate; +declare const Assertions_integrationTypesPredicate: typeof integrationTypesPredicate; +declare const Assertions_validateDMPermission: typeof validateDMPermission; +declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions; +declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission; +declare const Assertions_validateName: typeof validateName; +declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters; +declare const Assertions_validateType: typeof validateType; +declare namespace Assertions { + export { Assertions_contextsPredicate as contextsPredicate, Assertions_integrationTypesPredicate as integrationTypesPredicate, Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType }; +} + +/** + * Calculates the length of the embed. + * + * @param data - The embed data to check + */ +declare function embedLength(data: APIEmbed): number; + +/** + * Enables validators. + * + * @returns Whether validation is occurring. + */ +declare function enableValidators(): boolean; +/** + * Disables validators. + * + * @returns Whether validation is occurring. + */ +declare function disableValidators(): boolean; +/** + * Checks whether validation is occurring. + */ +declare function isValidationEnabled(): boolean; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version + * that you are currently using. + * + * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild. + */ +declare const version: string; + +export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version }; diff --git a/node_modules/@discordjs/builders/dist/index.js b/node_modules/@discordjs/builders/dist/index.js new file mode 100644 index 0000000..e229e15 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.js @@ -0,0 +1,2916 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __decorateClass = (decorators, target, key, kind) => { + var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; + for (var i = decorators.length - 1, decorator; i >= 0; i--) + if (decorator = decorators[i]) + result = (kind ? decorator(target, key, result) : decorator(result)) || result; + if (kind && result) __defProp(target, key, result); + return result; +}; + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + ActionRowBuilder: () => ActionRowBuilder, + ApplicationCommandNumericOptionMinMaxValueMixin: () => ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionBase: () => ApplicationCommandOptionBase, + ApplicationCommandOptionChannelTypesMixin: () => ApplicationCommandOptionChannelTypesMixin, + ApplicationCommandOptionWithAutocompleteMixin: () => ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin: () => ApplicationCommandOptionWithChoicesMixin, + BaseSelectMenuBuilder: () => BaseSelectMenuBuilder, + ButtonBuilder: () => ButtonBuilder, + ChannelSelectMenuBuilder: () => ChannelSelectMenuBuilder, + ComponentAssertions: () => Assertions_exports2, + ComponentBuilder: () => ComponentBuilder, + ContextMenuCommandAssertions: () => Assertions_exports6, + ContextMenuCommandBuilder: () => ContextMenuCommandBuilder, + EmbedAssertions: () => Assertions_exports, + EmbedBuilder: () => EmbedBuilder, + MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder, + ModalAssertions: () => Assertions_exports4, + ModalBuilder: () => ModalBuilder, + RoleSelectMenuBuilder: () => RoleSelectMenuBuilder, + SelectMenuBuilder: () => StringSelectMenuBuilder, + SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder, + SharedNameAndDescription: () => SharedNameAndDescription, + SharedSlashCommand: () => SharedSlashCommand, + SharedSlashCommandOptions: () => SharedSlashCommandOptions, + SharedSlashCommandSubcommands: () => SharedSlashCommandSubcommands, + SlashCommandAssertions: () => Assertions_exports5, + SlashCommandAttachmentOption: () => SlashCommandAttachmentOption, + SlashCommandBooleanOption: () => SlashCommandBooleanOption, + SlashCommandBuilder: () => SlashCommandBuilder, + SlashCommandChannelOption: () => SlashCommandChannelOption, + SlashCommandIntegerOption: () => SlashCommandIntegerOption, + SlashCommandMentionableOption: () => SlashCommandMentionableOption, + SlashCommandNumberOption: () => SlashCommandNumberOption, + SlashCommandRoleOption: () => SlashCommandRoleOption, + SlashCommandStringOption: () => SlashCommandStringOption, + SlashCommandSubcommandBuilder: () => SlashCommandSubcommandBuilder, + SlashCommandSubcommandGroupBuilder: () => SlashCommandSubcommandGroupBuilder, + SlashCommandUserOption: () => SlashCommandUserOption, + StringSelectMenuBuilder: () => StringSelectMenuBuilder, + StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder, + TextInputAssertions: () => Assertions_exports3, + TextInputBuilder: () => TextInputBuilder, + UserSelectMenuBuilder: () => UserSelectMenuBuilder, + createComponentBuilder: () => createComponentBuilder, + disableValidators: () => disableValidators, + embedLength: () => embedLength, + enableValidators: () => enableValidators, + isValidationEnabled: () => isValidationEnabled, + normalizeArray: () => normalizeArray, + version: () => version +}); +module.exports = __toCommonJS(src_exports); + +// src/messages/embed/Assertions.ts +var Assertions_exports = {}; +__export(Assertions_exports, { + RGBPredicate: () => RGBPredicate, + authorNamePredicate: () => authorNamePredicate, + colorPredicate: () => colorPredicate, + descriptionPredicate: () => descriptionPredicate, + embedAuthorPredicate: () => embedAuthorPredicate, + embedFieldPredicate: () => embedFieldPredicate, + embedFieldsArrayPredicate: () => embedFieldsArrayPredicate, + embedFooterPredicate: () => embedFooterPredicate, + fieldInlinePredicate: () => fieldInlinePredicate, + fieldLengthPredicate: () => fieldLengthPredicate, + fieldNamePredicate: () => fieldNamePredicate, + fieldValuePredicate: () => fieldValuePredicate, + footerTextPredicate: () => footerTextPredicate, + imageURLPredicate: () => imageURLPredicate, + timestampPredicate: () => timestampPredicate, + titlePredicate: () => titlePredicate, + urlPredicate: () => urlPredicate, + validateFieldLength: () => validateFieldLength +}); +var import_shapeshift = require("@sapphire/shapeshift"); + +// src/util/validation.ts +var validate = true; +function enableValidators() { + return validate = true; +} +__name(enableValidators, "enableValidators"); +function disableValidators() { + return validate = false; +} +__name(disableValidators, "disableValidators"); +function isValidationEnabled() { + return validate; +} +__name(isValidationEnabled, "isValidationEnabled"); + +// src/messages/embed/Assertions.ts +var fieldNamePredicate = import_shapeshift.s.string().lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled); +var fieldValuePredicate = import_shapeshift.s.string().lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled); +var fieldInlinePredicate = import_shapeshift.s.boolean().optional(); +var embedFieldPredicate = import_shapeshift.s.object({ + name: fieldNamePredicate, + value: fieldValuePredicate, + inline: fieldInlinePredicate +}).setValidationEnabled(isValidationEnabled); +var embedFieldsArrayPredicate = embedFieldPredicate.array().setValidationEnabled(isValidationEnabled); +var fieldLengthPredicate = import_shapeshift.s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateFieldLength(amountAdding, fields) { + fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding); +} +__name(validateFieldLength, "validateFieldLength"); +var authorNamePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled); +var imageURLPredicate = import_shapeshift.s.string().url({ + allowedProtocols: ["http:", "https:", "attachment:"] +}).nullish().setValidationEnabled(isValidationEnabled); +var urlPredicate = import_shapeshift.s.string().url({ + allowedProtocols: ["http:", "https:"] +}).nullish().setValidationEnabled(isValidationEnabled); +var embedAuthorPredicate = import_shapeshift.s.object({ + name: authorNamePredicate, + iconURL: imageURLPredicate, + url: urlPredicate +}).setValidationEnabled(isValidationEnabled); +var RGBPredicate = import_shapeshift.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled); +var colorPredicate = import_shapeshift.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(16777215).or(import_shapeshift.s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable().setValidationEnabled(isValidationEnabled); +var descriptionPredicate = import_shapeshift.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable().setValidationEnabled(isValidationEnabled); +var footerTextPredicate = import_shapeshift.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable().setValidationEnabled(isValidationEnabled); +var embedFooterPredicate = import_shapeshift.s.object({ + text: footerTextPredicate, + iconURL: imageURLPredicate +}).setValidationEnabled(isValidationEnabled); +var timestampPredicate = import_shapeshift.s.union([import_shapeshift.s.number(), import_shapeshift.s.date()]).nullable().setValidationEnabled(isValidationEnabled); +var titlePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled); + +// src/util/normalizeArray.ts +function normalizeArray(arr) { + if (Array.isArray(arr[0])) return [...arr[0]]; + return arr; +} +__name(normalizeArray, "normalizeArray"); + +// src/messages/embed/Embed.ts +var EmbedBuilder = class { + static { + __name(this, "EmbedBuilder"); + } + /** + * The API data associated with this embed. + */ + data; + /** + * Creates a new embed from API data. + * + * @param data - The API data to create this embed with + */ + constructor(data = {}) { + this.data = { ...data }; + if (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString(); + } + /** + * Appends fields to the embed. + * + * @remarks + * This method accepts either an array of fields or a variable number of field parameters. + * The maximum amount of fields that can be added is 25. + * @example + * Using an array: + * ```ts + * const fields: APIEmbedField[] = ...; + * const embed = new EmbedBuilder() + * .addFields(fields); + * ``` + * @example + * Using rest parameters (variadic): + * ```ts + * const embed = new EmbedBuilder() + * .addFields( + * { name: 'Field 1', value: 'Value 1' }, + * { name: 'Field 2', value: 'Value 2' }, + * ); + * ``` + * @param fields - The fields to add + */ + addFields(...fields) { + const normalizedFields = normalizeArray(fields); + validateFieldLength(normalizedFields.length, this.data.fields); + embedFieldsArrayPredicate.parse(normalizedFields); + if (this.data.fields) this.data.fields.push(...normalizedFields); + else this.data.fields = normalizedFields; + return this; + } + /** + * Removes, replaces, or inserts fields for this embed. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}. + * The maximum amount of fields that can be added is 25. + * + * It's useful for modifying and adjusting order of the already-existing fields of an embed. + * @example + * Remove the first field: + * ```ts + * embed.spliceFields(0, 1); + * ``` + * @example + * Remove the first n fields: + * ```ts + * const n = 4; + * embed.spliceFields(0, n); + * ``` + * @example + * Remove the last field: + * ```ts + * embed.spliceFields(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of fields to remove + * @param fields - The replacing field objects + */ + spliceFields(index, deleteCount, ...fields) { + validateFieldLength(fields.length - deleteCount, this.data.fields); + embedFieldsArrayPredicate.parse(fields); + if (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields); + else this.data.fields = fields; + return this; + } + /** + * Sets the fields for this embed. + * + * @remarks + * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically, + * it splices the entire array of fields, replacing them with the provided fields. + * + * You can set a maximum of 25 fields. + * @param fields - The fields to set + */ + setFields(...fields) { + this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields)); + return this; + } + /** + * Sets the author of this embed. + * + * @param options - The options to use + */ + setAuthor(options) { + if (options === null) { + this.data.author = void 0; + return this; + } + embedAuthorPredicate.parse(options); + this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL }; + return this; + } + /** + * Sets the color of this embed. + * + * @param color - The color to use + */ + setColor(color) { + colorPredicate.parse(color); + if (Array.isArray(color)) { + const [red, green, blue] = color; + this.data.color = (red << 16) + (green << 8) + blue; + return this; + } + this.data.color = color ?? void 0; + return this; + } + /** + * Sets the description of this embed. + * + * @param description - The description to use + */ + setDescription(description) { + descriptionPredicate.parse(description); + this.data.description = description ?? void 0; + return this; + } + /** + * Sets the footer of this embed. + * + * @param options - The footer to use + */ + setFooter(options) { + if (options === null) { + this.data.footer = void 0; + return this; + } + embedFooterPredicate.parse(options); + this.data.footer = { text: options.text, icon_url: options.iconURL }; + return this; + } + /** + * Sets the image of this embed. + * + * @param url - The image URL to use + */ + setImage(url) { + imageURLPredicate.parse(url); + this.data.image = url ? { url } : void 0; + return this; + } + /** + * Sets the thumbnail of this embed. + * + * @param url - The thumbnail URL to use + */ + setThumbnail(url) { + imageURLPredicate.parse(url); + this.data.thumbnail = url ? { url } : void 0; + return this; + } + /** + * Sets the timestamp of this embed. + * + * @param timestamp - The timestamp or date to use + */ + setTimestamp(timestamp = Date.now()) { + timestampPredicate.parse(timestamp); + this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0; + return this; + } + /** + * Sets the title for this embed. + * + * @param title - The title to use + */ + setTitle(title) { + titlePredicate.parse(title); + this.data.title = title ?? void 0; + return this; + } + /** + * Sets the URL of this embed. + * + * @param url - The URL to use + */ + setURL(url) { + urlPredicate.parse(url); + this.data.url = url ?? void 0; + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + return { ...this.data }; + } +}; + +// src/index.ts +__reExport(src_exports, require("@discordjs/formatters"), module.exports); + +// src/components/Assertions.ts +var Assertions_exports2 = {}; +__export(Assertions_exports2, { + buttonLabelValidator: () => buttonLabelValidator, + buttonStyleValidator: () => buttonStyleValidator, + channelTypesValidator: () => channelTypesValidator, + customIdValidator: () => customIdValidator, + defaultValidator: () => defaultValidator, + disabledValidator: () => disabledValidator, + emojiValidator: () => emojiValidator, + jsonOptionValidator: () => jsonOptionValidator, + labelValueDescriptionValidator: () => labelValueDescriptionValidator, + minMaxValidator: () => minMaxValidator, + optionValidator: () => optionValidator, + optionsLengthValidator: () => optionsLengthValidator, + optionsValidator: () => optionsValidator, + placeholderValidator: () => placeholderValidator, + urlValidator: () => urlValidator, + validateRequiredButtonParameters: () => validateRequiredButtonParameters, + validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters, + validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters +}); +var import_shapeshift2 = require("@sapphire/shapeshift"); +var import_v10 = require("discord-api-types/v10"); + +// src/components/selectMenu/StringSelectMenuOption.ts +var StringSelectMenuOptionBuilder = class { + /** + * Creates a new string select menu option from API data. + * + * @param data - The API data to create this string select menu option with + * @example + * Creating a string select menu option from an API data object: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * label: 'catchy label', + * value: '1', + * }); + * ``` + * @example + * Creating a string select menu option using setters and API data: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * default: true, + * value: '1', + * }) + * .setLabel('woah'); + * ``` + */ + constructor(data = {}) { + this.data = data; + } + static { + __name(this, "StringSelectMenuOptionBuilder"); + } + /** + * Sets the label for this option. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = labelValueDescriptionValidator.parse(label); + return this; + } + /** + * Sets the value for this option. + * + * @param value - The value to use + */ + setValue(value) { + this.data.value = labelValueDescriptionValidator.parse(value); + return this; + } + /** + * Sets the description for this option. + * + * @param description - The description to use + */ + setDescription(description) { + this.data.description = labelValueDescriptionValidator.parse(description); + return this; + } + /** + * Sets whether this option is selected by default. + * + * @param isDefault - Whether this option is selected by default + */ + setDefault(isDefault = true) { + this.data.default = defaultValidator.parse(isDefault); + return this; + } + /** + * Sets the emoji to display for this option. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji) { + this.data.emoji = emojiValidator.parse(emoji); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value); + return { + ...this.data + }; + } +}; + +// src/components/Assertions.ts +var customIdValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var emojiValidator = import_shapeshift2.s.object({ + id: import_shapeshift2.s.string(), + name: import_shapeshift2.s.string(), + animated: import_shapeshift2.s.boolean() +}).partial().strict().setValidationEnabled(isValidationEnabled); +var disabledValidator = import_shapeshift2.s.boolean(); +var buttonLabelValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled); +var buttonStyleValidator = import_shapeshift2.s.nativeEnum(import_v10.ButtonStyle); +var placeholderValidator = import_shapeshift2.s.string().lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled); +var minMaxValidator = import_shapeshift2.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +var labelValueDescriptionValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var jsonOptionValidator = import_shapeshift2.s.object({ + label: labelValueDescriptionValidator, + value: labelValueDescriptionValidator, + description: labelValueDescriptionValidator.optional(), + emoji: emojiValidator.optional(), + default: import_shapeshift2.s.boolean().optional() +}).setValidationEnabled(isValidationEnabled); +var optionValidator = import_shapeshift2.s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled); +var optionsValidator = optionValidator.array().lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled); +var optionsLengthValidator = import_shapeshift2.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateRequiredSelectMenuParameters(options, customId) { + customIdValidator.parse(customId); + optionsValidator.parse(options); +} +__name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters"); +var defaultValidator = import_shapeshift2.s.boolean(); +function validateRequiredSelectMenuOptionParameters(label, value) { + labelValueDescriptionValidator.parse(label); + labelValueDescriptionValidator.parse(value); +} +__name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters"); +var channelTypesValidator = import_shapeshift2.s.nativeEnum(import_v10.ChannelType).array().setValidationEnabled(isValidationEnabled); +var urlValidator = import_shapeshift2.s.string().url({ + allowedProtocols: ["http:", "https:", "discord:"] +}).setValidationEnabled(isValidationEnabled); +function validateRequiredButtonParameters(style, label, emoji, customId, skuId, url) { + if (style === import_v10.ButtonStyle.Premium) { + if (!skuId) { + throw new RangeError("Premium buttons must have an SKU id."); + } + if (customId || label || url || emoji) { + throw new RangeError("Premium buttons cannot have a custom id, label, URL, or emoji."); + } + } else { + if (skuId) { + throw new RangeError("Non-premium buttons must not have an SKU id."); + } + if (url && customId) { + throw new RangeError("URL and custom id are mutually exclusive."); + } + if (!label && !emoji) { + throw new RangeError("Non-premium buttons must have a label and/or an emoji."); + } + if (style === import_v10.ButtonStyle.Link) { + if (!url) { + throw new RangeError("Link buttons must have a URL."); + } + } else if (url) { + throw new RangeError("Non-premium and non-link buttons cannot have a URL."); + } + } +} +__name(validateRequiredButtonParameters, "validateRequiredButtonParameters"); + +// src/components/ActionRow.ts +var import_v1011 = require("discord-api-types/v10"); + +// src/components/Component.ts +var ComponentBuilder = class { + static { + __name(this, "ComponentBuilder"); + } + /** + * The API data associated with this component. + */ + data; + /** + * Constructs a new kind of component. + * + * @param data - The data to construct a component out of + */ + constructor(data) { + this.data = data; + } +}; + +// src/components/Components.ts +var import_v1010 = require("discord-api-types/v10"); + +// src/components/button/Button.ts +var import_v102 = require("discord-api-types/v10"); +var ButtonBuilder = class extends ComponentBuilder { + static { + __name(this, "ButtonBuilder"); + } + /** + * Creates a new button from API data. + * + * @param data - The API data to create this button with + * @example + * Creating a button from an API data object: + * ```ts + * const button = new ButtonBuilder({ + * custom_id: 'a cool button', + * style: ButtonStyle.Primary, + * label: 'Click Me', + * emoji: { + * name: 'smile', + * id: '123456789012345678', + * }, + * }); + * ``` + * @example + * Creating a button using setters and API data: + * ```ts + * const button = new ButtonBuilder({ + * style: ButtonStyle.Secondary, + * label: 'Click Me', + * }) + * .setEmoji({ name: '🙂' }) + * .setCustomId('another cool button'); + * ``` + */ + constructor(data) { + super({ type: import_v102.ComponentType.Button, ...data }); + } + /** + * Sets the style of this button. + * + * @param style - The style to use + */ + setStyle(style) { + this.data.style = buttonStyleValidator.parse(style); + return this; + } + /** + * Sets the URL for this button. + * + * @remarks + * This method is only available to buttons using the `Link` button style. + * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`. + * @param url - The URL to use + */ + setURL(url) { + this.data.url = urlValidator.parse(url); + return this; + } + /** + * Sets the custom id for this button. + * + * @remarks + * This method is only applicable to buttons that are not using the `Link` button style. + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets the SKU id that represents a purchasable SKU for this button. + * + * @remarks Only available when using premium-style buttons. + * @param skuId - The SKU id to use + */ + setSKUId(skuId) { + this.data.sku_id = skuId; + return this; + } + /** + * Sets the emoji to display on this button. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji) { + this.data.emoji = emojiValidator.parse(emoji); + return this; + } + /** + * Sets whether this button is disabled. + * + * @param disabled - Whether to disable this button + */ + setDisabled(disabled = true) { + this.data.disabled = disabledValidator.parse(disabled); + return this; + } + /** + * Sets the label for this button. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = buttonLabelValidator.parse(label); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredButtonParameters( + this.data.style, + this.data.label, + this.data.emoji, + this.data.custom_id, + this.data.sku_id, + this.data.url + ); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/ChannelSelectMenu.ts +var import_v103 = require("discord-api-types/v10"); + +// src/components/selectMenu/BaseSelectMenu.ts +var BaseSelectMenuBuilder = class extends ComponentBuilder { + static { + __name(this, "BaseSelectMenuBuilder"); + } + /** + * Sets the placeholder for this select menu. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder) { + this.data.placeholder = placeholderValidator.parse(placeholder); + return this; + } + /** + * Sets the minimum values that must be selected in the select menu. + * + * @param minValues - The minimum values that must be selected + */ + setMinValues(minValues) { + this.data.min_values = minMaxValidator.parse(minValues); + return this; + } + /** + * Sets the maximum values that must be selected in the select menu. + * + * @param maxValues - The maximum values that must be selected + */ + setMaxValues(maxValues) { + this.data.max_values = minMaxValidator.parse(maxValues); + return this; + } + /** + * Sets the custom id for this select menu. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets whether this select menu is disabled. + * + * @param disabled - Whether this select menu is disabled + */ + setDisabled(disabled = true) { + this.data.disabled = disabledValidator.parse(disabled); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + customIdValidator.parse(this.data.custom_id); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/ChannelSelectMenu.ts +var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "ChannelSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement) + * .setMinValues(2); + * ``` + */ + constructor(data) { + super({ ...data, type: import_v103.ComponentType.ChannelSelect }); + } + /** + * Adds channel types to this select menu. + * + * @param types - The channel types to use + */ + addChannelTypes(...types) { + const normalizedTypes = normalizeArray(types); + this.data.channel_types ??= []; + this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes)); + return this; + } + /** + * Sets channel types for this select menu. + * + * @param types - The channel types to use + */ + setChannelTypes(...types) { + const normalizedTypes = normalizeArray(types); + this.data.channel_types ??= []; + this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes)); + return this; + } + /** + * Adds default channels to this auto populated select menu. + * + * @param channels - The channels to add + */ + addDefaultChannels(...channels) { + const normalizedValues = normalizeArray(channels); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: import_v103.SelectMenuDefaultValueType.Channel + })) + ); + return this; + } + /** + * Sets default channels for this auto populated select menu. + * + * @param channels - The channels to set + */ + setDefaultChannels(...channels) { + const normalizedValues = normalizeArray(channels); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: import_v103.SelectMenuDefaultValueType.Channel + })); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + customIdValidator.parse(this.data.custom_id); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/MentionableSelectMenu.ts +var import_v104 = require("discord-api-types/v10"); +var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "MentionableSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: import_v104.ComponentType.MentionableSelect }); + } + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: import_v104.SelectMenuDefaultValueType.Role + })) + ); + return this; + } + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: import_v104.SelectMenuDefaultValueType.User + })) + ); + return this; + } + /** + * Adds default values to this auto populated select menu. + * + * @param values - The values to add + */ + addDefaultValues(...values) { + const normalizedValues = normalizeArray(values); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push(...normalizedValues); + return this; + } + /** + * Sets default values for this auto populated select menu. + * + * @param values - The values to set + */ + setDefaultValues(...values) { + const normalizedValues = normalizeArray(values); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues; + return this; + } +}; + +// src/components/selectMenu/RoleSelectMenu.ts +var import_v105 = require("discord-api-types/v10"); +var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "RoleSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: import_v105.ComponentType.RoleSelect }); + } + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: import_v105.SelectMenuDefaultValueType.Role + })) + ); + return this; + } + /** + * Sets default roles for this auto populated select menu. + * + * @param roles - The roles to set + */ + setDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: import_v105.SelectMenuDefaultValueType.Role + })); + return this; + } +}; + +// src/components/selectMenu/StringSelectMenu.ts +var import_v106 = require("discord-api-types/v10"); +var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "StringSelectMenuBuilder"); + } + /** + * The options within this select menu. + */ + options; + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * options: [ + * { label: 'option 1', value: '1' }, + * { label: 'option 2', value: '2' }, + * { label: 'option 3', value: '3' }, + * ], + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1) + * .addOptions({ + * label: 'Catchy', + * value: 'catch', + * }); + * ``` + */ + constructor(data) { + const { options, ...initData } = data ?? {}; + super({ ...initData, type: import_v106.ComponentType.StringSelect }); + this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? []; + } + /** + * Adds options to this select menu. + * + * @param options - The options to add + */ + addOptions(...options) { + const normalizedOptions = normalizeArray(options); + optionsLengthValidator.parse(this.options.length + normalizedOptions.length); + this.options.push( + ...normalizedOptions.map( + (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)) + ) + ); + return this; + } + /** + * Sets the options for this select menu. + * + * @param options - The options to set + */ + setOptions(...options) { + return this.spliceOptions(0, this.options.length, ...options); + } + /** + * Removes, replaces, or inserts options for this select menu. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}. + * It's useful for modifying and adjusting the order of existing options. + * @example + * Remove the first option: + * ```ts + * selectMenu.spliceOptions(0, 1); + * ``` + * @example + * Remove the first n option: + * ```ts + * const n = 4; + * selectMenu.spliceOptions(0, n); + * ``` + * @example + * Remove the last option: + * ```ts + * selectMenu.spliceOptions(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of options to remove + * @param options - The replacing option objects or builders + */ + spliceOptions(index, deleteCount, ...options) { + const normalizedOptions = normalizeArray(options); + const clone = [...this.options]; + clone.splice( + index, + deleteCount, + ...normalizedOptions.map( + (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)) + ) + ); + optionsLengthValidator.parse(clone.length); + this.options.splice(0, this.options.length, ...clone); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + validateRequiredSelectMenuParameters(this.options, this.data.custom_id); + return { + ...this.data, + options: this.options.map((option) => option.toJSON()) + }; + } +}; + +// src/components/selectMenu/UserSelectMenu.ts +var import_v107 = require("discord-api-types/v10"); +var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "UserSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: import_v107.ComponentType.UserSelect }); + } + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: import_v107.SelectMenuDefaultValueType.User + })) + ); + return this; + } + /** + * Sets default users for this auto populated select menu. + * + * @param users - The users to set + */ + setDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: import_v107.SelectMenuDefaultValueType.User + })); + return this; + } +}; + +// src/components/textInput/TextInput.ts +var import_util = require("@discordjs/util"); +var import_v109 = require("discord-api-types/v10"); +var import_fast_deep_equal = __toESM(require("fast-deep-equal")); + +// src/components/textInput/Assertions.ts +var Assertions_exports3 = {}; +__export(Assertions_exports3, { + labelValidator: () => labelValidator, + maxLengthValidator: () => maxLengthValidator, + minLengthValidator: () => minLengthValidator, + placeholderValidator: () => placeholderValidator2, + requiredValidator: () => requiredValidator, + textInputStyleValidator: () => textInputStyleValidator, + validateRequiredParameters: () => validateRequiredParameters, + valueValidator: () => valueValidator +}); +var import_shapeshift3 = require("@sapphire/shapeshift"); +var import_v108 = require("discord-api-types/v10"); +var textInputStyleValidator = import_shapeshift3.s.nativeEnum(import_v108.TextInputStyle); +var minLengthValidator = import_shapeshift3.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var maxLengthValidator = import_shapeshift3.s.number().int().greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var requiredValidator = import_shapeshift3.s.boolean(); +var valueValidator = import_shapeshift3.s.string().lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var placeholderValidator2 = import_shapeshift3.s.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var labelValidator = import_shapeshift3.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled); +function validateRequiredParameters(customId, style, label) { + customIdValidator.parse(customId); + textInputStyleValidator.parse(style); + labelValidator.parse(label); +} +__name(validateRequiredParameters, "validateRequiredParameters"); + +// src/components/textInput/TextInput.ts +var TextInputBuilder = class extends ComponentBuilder { + static { + __name(this, "TextInputBuilder"); + } + /** + * Creates a new text input from API data. + * + * @param data - The API data to create this text input with + * @example + * Creating a text input from an API data object: + * ```ts + * const textInput = new TextInputBuilder({ + * custom_id: 'a cool text input', + * label: 'Type something', + * style: TextInputStyle.Short, + * }); + * ``` + * @example + * Creating a text input using setters and API data: + * ```ts + * const textInput = new TextInputBuilder({ + * label: 'Type something else', + * }) + * .setCustomId('woah') + * .setStyle(TextInputStyle.Paragraph); + * ``` + */ + constructor(data) { + super({ type: import_v109.ComponentType.TextInput, ...data }); + } + /** + * Sets the custom id for this text input. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets the label for this text input. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = labelValidator.parse(label); + return this; + } + /** + * Sets the style for this text input. + * + * @param style - The style to use + */ + setStyle(style) { + this.data.style = textInputStyleValidator.parse(style); + return this; + } + /** + * Sets the minimum length of text for this text input. + * + * @param minLength - The minimum length of text for this text input + */ + setMinLength(minLength) { + this.data.min_length = minLengthValidator.parse(minLength); + return this; + } + /** + * Sets the maximum length of text for this text input. + * + * @param maxLength - The maximum length of text for this text input + */ + setMaxLength(maxLength) { + this.data.max_length = maxLengthValidator.parse(maxLength); + return this; + } + /** + * Sets the placeholder for this text input. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder) { + this.data.placeholder = placeholderValidator2.parse(placeholder); + return this; + } + /** + * Sets the value for this text input. + * + * @param value - The value to use + */ + setValue(value) { + this.data.value = valueValidator.parse(value); + return this; + } + /** + * Sets whether this text input is required. + * + * @param required - Whether this text input is required + */ + setRequired(required = true) { + this.data.required = requiredValidator.parse(required); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredParameters(this.data.custom_id, this.data.style, this.data.label); + return { + ...this.data + }; + } + /** + * Whether this is equal to another structure. + */ + equals(other) { + if ((0, import_util.isJSONEncodable)(other)) { + return (0, import_fast_deep_equal.default)(other.toJSON(), this.data); + } + return (0, import_fast_deep_equal.default)(other, this.data); + } +}; + +// src/components/Components.ts +function createComponentBuilder(data) { + if (data instanceof ComponentBuilder) { + return data; + } + switch (data.type) { + case import_v1010.ComponentType.ActionRow: + return new ActionRowBuilder(data); + case import_v1010.ComponentType.Button: + return new ButtonBuilder(data); + case import_v1010.ComponentType.StringSelect: + return new StringSelectMenuBuilder(data); + case import_v1010.ComponentType.TextInput: + return new TextInputBuilder(data); + case import_v1010.ComponentType.UserSelect: + return new UserSelectMenuBuilder(data); + case import_v1010.ComponentType.RoleSelect: + return new RoleSelectMenuBuilder(data); + case import_v1010.ComponentType.MentionableSelect: + return new MentionableSelectMenuBuilder(data); + case import_v1010.ComponentType.ChannelSelect: + return new ChannelSelectMenuBuilder(data); + default: + throw new Error(`Cannot properly serialize component type: ${data.type}`); + } +} +__name(createComponentBuilder, "createComponentBuilder"); + +// src/components/ActionRow.ts +var ActionRowBuilder = class extends ComponentBuilder { + static { + __name(this, "ActionRowBuilder"); + } + /** + * The components within this action row. + */ + components; + /** + * Creates a new action row from API data. + * + * @param data - The API data to create this action row with + * @example + * Creating an action row from an API data object: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Type something", + * style: TextInputStyle.Short, + * type: ComponentType.TextInput, + * }, + * ], + * }); + * ``` + * @example + * Creating an action row using setters and API data: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Click me", + * style: ButtonStyle.Primary, + * type: ComponentType.Button, + * }, + * ], + * }) + * .addComponents(button2, button3); + * ``` + */ + constructor({ components, ...data } = {}) { + super({ type: import_v1011.ComponentType.ActionRow, ...data }); + this.components = components?.map((component) => createComponentBuilder(component)) ?? []; + } + /** + * Adds components to this action row. + * + * @param components - The components to add + */ + addComponents(...components) { + this.components.push(...normalizeArray(components)); + return this; + } + /** + * Sets components for this action row. + * + * @param components - The components to set + */ + setComponents(...components) { + this.components.splice(0, this.components.length, ...normalizeArray(components)); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + return { + ...this.data, + components: this.components.map((component) => component.toJSON()) + }; + } +}; + +// src/interactions/modals/Assertions.ts +var Assertions_exports4 = {}; +__export(Assertions_exports4, { + componentsValidator: () => componentsValidator, + titleValidator: () => titleValidator, + validateRequiredParameters: () => validateRequiredParameters2 +}); +var import_shapeshift4 = require("@sapphire/shapeshift"); +var titleValidator = import_shapeshift4.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled); +var componentsValidator = import_shapeshift4.s.instance(ActionRowBuilder).array().lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled); +function validateRequiredParameters2(customId, title, components) { + customIdValidator.parse(customId); + titleValidator.parse(title); + componentsValidator.parse(components); +} +__name(validateRequiredParameters2, "validateRequiredParameters"); + +// src/interactions/modals/Modal.ts +var ModalBuilder = class { + static { + __name(this, "ModalBuilder"); + } + /** + * The API data associated with this modal. + */ + data; + /** + * The components within this modal. + */ + components = []; + /** + * Creates a new modal from API data. + * + * @param data - The API data to create this modal with + */ + constructor({ components, ...data } = {}) { + this.data = { ...data }; + this.components = components?.map((component) => createComponentBuilder(component)) ?? []; + } + /** + * Sets the title of this modal. + * + * @param title - The title to use + */ + setTitle(title) { + this.data.title = titleValidator.parse(title); + return this; + } + /** + * Sets the custom id of this modal. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Adds components to this modal. + * + * @param components - The components to add + */ + addComponents(...components) { + this.components.push( + ...normalizeArray(components).map( + (component) => component instanceof ActionRowBuilder ? component : new ActionRowBuilder(component) + ) + ); + return this; + } + /** + * Sets components for this modal. + * + * @param components - The components to set + */ + setComponents(...components) { + this.components.splice(0, this.components.length, ...normalizeArray(components)); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredParameters2(this.data.custom_id, this.data.title, this.components); + return { + ...this.data, + components: this.components.map((component) => component.toJSON()) + }; + } +}; + +// src/interactions/slashCommands/Assertions.ts +var Assertions_exports5 = {}; +__export(Assertions_exports5, { + assertReturnOfBuilder: () => assertReturnOfBuilder, + contextsPredicate: () => contextsPredicate, + integrationTypesPredicate: () => integrationTypesPredicate, + localizationMapPredicate: () => localizationMapPredicate, + validateChoicesLength: () => validateChoicesLength, + validateDMPermission: () => validateDMPermission, + validateDefaultMemberPermissions: () => validateDefaultMemberPermissions, + validateDefaultPermission: () => validateDefaultPermission, + validateDescription: () => validateDescription, + validateLocale: () => validateLocale, + validateLocalizationMap: () => validateLocalizationMap, + validateMaxOptionsLength: () => validateMaxOptionsLength, + validateNSFW: () => validateNSFW, + validateName: () => validateName, + validateRequired: () => validateRequired, + validateRequiredParameters: () => validateRequiredParameters3 +}); +var import_shapeshift5 = require("@sapphire/shapeshift"); +var import_v1012 = require("discord-api-types/v10"); +var namePredicate = import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled); +function validateName(name) { + namePredicate.parse(name); +} +__name(validateName, "validateName"); +var descriptionPredicate2 = import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var localePredicate = import_shapeshift5.s.nativeEnum(import_v1012.Locale); +function validateDescription(description) { + descriptionPredicate2.parse(description); +} +__name(validateDescription, "validateDescription"); +var maxArrayLengthPredicate = import_shapeshift5.s.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateLocale(locale) { + return localePredicate.parse(locale); +} +__name(validateLocale, "validateLocale"); +function validateMaxOptionsLength(options) { + maxArrayLengthPredicate.parse(options); +} +__name(validateMaxOptionsLength, "validateMaxOptionsLength"); +function validateRequiredParameters3(name, description, options) { + validateName(name); + validateDescription(description); + validateMaxOptionsLength(options); +} +__name(validateRequiredParameters3, "validateRequiredParameters"); +var booleanPredicate = import_shapeshift5.s.boolean(); +function validateDefaultPermission(value) { + booleanPredicate.parse(value); +} +__name(validateDefaultPermission, "validateDefaultPermission"); +function validateRequired(required) { + booleanPredicate.parse(required); +} +__name(validateRequired, "validateRequired"); +var choicesLengthPredicate = import_shapeshift5.s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateChoicesLength(amountAdding, choices) { + choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding); +} +__name(validateChoicesLength, "validateChoicesLength"); +function assertReturnOfBuilder(input, ExpectedInstanceOf) { + import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input); +} +__name(assertReturnOfBuilder, "assertReturnOfBuilder"); +var localizationMapPredicate = import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v1012.Locale).map((locale) => [locale, import_shapeshift5.s.string().nullish()]))).strict().nullish().setValidationEnabled(isValidationEnabled); +function validateLocalizationMap(value) { + localizationMapPredicate.parse(value); +} +__name(validateLocalizationMap, "validateLocalizationMap"); +var dmPermissionPredicate = import_shapeshift5.s.boolean().nullish(); +function validateDMPermission(value) { + dmPermissionPredicate.parse(value); +} +__name(validateDMPermission, "validateDMPermission"); +var memberPermissionPredicate = import_shapeshift5.s.union([ + import_shapeshift5.s.bigint().transform((value) => value.toString()), + import_shapeshift5.s.number().safeInt().transform((value) => value.toString()), + import_shapeshift5.s.string().regex(/^\d+$/) +]).nullish(); +function validateDefaultMemberPermissions(permissions) { + return memberPermissionPredicate.parse(permissions); +} +__name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions"); +function validateNSFW(value) { + booleanPredicate.parse(value); +} +__name(validateNSFW, "validateNSFW"); +var contextsPredicate = import_shapeshift5.s.array( + import_shapeshift5.s.nativeEnum(import_v1012.InteractionContextType).setValidationEnabled(isValidationEnabled) +); +var integrationTypesPredicate = import_shapeshift5.s.array( + import_shapeshift5.s.nativeEnum(import_v1012.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled) +); + +// src/interactions/slashCommands/SlashCommandBuilder.ts +var import_ts_mixer6 = require("ts-mixer"); + +// src/interactions/slashCommands/mixins/NameAndDescription.ts +var SharedNameAndDescription = class { + static { + __name(this, "SharedNameAndDescription"); + } + /** + * The name of this command. + */ + name; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The description of this command. + */ + description; + /** + * The description localizations of this command. + */ + description_localizations; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name) { + validateName(name); + Reflect.set(this, "name", name); + return this; + } + /** + * Sets the description of this command. + * + * @param description - The description to use + */ + setDescription(description) { + validateDescription(description); + Reflect.set(this, "description", description); + return this; + } + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale, localizedName) { + if (!this.name_localizations) { + Reflect.set(this, "name_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedName === null) { + this.name_localizations[parsedLocale] = null; + return this; + } + validateName(localizedName); + this.name_localizations[parsedLocale] = localizedName; + return this; + } + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames) { + if (localizedNames === null) { + Reflect.set(this, "name_localizations", null); + return this; + } + Reflect.set(this, "name_localizations", {}); + for (const args of Object.entries(localizedNames)) { + this.setNameLocalization(...args); + } + return this; + } + /** + * Sets a description localization for this command. + * + * @param locale - The locale to set + * @param localizedDescription - The localized description for the given locale + */ + setDescriptionLocalization(locale, localizedDescription) { + if (!this.description_localizations) { + Reflect.set(this, "description_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedDescription === null) { + this.description_localizations[parsedLocale] = null; + return this; + } + validateDescription(localizedDescription); + this.description_localizations[parsedLocale] = localizedDescription; + return this; + } + /** + * Sets the description localizations for this command. + * + * @param localizedDescriptions - The object of localized descriptions to set + */ + setDescriptionLocalizations(localizedDescriptions) { + if (localizedDescriptions === null) { + Reflect.set(this, "description_localizations", null); + return this; + } + Reflect.set(this, "description_localizations", {}); + for (const args of Object.entries(localizedDescriptions)) { + this.setDescriptionLocalization(...args); + } + return this; + } +}; + +// src/interactions/slashCommands/mixins/SharedSlashCommand.ts +var import_v1013 = require("discord-api-types/v10"); +var SharedSlashCommand = class { + static { + __name(this, "SharedSlashCommand"); + } + name = void 0; + name_localizations; + description = void 0; + description_localizations; + options = []; + contexts; + /** + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + default_permission = void 0; + default_member_permissions = void 0; + /** + * @deprecated Use {@link SharedSlashCommand.contexts} instead. + */ + dm_permission = void 0; + integration_types; + nsfw = void 0; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts) { + Reflect.set(this, "contexts", contextsPredicate.parse(normalizeArray(contexts))); + return this; + } + /** + * Sets the integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes) { + Reflect.set(this, "integration_types", integrationTypesPredicate.parse(normalizeArray(integrationTypes))); + return this; + } + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether or not to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + setDefaultPermission(value) { + validateDefaultPermission(value); + Reflect.set(this, "default_permission", value); + return this; + } + /** + * Sets the default permissions a member should have in order to run the command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions) { + const permissionValue = validateDefaultMemberPermissions(permissions); + Reflect.set(this, "default_member_permissions", permissionValue); + return this; + } + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated + * Use {@link SharedSlashCommand.setContexts} instead. + */ + setDMPermission(enabled) { + validateDMPermission(enabled); + Reflect.set(this, "dm_permission", enabled); + return this; + } + /** + * Sets whether this command is NSFW. + * + * @param nsfw - Whether this command is NSFW + */ + setNSFW(nsfw = true) { + validateNSFW(nsfw); + Reflect.set(this, "nsfw", nsfw); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + validateLocalizationMap(this.name_localizations); + validateLocalizationMap(this.description_localizations); + return { + ...this, + type: import_v1013.ApplicationCommandType.ChatInput, + options: this.options.map((option) => option.toJSON()) + }; + } +}; + +// src/interactions/slashCommands/options/attachment.ts +var import_v1014 = require("discord-api-types/v10"); + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts +var ApplicationCommandOptionBase = class extends SharedNameAndDescription { + static { + __name(this, "ApplicationCommandOptionBase"); + } + /** + * Whether this option is required. + * + * @defaultValue `false` + */ + required = false; + /** + * Sets whether this option is required. + * + * @param required - Whether this option should be required + */ + setRequired(required) { + validateRequired(required); + Reflect.set(this, "required", required); + return this; + } + /** + * This method runs required validators on this builder. + */ + runRequiredValidations() { + validateRequiredParameters3(this.name, this.description, []); + validateLocalizationMap(this.name_localizations); + validateLocalizationMap(this.description_localizations); + validateRequired(this.required); + } +}; + +// src/interactions/slashCommands/options/attachment.ts +var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandAttachmentOption"); + } + /** + * The type of this option. + */ + type = import_v1014.ApplicationCommandOptionType.Attachment; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/boolean.ts +var import_v1015 = require("discord-api-types/v10"); +var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandBooleanOption"); + } + /** + * The type of this option. + */ + type = import_v1015.ApplicationCommandOptionType.Boolean; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/channel.ts +var import_v1017 = require("discord-api-types/v10"); +var import_ts_mixer = require("ts-mixer"); + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts +var import_shapeshift6 = require("@sapphire/shapeshift"); +var import_v1016 = require("discord-api-types/v10"); +var allowedChannelTypes = [ + import_v1016.ChannelType.GuildText, + import_v1016.ChannelType.GuildVoice, + import_v1016.ChannelType.GuildCategory, + import_v1016.ChannelType.GuildAnnouncement, + import_v1016.ChannelType.AnnouncementThread, + import_v1016.ChannelType.PublicThread, + import_v1016.ChannelType.PrivateThread, + import_v1016.ChannelType.GuildStageVoice, + import_v1016.ChannelType.GuildForum, + import_v1016.ChannelType.GuildMedia +]; +var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type)))); +var ApplicationCommandOptionChannelTypesMixin = class { + static { + __name(this, "ApplicationCommandOptionChannelTypesMixin"); + } + /** + * The channel types of this option. + */ + channel_types; + /** + * Adds channel types to this option. + * + * @param channelTypes - The channel types + */ + addChannelTypes(...channelTypes) { + if (this.channel_types === void 0) { + Reflect.set(this, "channel_types", []); + } + this.channel_types.push(...channelTypesPredicate.parse(normalizeArray(channelTypes))); + return this; + } +}; + +// src/interactions/slashCommands/options/channel.ts +var SlashCommandChannelOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = import_v1017.ApplicationCommandOptionType.Channel; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; +__name(SlashCommandChannelOption, "SlashCommandChannelOption"); +SlashCommandChannelOption = __decorateClass([ + (0, import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin) +], SlashCommandChannelOption); + +// src/interactions/slashCommands/options/integer.ts +var import_shapeshift9 = require("@sapphire/shapeshift"); +var import_v1019 = require("discord-api-types/v10"); +var import_ts_mixer2 = require("ts-mixer"); + +// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts +var ApplicationCommandNumericOptionMinMaxValueMixin = class { + static { + __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin"); + } + /** + * The maximum value of this option. + */ + max_value; + /** + * The minimum value of this option. + */ + min_value; +}; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts +var import_shapeshift7 = require("@sapphire/shapeshift"); +var booleanPredicate2 = import_shapeshift7.s.boolean(); +var ApplicationCommandOptionWithAutocompleteMixin = class { + static { + __name(this, "ApplicationCommandOptionWithAutocompleteMixin"); + } + /** + * Whether this option utilizes autocomplete. + */ + autocomplete; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + type; + /** + * Whether this option uses autocomplete. + * + * @param autocomplete - Whether this option should use autocomplete + */ + setAutocomplete(autocomplete) { + booleanPredicate2.parse(autocomplete); + if (autocomplete && "choices" in this && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + Reflect.set(this, "autocomplete", autocomplete); + return this; + } +}; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts +var import_shapeshift8 = require("@sapphire/shapeshift"); +var import_v1018 = require("discord-api-types/v10"); +var stringPredicate = import_shapeshift8.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100); +var numberPredicate = import_shapeshift8.s.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY); +var choicesPredicate = import_shapeshift8.s.object({ + name: stringPredicate, + name_localizations: localizationMapPredicate, + value: import_shapeshift8.s.union([stringPredicate, numberPredicate]) +}).array(); +var ApplicationCommandOptionWithChoicesMixin = class { + static { + __name(this, "ApplicationCommandOptionWithChoicesMixin"); + } + /** + * The choices of this option. + */ + choices; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + type; + /** + * Adds multiple choices to this option. + * + * @param choices - The choices to add + */ + addChoices(...choices) { + const normalizedChoices = normalizeArray(choices); + if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + choicesPredicate.parse(normalizedChoices); + if (this.choices === void 0) { + Reflect.set(this, "choices", []); + } + validateChoicesLength(normalizedChoices.length, this.choices); + for (const { name, name_localizations, value } of normalizedChoices) { + if (this.type === import_v1018.ApplicationCommandOptionType.String) { + stringPredicate.parse(value); + } else { + numberPredicate.parse(value); + } + this.choices.push({ name, name_localizations, value }); + } + return this; + } + /** + * Sets multiple choices for this option. + * + * @param choices - The choices to set + */ + setChoices(...choices) { + const normalizedChoices = normalizeArray(choices); + if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + choicesPredicate.parse(normalizedChoices); + Reflect.set(this, "choices", []); + this.addChoices(normalizedChoices); + return this; + } +}; + +// src/interactions/slashCommands/options/integer.ts +var numberValidator = import_shapeshift9.s.number().int(); +var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = import_v1019.ApplicationCommandOptionType.Integer; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max) { + numberValidator.parse(max); + Reflect.set(this, "max_value", max); + return this; + } + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min) { + numberValidator.parse(min); + Reflect.set(this, "min_value", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandIntegerOption, "SlashCommandIntegerOption"); +SlashCommandIntegerOption = __decorateClass([ + (0, import_ts_mixer2.mix)( + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin + ) +], SlashCommandIntegerOption); + +// src/interactions/slashCommands/options/mentionable.ts +var import_v1020 = require("discord-api-types/v10"); +var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandMentionableOption"); + } + /** + * The type of this option. + */ + type = import_v1020.ApplicationCommandOptionType.Mentionable; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/number.ts +var import_shapeshift10 = require("@sapphire/shapeshift"); +var import_v1021 = require("discord-api-types/v10"); +var import_ts_mixer3 = require("ts-mixer"); +var numberValidator2 = import_shapeshift10.s.number(); +var SlashCommandNumberOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = import_v1021.ApplicationCommandOptionType.Number; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max) { + numberValidator2.parse(max); + Reflect.set(this, "max_value", max); + return this; + } + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min) { + numberValidator2.parse(min); + Reflect.set(this, "min_value", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandNumberOption, "SlashCommandNumberOption"); +SlashCommandNumberOption = __decorateClass([ + (0, import_ts_mixer3.mix)( + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin + ) +], SlashCommandNumberOption); + +// src/interactions/slashCommands/options/role.ts +var import_v1022 = require("discord-api-types/v10"); +var SlashCommandRoleOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandRoleOption"); + } + /** + * The type of this option. + */ + type = import_v1022.ApplicationCommandOptionType.Role; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/string.ts +var import_shapeshift11 = require("@sapphire/shapeshift"); +var import_v1023 = require("discord-api-types/v10"); +var import_ts_mixer4 = require("ts-mixer"); +var minLengthValidator2 = import_shapeshift11.s.number().greaterThanOrEqual(0).lessThanOrEqual(6e3); +var maxLengthValidator2 = import_shapeshift11.s.number().greaterThanOrEqual(1).lessThanOrEqual(6e3); +var SlashCommandStringOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = import_v1023.ApplicationCommandOptionType.String; + /** + * The maximum length of this option. + */ + max_length; + /** + * The minimum length of this option. + */ + min_length; + /** + * Sets the maximum length of this string option. + * + * @param max - The maximum length this option can be + */ + setMaxLength(max) { + maxLengthValidator2.parse(max); + Reflect.set(this, "max_length", max); + return this; + } + /** + * Sets the minimum length of this string option. + * + * @param min - The minimum length this option can be + */ + setMinLength(min) { + minLengthValidator2.parse(min); + Reflect.set(this, "min_length", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandStringOption, "SlashCommandStringOption"); +SlashCommandStringOption = __decorateClass([ + (0, import_ts_mixer4.mix)(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin) +], SlashCommandStringOption); + +// src/interactions/slashCommands/options/user.ts +var import_v1024 = require("discord-api-types/v10"); +var SlashCommandUserOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandUserOption"); + } + /** + * The type of this option. + */ + type = import_v1024.ApplicationCommandOptionType.User; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts +var SharedSlashCommandOptions = class { + static { + __name(this, "SharedSlashCommandOptions"); + } + options; + /** + * Adds a boolean option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addBooleanOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandBooleanOption); + } + /** + * Adds a user option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addUserOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandUserOption); + } + /** + * Adds a channel option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addChannelOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandChannelOption); + } + /** + * Adds a role option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addRoleOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandRoleOption); + } + /** + * Adds an attachment option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addAttachmentOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption); + } + /** + * Adds a mentionable option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addMentionableOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandMentionableOption); + } + /** + * Adds a string option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addStringOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandStringOption); + } + /** + * Adds an integer option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addIntegerOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandIntegerOption); + } + /** + * Adds a number option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addNumberOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandNumberOption); + } + /** + * Where the actual adding magic happens. ✨ + * + * @param input - The input. What else? + * @param Instance - The instance of whatever is being added + * @internal + */ + _sharedAddOptionMethod(input, Instance) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new Instance()) : input; + assertReturnOfBuilder(result, Instance); + options.push(result); + return this; + } +}; + +// src/interactions/slashCommands/SlashCommandSubcommands.ts +var import_v1025 = require("discord-api-types/v10"); +var import_ts_mixer5 = require("ts-mixer"); +var SlashCommandSubcommandGroupBuilder = class { + /** + * The name of this subcommand group. + */ + name = void 0; + /** + * The description of this subcommand group. + */ + description = void 0; + /** + * The subcommands within this subcommand group. + */ + options = []; + /** + * Adds a new subcommand to this group. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandBuilder); + options.push(result); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + return { + type: import_v1025.ApplicationCommandOptionType.SubcommandGroup, + name: this.name, + name_localizations: this.name_localizations, + description: this.description, + description_localizations: this.description_localizations, + options: this.options.map((option) => option.toJSON()) + }; + } +}; +__name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder"); +SlashCommandSubcommandGroupBuilder = __decorateClass([ + (0, import_ts_mixer5.mix)(SharedNameAndDescription) +], SlashCommandSubcommandGroupBuilder); +var SlashCommandSubcommandBuilder = class { + /** + * The name of this subcommand. + */ + name = void 0; + /** + * The description of this subcommand. + */ + description = void 0; + /** + * The options within this subcommand. + */ + options = []; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + return { + type: import_v1025.ApplicationCommandOptionType.Subcommand, + name: this.name, + name_localizations: this.name_localizations, + description: this.description, + description_localizations: this.description_localizations, + options: this.options.map((option) => option.toJSON()) + }; + } +}; +__name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder"); +SlashCommandSubcommandBuilder = __decorateClass([ + (0, import_ts_mixer5.mix)(SharedNameAndDescription, SharedSlashCommandOptions) +], SlashCommandSubcommandBuilder); + +// src/interactions/slashCommands/mixins/SharedSubcommands.ts +var SharedSlashCommandSubcommands = class { + static { + __name(this, "SharedSlashCommandSubcommands"); + } + options = []; + /** + * Adds a new subcommand group to this command. + * + * @param input - A function that returns a subcommand group builder or an already built builder + */ + addSubcommandGroup(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder); + options.push(result); + return this; + } + /** + * Adds a new subcommand to this command. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandBuilder); + options.push(result); + return this; + } +}; + +// src/interactions/slashCommands/SlashCommandBuilder.ts +var SlashCommandBuilder = class { + /** + * The name of this command. + */ + name = void 0; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The description of this command. + */ + description = void 0; + /** + * The description localizations of this command. + */ + description_localizations; + /** + * The options of this command. + */ + options = []; + /** + * The contexts for this command. + */ + contexts; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + default_permission = void 0; + /** + * The set of permissions represented as a bit set for the command. + */ + default_member_permissions = void 0; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link SlashCommandBuilder.contexts} instead. + */ + dm_permission = void 0; + /** + * The integration types for this command. + */ + integration_types; + /** + * Whether this command is NSFW. + */ + nsfw = void 0; +}; +__name(SlashCommandBuilder, "SlashCommandBuilder"); +SlashCommandBuilder = __decorateClass([ + (0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand) +], SlashCommandBuilder); + +// src/interactions/contextMenuCommands/Assertions.ts +var Assertions_exports6 = {}; +__export(Assertions_exports6, { + contextsPredicate: () => contextsPredicate2, + integrationTypesPredicate: () => integrationTypesPredicate2, + validateDMPermission: () => validateDMPermission2, + validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2, + validateDefaultPermission: () => validateDefaultPermission2, + validateName: () => validateName2, + validateRequiredParameters: () => validateRequiredParameters4, + validateType: () => validateType +}); +var import_shapeshift12 = require("@sapphire/shapeshift"); +var import_v1026 = require("discord-api-types/v10"); +var namePredicate2 = import_shapeshift12.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled); +var typePredicate = import_shapeshift12.s.union([import_shapeshift12.s.literal(import_v1026.ApplicationCommandType.User), import_shapeshift12.s.literal(import_v1026.ApplicationCommandType.Message)]).setValidationEnabled(isValidationEnabled); +var booleanPredicate3 = import_shapeshift12.s.boolean(); +function validateDefaultPermission2(value) { + booleanPredicate3.parse(value); +} +__name(validateDefaultPermission2, "validateDefaultPermission"); +function validateName2(name) { + namePredicate2.parse(name); +} +__name(validateName2, "validateName"); +function validateType(type) { + typePredicate.parse(type); +} +__name(validateType, "validateType"); +function validateRequiredParameters4(name, type) { + validateName2(name); + validateType(type); +} +__name(validateRequiredParameters4, "validateRequiredParameters"); +var dmPermissionPredicate2 = import_shapeshift12.s.boolean().nullish(); +function validateDMPermission2(value) { + dmPermissionPredicate2.parse(value); +} +__name(validateDMPermission2, "validateDMPermission"); +var memberPermissionPredicate2 = import_shapeshift12.s.union([ + import_shapeshift12.s.bigint().transform((value) => value.toString()), + import_shapeshift12.s.number().safeInt().transform((value) => value.toString()), + import_shapeshift12.s.string().regex(/^\d+$/) +]).nullish(); +function validateDefaultMemberPermissions2(permissions) { + return memberPermissionPredicate2.parse(permissions); +} +__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions"); +var contextsPredicate2 = import_shapeshift12.s.array( + import_shapeshift12.s.nativeEnum(import_v1026.InteractionContextType).setValidationEnabled(isValidationEnabled) +); +var integrationTypesPredicate2 = import_shapeshift12.s.array( + import_shapeshift12.s.nativeEnum(import_v1026.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled) +); + +// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +var ContextMenuCommandBuilder = class { + static { + __name(this, "ContextMenuCommandBuilder"); + } + /** + * The name of this command. + */ + name = void 0; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The type of this command. + */ + type = void 0; + /** + * The contexts for this command. + */ + contexts; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + default_permission = void 0; + /** + * The set of permissions represented as a bit set for the command. + */ + default_member_permissions = void 0; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link ContextMenuCommandBuilder.contexts} instead. + */ + dm_permission = void 0; + /** + * The integration types for this command. + */ + integration_types; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts) { + Reflect.set(this, "contexts", contextsPredicate2.parse(normalizeArray(contexts))); + return this; + } + /** + * Sets integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes) { + Reflect.set(this, "integration_types", integrationTypesPredicate2.parse(normalizeArray(integrationTypes))); + return this; + } + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name) { + validateName2(name); + Reflect.set(this, "name", name); + return this; + } + /** + * Sets the type of this command. + * + * @param type - The type to use + */ + setType(type) { + validateType(type); + Reflect.set(this, "type", type); + return this; + } + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + setDefaultPermission(value) { + validateDefaultPermission2(value); + Reflect.set(this, "default_permission", value); + return this; + } + /** + * Sets the default permissions a member should have in order to run this command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions) { + const permissionValue = validateDefaultMemberPermissions2(permissions); + Reflect.set(this, "default_member_permissions", permissionValue); + return this; + } + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead. + */ + setDMPermission(enabled) { + validateDMPermission2(enabled); + Reflect.set(this, "dm_permission", enabled); + return this; + } + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale, localizedName) { + if (!this.name_localizations) { + Reflect.set(this, "name_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedName === null) { + this.name_localizations[parsedLocale] = null; + return this; + } + validateName2(localizedName); + this.name_localizations[parsedLocale] = localizedName; + return this; + } + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames) { + if (localizedNames === null) { + Reflect.set(this, "name_localizations", null); + return this; + } + Reflect.set(this, "name_localizations", {}); + for (const args of Object.entries(localizedNames)) + this.setNameLocalization(...args); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters4(this.name, this.type); + validateLocalizationMap(this.name_localizations); + return { ...this }; + } +}; + +// src/util/componentUtil.ts +function embedLength(data) { + return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0); +} +__name(embedLength, "embedLength"); + +// src/index.ts +var version = "1.10.1"; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + ActionRowBuilder, + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionBase, + ApplicationCommandOptionChannelTypesMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin, + BaseSelectMenuBuilder, + ButtonBuilder, + ChannelSelectMenuBuilder, + ComponentAssertions, + ComponentBuilder, + ContextMenuCommandAssertions, + ContextMenuCommandBuilder, + EmbedAssertions, + EmbedBuilder, + MentionableSelectMenuBuilder, + ModalAssertions, + ModalBuilder, + RoleSelectMenuBuilder, + SelectMenuBuilder, + SelectMenuOptionBuilder, + SharedNameAndDescription, + SharedSlashCommand, + SharedSlashCommandOptions, + SharedSlashCommandSubcommands, + SlashCommandAssertions, + SlashCommandAttachmentOption, + SlashCommandBooleanOption, + SlashCommandBuilder, + SlashCommandChannelOption, + SlashCommandIntegerOption, + SlashCommandMentionableOption, + SlashCommandNumberOption, + SlashCommandRoleOption, + SlashCommandStringOption, + SlashCommandSubcommandBuilder, + SlashCommandSubcommandGroupBuilder, + SlashCommandUserOption, + StringSelectMenuBuilder, + StringSelectMenuOptionBuilder, + TextInputAssertions, + TextInputBuilder, + UserSelectMenuBuilder, + createComponentBuilder, + disableValidators, + embedLength, + enableValidators, + isValidationEnabled, + normalizeArray, + version, + ...require("@discordjs/formatters") +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.js.map b/node_modules/@discordjs/builders/dist/index.js.map new file mode 100644 index 0000000..93c6468 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/util/validation.ts","../src/util/normalizeArray.ts","../src/messages/embed/Embed.ts","../src/components/Assertions.ts","../src/components/selectMenu/StringSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/Button.ts","../src/components/selectMenu/ChannelSelectMenu.ts","../src/components/selectMenu/BaseSelectMenu.ts","../src/components/selectMenu/MentionableSelectMenu.ts","../src/components/selectMenu/RoleSelectMenu.ts","../src/components/selectMenu/StringSelectMenu.ts","../src/components/selectMenu/UserSelectMenu.ts","../src/components/textInput/TextInput.ts","../src/components/textInput/Assertions.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/SharedSlashCommand.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/slashCommands/mixins/SharedSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/componentUtil.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions.js';\nexport * from './messages/embed/Embed.js';\n// TODO: Consider removing this dep in the next major version\nexport * from '@discordjs/formatters';\n\nexport * as ComponentAssertions from './components/Assertions.js';\nexport * from './components/ActionRow.js';\nexport * from './components/button/Button.js';\nexport * from './components/Component.js';\nexport * from './components/Components.js';\nexport * from './components/textInput/TextInput.js';\nexport * as TextInputAssertions from './components/textInput/Assertions.js';\nexport * from './interactions/modals/Modal.js';\nexport * as ModalAssertions from './interactions/modals/Assertions.js';\n\nexport * from './components/selectMenu/BaseSelectMenu.js';\nexport * from './components/selectMenu/ChannelSelectMenu.js';\nexport * from './components/selectMenu/MentionableSelectMenu.js';\nexport * from './components/selectMenu/RoleSelectMenu.js';\nexport * from './components/selectMenu/StringSelectMenu.js';\n// TODO: Remove those aliases in v2\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuBuilder} instead.\n\t */\n\tStringSelectMenuBuilder as SelectMenuBuilder,\n} from './components/selectMenu/StringSelectMenu.js';\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuOptionBuilder} instead.\n\t */\n\tStringSelectMenuOptionBuilder as SelectMenuOptionBuilder,\n} from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/UserSelectMenu.js';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions.js';\nexport * from './interactions/slashCommands/SlashCommandBuilder.js';\nexport * from './interactions/slashCommands/SlashCommandSubcommands.js';\nexport * from './interactions/slashCommands/options/boolean.js';\nexport * from './interactions/slashCommands/options/channel.js';\nexport * from './interactions/slashCommands/options/integer.js';\nexport * from './interactions/slashCommands/options/mentionable.js';\nexport * from './interactions/slashCommands/options/number.js';\nexport * from './interactions/slashCommands/options/role.js';\nexport * from './interactions/slashCommands/options/attachment.js';\nexport * from './interactions/slashCommands/options/string.js';\nexport * from './interactions/slashCommands/options/user.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionBase.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.js';\nexport * from './interactions/slashCommands/mixins/NameAndDescription.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommandOptions.js';\nexport * from './interactions/slashCommands/mixins/SharedSubcommands.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommand.js';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions.js';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js';\n\nexport * from './util/componentUtil.js';\nexport * from './util/normalizeArray.js';\nexport * from './util/validation.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version\n * that you are currently using.\n *\n * @privateRemarks This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild.\n */\nexport const version = '1.10.1' as string;\n","import { s } from '@sapphire/shapeshift';\nimport type { APIEmbedField } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const fieldNamePredicate = s.string().lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);\n\nexport const fieldValuePredicate = s.string().lengthLessThanOrEqual(1_024).setValidationEnabled(isValidationEnabled);\n\nexport const fieldInlinePredicate = s.boolean().optional();\n\nexport const embedFieldPredicate = s\n\t.object({\n\t\tname: fieldNamePredicate,\n\t\tvalue: fieldValuePredicate,\n\t\tinline: fieldInlinePredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array().setValidationEnabled(isValidationEnabled);\n\nexport const fieldLengthPredicate = s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate\n\t.lengthGreaterThanOrEqual(1)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const imageURLPredicate = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'attachment:'],\n\t})\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const urlPredicate = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:'],\n\t})\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedAuthorPredicate = s\n\t.object({\n\t\tname: authorNamePredicate,\n\t\ticonURL: imageURLPredicate,\n\t\turl: urlPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const RGBPredicate = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(255)\n\t.setValidationEnabled(isValidationEnabled);\nexport const colorPredicate = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(0xffffff)\n\t.or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate]))\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const descriptionPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(4_096)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const footerTextPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(2_048)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFooterPredicate = s\n\t.object({\n\t\ttext: footerTextPredicate,\n\t\ticonURL: imageURLPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const timestampPredicate = s.union([s.number(), s.date()]).nullable().setValidationEnabled(isValidationEnabled);\n\nexport const titlePredicate = fieldNamePredicate\n\t.lengthGreaterThanOrEqual(1)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n","let validate = true;\n\n/**\n * Enables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function enableValidators() {\n\treturn (validate = true);\n}\n\n/**\n * Disables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function disableValidators() {\n\treturn (validate = false);\n}\n\n/**\n * Checks whether validation is occurring.\n */\nexport function isValidationEnabled() {\n\treturn validate;\n}\n","/**\n * Normalizes data that is a rest parameter or an array into an array with a depth of 1.\n *\n * @typeParam ItemType - The data that must satisfy {@link RestOrArray}.\n * @param arr - The (possibly variadic) data to normalize\n */\nexport function normalizeArray(arr: RestOrArray): ItemType[] {\n\tif (Array.isArray(arr[0])) return [...arr[0]];\n\treturn arr as ItemType[];\n}\n\n/**\n * Represents data that may be an array or came from a rest parameter.\n *\n * @remarks\n * This type is used throughout builders to ensure both an array and variadic arguments\n * may be used. It is normalized with {@link normalizeArray}.\n */\nexport type RestOrArray = Type[] | [Type[]];\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport {\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedAuthorPredicate,\n\tembedFieldsArrayPredicate,\n\tembedFooterPredicate,\n\timageURLPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions.js';\n\n/**\n * A tuple satisfying the RGB color model.\n *\n * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}\n */\nexport type RGBTuple = [red: number, green: number, blue: number];\n\n/**\n * The base icon data typically used in payloads.\n */\nexport interface IconData {\n\t/**\n\t * The URL of the icon.\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon.\n\t */\n\tproxyIconURL?: string;\n}\n\n/**\n * Represents the author data of an embed.\n */\nexport interface EmbedAuthorData extends IconData, Omit {}\n\n/**\n * Represents the author options of an embed.\n */\nexport interface EmbedAuthorOptions extends Omit {}\n\n/**\n * Represents the footer data of an embed.\n */\nexport interface EmbedFooterData extends IconData, Omit {}\n\n/**\n * Represents the footer options of an embed.\n */\nexport interface EmbedFooterOptions extends Omit {}\n\n/**\n * Represents the image data of an embed.\n */\nexport interface EmbedImageData extends Omit {\n\t/**\n\t * The proxy URL for the image.\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * A builder that creates API-compatible JSON data for embeds.\n */\nexport class EmbedBuilder {\n\t/**\n\t * The API data associated with this embed.\n\t */\n\tpublic readonly data: APIEmbed;\n\n\t/**\n\t * Creates a new embed from API data.\n\t *\n\t * @param data - The API data to create this embed with\n\t */\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Appends fields to the embed.\n\t *\n\t * @remarks\n\t * This method accepts either an array of fields or a variable number of field parameters.\n\t * The maximum amount of fields that can be added is 25.\n\t * @example\n\t * Using an array:\n\t * ```ts\n\t * const fields: APIEmbedField[] = ...;\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(fields);\n\t * ```\n\t * @example\n\t * Using rest parameters (variadic):\n\t * ```ts\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(\n\t * \t\t{ name: 'Field 1', value: 'Value 1' },\n\t * \t\t{ name: 'Field 2', value: 'Value 2' },\n\t * \t);\n\t * ```\n\t * @param fields - The fields to add\n\t */\n\tpublic addFields(...fields: RestOrArray): this {\n\t\tconst normalizedFields = normalizeArray(fields);\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(normalizedFields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(normalizedFields);\n\n\t\tif (this.data.fields) this.data.fields.push(...normalizedFields);\n\t\telse this.data.fields = normalizedFields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields for this embed.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.\n\t * The maximum amount of fields that can be added is 25.\n\t *\n\t * It's useful for modifying and adjusting order of the already-existing fields of an embed.\n\t * @example\n\t * Remove the first field:\n\t * ```ts\n\t * embed.spliceFields(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n fields:\n\t * ```ts\n\t * const n = 4;\n\t * embed.spliceFields(0, n);\n\t * ```\n\t * @example\n\t * Remove the last field:\n\t * ```ts\n\t * embed.spliceFields(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of fields to remove\n\t * @param fields - The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(fields);\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the fields for this embed.\n\t *\n\t * @remarks\n\t * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,\n\t * it splices the entire array of fields, replacing them with the provided fields.\n\t *\n\t * You can set a maximum of 25 fields.\n\t * @param fields - The fields to set\n\t */\n\tpublic setFields(...fields: RestOrArray): this {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed.\n\t *\n\t * @param options - The options to use\n\t */\n\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedAuthorPredicate.parse(options);\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed.\n\t *\n\t * @param color - The color to use\n\t */\n\tpublic setColor(color: RGBTuple | number | null): this {\n\t\t// Data assertions\n\t\tcolorPredicate.parse(color);\n\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tdescriptionPredicate.parse(description);\n\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed.\n\t *\n\t * @param options - The footer to use\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedFooterPredicate.parse(options);\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed.\n\t *\n\t * @param url - The image URL to use\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed.\n\t *\n\t * @param url - The thumbnail URL to use\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed.\n\t *\n\t * @param timestamp - The timestamp or date to use\n\t */\n\tpublic setTimestamp(timestamp: Date | number | null = Date.now()): this {\n\t\t// Data assertions\n\t\ttimestampPredicate.parse(timestamp);\n\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title for this embed.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\ttitlePredicate.parse(title);\n\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed.\n\t *\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\turlPredicate.parse(url);\n\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ButtonStyle, ChannelType, type APIMessageComponentEmoji } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../util/validation.js';\nimport { StringSelectMenuOptionBuilder } from './selectMenu/StringSelectMenuOption.js';\n\nexport const customIdValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const emojiValidator = s\n\t.object({\n\t\tid: s.string(),\n\t\tname: s.string(),\n\t\tanimated: s.boolean(),\n\t})\n\t.partial()\n\t.strict()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const disabledValidator = s.boolean();\n\nexport const buttonLabelValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(80)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const buttonStyleValidator = s.nativeEnum(ButtonStyle);\n\nexport const placeholderValidator = s.string().lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);\nexport const minMaxValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const labelValueDescriptionValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const jsonOptionValidator = s\n\t.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: s.boolean().optional(),\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const optionValidator = s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);\n\nexport const optionsValidator = optionValidator\n\t.array()\n\t.lengthGreaterThanOrEqual(0)\n\t.setValidationEnabled(isValidationEnabled);\nexport const optionsLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const defaultValidator = s.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueDescriptionValidator.parse(label);\n\tlabelValueDescriptionValidator.parse(value);\n}\n\nexport const channelTypesValidator = s.nativeEnum(ChannelType).array().setValidationEnabled(isValidationEnabled);\n\nexport const urlValidator = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'discord:'],\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\tskuId?: string,\n\turl?: string,\n) {\n\tif (style === ButtonStyle.Premium) {\n\t\tif (!skuId) {\n\t\t\tthrow new RangeError('Premium buttons must have an SKU id.');\n\t\t}\n\n\t\tif (customId || label || url || emoji) {\n\t\t\tthrow new RangeError('Premium buttons cannot have a custom id, label, URL, or emoji.');\n\t\t}\n\t} else {\n\t\tif (skuId) {\n\t\t\tthrow new RangeError('Non-premium buttons must not have an SKU id.');\n\t\t}\n\n\t\tif (url && customId) {\n\t\t\tthrow new RangeError('URL and custom id are mutually exclusive.');\n\t\t}\n\n\t\tif (!label && !emoji) {\n\t\t\tthrow new RangeError('Non-premium buttons must have a label and/or an emoji.');\n\t\t}\n\n\t\tif (style === ButtonStyle.Link) {\n\t\t\tif (!url) {\n\t\t\t\tthrow new RangeError('Link buttons must have a URL.');\n\t\t\t}\n\t\t} else if (url) {\n\t\t\tthrow new RangeError('Non-premium and non-link buttons cannot have a URL.');\n\t\t}\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueDescriptionValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menu options.\n */\nexport class StringSelectMenuOptionBuilder implements JSONEncodable {\n\t/**\n\t * Creates a new string select menu option from API data.\n\t *\n\t * @param data - The API data to create this string select menu option with\n\t * @example\n\t * Creating a string select menu option from an API data object:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tlabel: 'catchy label',\n\t * \tvalue: '1',\n\t * });\n\t * ```\n\t * @example\n\t * Creating a string select menu option using setters and API data:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tdefault: true,\n\t * \tvalue: '1',\n\t * })\n\t * \t.setLabel('woah');\n\t * ```\n\t */\n\tpublic constructor(public data: Partial = {}) {}\n\n\t/**\n\t * Sets the label for this option.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValueDescriptionValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this option.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = labelValueDescriptionValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description for this option.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = labelValueDescriptionValidator.parse(description);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default.\n\t *\n\t * @param isDefault - Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = defaultValidator.parse(isDefault);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display for this option.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport {\n\ttype APIActionRowComponent,\n\tComponentType,\n\ttype APIMessageActionRowComponent,\n\ttype APIModalActionRowComponent,\n\ttype APIActionRowComponentTypes,\n} from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../util/normalizeArray.js';\nimport { ComponentBuilder } from './Component.js';\nimport { createComponentBuilder } from './Components.js';\nimport type { ButtonBuilder } from './button/Button.js';\nimport type { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport type { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport type { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport type { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport type { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport type { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * The builders that may be used for messages.\n */\nexport type MessageComponentBuilder =\n\t| ActionRowBuilder\n\t| MessageActionRowComponentBuilder;\n\n/**\n * The builders that may be used for modals.\n */\nexport type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;\n\n/**\n * The builders that may be used within an action row for messages.\n */\nexport type MessageActionRowComponentBuilder =\n\t| ButtonBuilder\n\t| ChannelSelectMenuBuilder\n\t| MentionableSelectMenuBuilder\n\t| RoleSelectMenuBuilder\n\t| StringSelectMenuBuilder\n\t| UserSelectMenuBuilder;\n\n/**\n * The builders that may be used within an action row for modals.\n */\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Any builder.\n */\nexport type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;\n\n/**\n * A builder that creates API-compatible JSON data for action rows.\n *\n * @typeParam ComponentType - The types of components this action row holds\n */\nexport class ActionRowBuilder extends ComponentBuilder<\n\tAPIActionRowComponent\n> {\n\t/**\n\t * The components within this action row.\n\t */\n\tpublic readonly components: ComponentType[];\n\n\t/**\n\t * Creates a new action row from API data.\n\t *\n\t * @param data - The API data to create this action row with\n\t * @example\n\t * Creating an action row from an API data object:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Type something\",\n\t * \t\t\tstyle: TextInputStyle.Short,\n\t * \t\t\ttype: ComponentType.TextInput,\n\t * \t\t},\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating an action row using setters and API data:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Click me\",\n\t * \t\t\tstyle: ButtonStyle.Primary,\n\t * \t\t\ttype: ComponentType.Button,\n\t * \t\t},\n\t * \t],\n\t * })\n\t * \t.addComponents(button2, button3);\n\t * ```\n\t */\n\tpublic constructor({ components, ...data }: Partial> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ?? []) as ComponentType[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(...components: RestOrArray) {\n\t\tthis.components.push(...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this action row.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIActionRowComponent> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIActionRowComponent>;\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Any action row component data represented as an object.\n */\nexport type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes;\n\n/**\n * The base component builder that contains common symbols for all sorts of components.\n *\n * @typeParam DataType - The type of internal API data that is stored within the component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial> = APIBaseComponent,\n> implements JSONEncodable\n{\n\t/**\n\t * The API data associated with this component.\n\t */\n\tpublic readonly data: Partial;\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): AnyAPIActionRowComponent;\n\n\t/**\n\t * Constructs a new kind of component.\n\t *\n\t * @param data - The data to construct a component out of\n\t */\n\tpublic constructor(data: Partial) {\n\t\tthis.data = data;\n\t}\n}\n","import { ComponentType, type APIMessageComponent, type APIModalComponent } from 'discord-api-types/v10';\nimport {\n\tActionRowBuilder,\n\ttype AnyComponentBuilder,\n\ttype MessageComponentBuilder,\n\ttype ModalComponentBuilder,\n} from './ActionRow.js';\nimport { ComponentBuilder } from './Component.js';\nimport { ButtonBuilder } from './button/Button.js';\nimport { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * Components here are mapped to their respective builder.\n */\nexport interface MappedComponentTypes {\n\t/**\n\t * The action row component type is associated with an {@link ActionRowBuilder}.\n\t */\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t/**\n\t * The button component type is associated with a {@link ButtonBuilder}.\n\t */\n\t[ComponentType.Button]: ButtonBuilder;\n\t/**\n\t * The string select component type is associated with a {@link StringSelectMenuBuilder}.\n\t */\n\t[ComponentType.StringSelect]: StringSelectMenuBuilder;\n\t/**\n\t * The text input component type is associated with a {@link TextInputBuilder}.\n\t */\n\t[ComponentType.TextInput]: TextInputBuilder;\n\t/**\n\t * The user select component type is associated with a {@link UserSelectMenuBuilder}.\n\t */\n\t[ComponentType.UserSelect]: UserSelectMenuBuilder;\n\t/**\n\t * The role select component type is associated with a {@link RoleSelectMenuBuilder}.\n\t */\n\t[ComponentType.RoleSelect]: RoleSelectMenuBuilder;\n\t/**\n\t * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}.\n\t */\n\t[ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;\n\t/**\n\t * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}.\n\t */\n\t[ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;\n}\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam ComponentType - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder(\n\t// eslint-disable-next-line @typescript-eslint/sort-type-constituents\n\tdata: (APIModalComponent | APIMessageComponent) & { type: ComponentType },\n): MappedComponentTypes[ComponentType];\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam ComponentBuilder - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder(\n\tdata: ComponentBuilder,\n): ComponentBuilder;\n\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.StringSelect:\n\t\t\treturn new StringSelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tcase ComponentType.UserSelect:\n\t\t\treturn new UserSelectMenuBuilder(data);\n\t\tcase ComponentType.RoleSelect:\n\t\t\treturn new RoleSelectMenuBuilder(data);\n\t\tcase ComponentType.MentionableSelect:\n\t\t\treturn new MentionableSelectMenuBuilder(data);\n\t\tcase ComponentType.ChannelSelect:\n\t\t\treturn new ChannelSelectMenuBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error This case can still occur if we get a newer unsupported component type\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithCustomId,\n\ttype APIButtonComponentWithSKUId,\n\ttype APIButtonComponentWithURL,\n\ttype APIMessageComponentEmoji,\n\ttype ButtonStyle,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * A builder that creates API-compatible JSON data for buttons.\n */\nexport class ButtonBuilder extends ComponentBuilder {\n\t/**\n\t * Creates a new button from API data.\n\t *\n\t * @param data - The API data to create this button with\n\t * @example\n\t * Creating a button from an API data object:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tcustom_id: 'a cool button',\n\t * \tstyle: ButtonStyle.Primary,\n\t * \tlabel: 'Click Me',\n\t * \temoji: {\n\t * \t\tname: 'smile',\n\t * \t\tid: '123456789012345678',\n\t * \t},\n\t * });\n\t * ```\n\t * @example\n\t * Creating a button using setters and API data:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tstyle: ButtonStyle.Secondary,\n\t * \tlabel: 'Click Me',\n\t * })\n\t * \t.setEmoji({ name: '🙂' })\n\t * \t.setCustomId('another cool button');\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = buttonStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button.\n\t *\n\t * @remarks\n\t * This method is only available to buttons using the `Link` button style.\n\t * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = urlValidator.parse(url);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this button.\n\t *\n\t * @remarks\n\t * This method is only applicable to buttons that are not using the `Link` button style.\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the SKU id that represents a purchasable SKU for this button.\n\t *\n\t * @remarks Only available when using premium-style buttons.\n\t * @param skuId - The SKU id to use\n\t */\n\tpublic setSKUId(skuId: Snowflake) {\n\t\t(this.data as APIButtonComponentWithSKUId).sku_id = skuId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\t(this.data as Exclude).emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disabled.\n\t *\n\t * @param disabled - Whether to disable this button\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\t(this.data as Exclude).label = buttonLabelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\t(this.data as Exclude).label,\n\t\t\t(this.data as Exclude).emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithSKUId).sku_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import {\n\ttype APIChannelSelectComponent,\n\ttype ChannelType,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { channelTypesValidator, customIdValidator, optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for channel select menus.\n */\nexport class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)\n\t * \t.setMinValues(2);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.ChannelSelect });\n\t}\n\n\t/**\n\t * Adds channel types to this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic addChannelTypes(...types: RestOrArray) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets channel types for this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic setChannelTypes(...types: RestOrArray) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default channels to this auto populated select menu.\n\t *\n\t * @param channels - The channels to add\n\t */\n\tpublic addDefaultChannels(...channels: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(channels);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Channel as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default channels for this auto populated select menu.\n\t *\n\t * @param channels - The channels to set\n\t */\n\tpublic setDefaultChannels(...channels: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(channels);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.Channel as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIChannelSelectComponent {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIChannelSelectComponent;\n\t}\n}\n","import type { APISelectMenuComponent } from 'discord-api-types/v10';\nimport { customIdValidator, disabledValidator, minMaxValidator, placeholderValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * The base select menu builder that contains common symbols for select menu builders.\n *\n * @typeParam SelectMenuType - The type of select menu this would be instantiated for.\n */\nexport abstract class BaseSelectMenuBuilder<\n\tSelectMenuType extends APISelectMenuComponent,\n> extends ComponentBuilder {\n\t/**\n\t * Sets the placeholder for this select menu.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu.\n\t *\n\t * @param minValues - The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minMaxValidator.parse(minValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu.\n\t *\n\t * @param maxValues - The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = minMaxValidator.parse(maxValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this select menu.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this select menu is disabled.\n\t *\n\t * @param disabled - Whether this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): SelectMenuType {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as SelectMenuType;\n\t}\n}\n","import {\n\ttype APIMentionableSelectComponent,\n\ttype APISelectMenuDefaultValue,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for mentionable select menus.\n */\nexport class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.MentionableSelect });\n\t}\n\n\t/**\n\t * Adds default roles to this auto populated select menu.\n\t *\n\t * @param roles - The roles to add\n\t */\n\tpublic addDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default users to this auto populated select menu.\n\t *\n\t * @param users - The users to add\n\t */\n\tpublic addDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default values to this auto populated select menu.\n\t *\n\t * @param values - The values to add\n\t */\n\tpublic addDefaultValues(\n\t\t...values: RestOrArray<\n\t\t\t| APISelectMenuDefaultValue\n\t\t\t| APISelectMenuDefaultValue\n\t\t>\n\t) {\n\t\tconst normalizedValues = normalizeArray(values);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\t\tthis.data.default_values.push(...normalizedValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default values for this auto populated select menu.\n\t *\n\t * @param values - The values to set\n\t */\n\tpublic setDefaultValues(\n\t\t...values: RestOrArray<\n\t\t\t| APISelectMenuDefaultValue\n\t\t\t| APISelectMenuDefaultValue\n\t\t>\n\t) {\n\t\tconst normalizedValues = normalizeArray(values);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\t\tthis.data.default_values = normalizedValues;\n\t\treturn this;\n\t}\n}\n","import {\n\ttype APIRoleSelectComponent,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for role select menus.\n */\nexport class RoleSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.RoleSelect });\n\t}\n\n\t/**\n\t * Adds default roles to this auto populated select menu.\n\t *\n\t * @param roles - The roles to add\n\t */\n\tpublic addDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default roles for this auto populated select menu.\n\t *\n\t * @param roles - The roles to set\n\t */\n\tpublic setDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n}\n","import { ComponentType } from 'discord-api-types/v10';\nimport type { APIStringSelectComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { jsonOptionValidator, optionsLengthValidator, validateRequiredSelectMenuParameters } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\nimport { StringSelectMenuOptionBuilder } from './StringSelectMenuOption.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menus.\n */\nexport class StringSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * The options within this select menu.\n\t */\n\tpublic readonly options: StringSelectMenuOptionBuilder[];\n\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * \toptions: [\n\t * \t\t{ label: 'option 1', value: '1' },\n\t * \t\t{ label: 'option 2', value: '2' },\n\t * \t\t{ label: 'option 3', value: '3' },\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1)\n\t * \t.addOptions({\n\t * \t\tlabel: 'Catchy',\n\t * \t\tvalue: 'catch',\n\t * \t});\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ ...initData, type: ComponentType.StringSelect });\n\t\tthis.options = options?.map((option: APISelectMenuOption) => new StringSelectMenuOptionBuilder(option)) ?? [];\n\t}\n\n\t/**\n\t * Adds options to this select menu.\n\t *\n\t * @param options - The options to add\n\t */\n\tpublic addOptions(...options: RestOrArray) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\t\toptionsLengthValidator.parse(this.options.length + normalizedOptions.length);\n\t\tthis.options.push(\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options for this select menu.\n\t *\n\t * @param options - The options to set\n\t */\n\tpublic setOptions(...options: RestOrArray) {\n\t\treturn this.spliceOptions(0, this.options.length, ...options);\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts options for this select menu.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.\n\t * It's useful for modifying and adjusting the order of existing options.\n\t * @example\n\t * Remove the first option:\n\t * ```ts\n\t * selectMenu.spliceOptions(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n option:\n\t * ```ts\n\t * const n = 4;\n\t * selectMenu.spliceOptions(0, n);\n\t * ```\n\t * @example\n\t * Remove the last option:\n\t * ```ts\n\t * selectMenu.spliceOptions(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of options to remove\n\t * @param options - The replacing option objects or builders\n\t */\n\tpublic spliceOptions(\n\t\tindex: number,\n\t\tdeleteCount: number,\n\t\t...options: RestOrArray\n\t) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\n\t\tconst clone = [...this.options];\n\n\t\tclone.splice(\n\t\t\tindex,\n\t\t\tdeleteCount,\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\n\t\toptionsLengthValidator.parse(clone.length);\n\t\tthis.options.splice(0, this.options.length, ...clone);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIStringSelectComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t} as APIStringSelectComponent;\n\t}\n}\n","import {\n\ttype APIUserSelectComponent,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for user select menus.\n */\nexport class UserSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.UserSelect });\n\t}\n\n\t/**\n\t * Adds default users to this auto populated select menu.\n\t *\n\t * @param users - The users to add\n\t */\n\tpublic addDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default users for this auto populated select menu.\n\t *\n\t * @param users - The users to set\n\t */\n\tpublic setDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n}\n","import { isJSONEncodable, type Equatable, type JSONEncodable } from '@discordjs/util';\nimport { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport isEqual from 'fast-deep-equal';\nimport { customIdValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n\tlabelValidator,\n\ttextInputStyleValidator,\n} from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for text inputs.\n */\nexport class TextInputBuilder\n\textends ComponentBuilder\n\timplements Equatable>\n{\n\t/**\n\t * Creates a new text input from API data.\n\t *\n\t * @param data - The API data to create this text input with\n\t * @example\n\t * Creating a text input from an API data object:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tcustom_id: 'a cool text input',\n\t * \tlabel: 'Type something',\n\t * \tstyle: TextInputStyle.Short,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a text input using setters and API data:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tlabel: 'Type something else',\n\t * })\n\t * \t.setCustomId('woah')\n\t * \t.setStyle(TextInputStyle.Paragraph);\n\t * ```\n\t */\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = textInputStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input.\n\t *\n\t * @param minLength - The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLengthValidator.parse(minLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input.\n\t *\n\t * @param maxLength - The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLengthValidator.parse(maxLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder for this text input.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this text input.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = valueValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required.\n\t *\n\t * @param required - Whether this text input is required\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = requiredValidator.parse(required);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\t/**\n\t * Whether this is equal to another structure.\n\t */\n\tpublic equals(other: APITextInputComponent | JSONEncodable): boolean {\n\t\tif (isJSONEncodable(other)) {\n\t\t\treturn isEqual(other.toJSON(), this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { TextInputStyle } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport { customIdValidator } from '../Assertions.js';\n\nexport const textInputStyleValidator = s.nativeEnum(TextInputStyle);\nexport const minLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const maxLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(1)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const requiredValidator = s.boolean();\nexport const valueValidator = s.string().lengthLessThanOrEqual(4_000).setValidationEnabled(isValidationEnabled);\nexport const placeholderValidator = s.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);\nexport const labelValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const titleValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\nexport const componentsValidator = s\n\t.instance(ActionRowBuilder)\n\t.array()\n\t.lengthGreaterThanOrEqual(1)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { createComponentBuilder } from '../../components/Components.js';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { titleValidator, validateRequiredParameters } from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for modals.\n */\nexport class ModalBuilder implements JSONEncodable {\n\t/**\n\t * The API data associated with this modal.\n\t */\n\tpublic readonly data: Partial;\n\n\t/**\n\t * The components within this modal.\n\t */\n\tpublic readonly components: ActionRowBuilder[] = [];\n\n\t/**\n\t * Creates a new modal from API data.\n\t *\n\t * @param data - The API data to create this modal with\n\t */\n\tpublic constructor({ components, ...data }: Partial = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ??\n\t\t\t[]) as ActionRowBuilder[];\n\t}\n\n\t/**\n\t * Sets the title of this modal.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = titleValidator.parse(title);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of this modal.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(\n\t\t...components: RestOrArray<\n\t\t\tActionRowBuilder | APIActionRowComponent\n\t\t>\n\t) {\n\t\tthis.components.push(\n\t\t\t...normalizeArray(components).map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this modal.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport {\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocale,\n\ttype APIApplicationCommandOptionChoice,\n\ttype LocalizationMap,\n} from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\n\nconst namePredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t.regex(/^[\\p{Ll}\\p{Lm}\\p{Lo}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}_-]+$/u)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\nconst localePredicate = s.nativeEnum(Locale);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = s.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\nexport function validateLocale(locale: unknown) {\n\treturn localePredicate.parse(locale);\n}\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = s.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tReturnType extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType {\n\ts.instance(ExpectedInstanceOf).parse(input);\n}\n\nexport const localizationMapPredicate = s\n\t.object(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s.string().nullish()])))\n\t.strict()\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateLocalizationMap(value: unknown): asserts value is LocalizationMap {\n\tlocalizationMapPredicate.parse(value);\n}\n\nconst dmPermissionPredicate = s.boolean().nullish();\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s\n\t.union([\n\t\ts.bigint().transform((value) => value.toString()),\n\t\ts\n\t\t\t.number()\n\t\t\t.safeInt()\n\t\t\t.transform((value) => value.toString()),\n\t\ts.string().regex(/^\\d+$/),\n\t])\n\t.nullish();\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport function validateNSFW(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport const contextsPredicate = s.array(\n\ts.nativeEnum(InteractionContextType).setValidationEnabled(isValidationEnabled),\n);\n\nexport const integrationTypesPredicate = s.array(\n\ts.nativeEnum(ApplicationIntegrationType).setValidationEnabled(isValidationEnabled),\n);\n","import type {\n\tAPIApplicationCommandOption,\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocalizationMap,\n\tPermissions,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommand } from './mixins/SharedSlashCommand.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\nimport { SharedSlashCommandSubcommands } from './mixins/SharedSubcommands.js';\n\n/**\n * A builder that creates API-compatible JSON data for slash commands.\n */\n@mix(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * The options of this command.\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * The contexts for this command.\n\t */\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t * @deprecated\n\t * Use {@link SlashCommandBuilder.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The integration types for this command.\n\t */\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\t/**\n\t * Whether this command is NSFW.\n\t */\n\tpublic readonly nsfw: boolean | undefined = undefined;\n}\n\nexport interface SlashCommandBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tSharedSlashCommandSubcommands,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface specifically for slash command subcommands.\n */\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandSubcommands,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface specifically for slash command options.\n */\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface that ensures the `toJSON()` call will return something\n * that can be serialized into API-compatible data.\n */\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n","import type { LocaleString, LocalizationMap } from 'discord-api-types/v10';\nimport { validateDescription, validateLocale, validateName } from '../Assertions.js';\n\n/**\n * This mixin holds name and description symbols for slash commands.\n */\nexport class SharedNameAndDescription {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name!: string;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description!: string;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this command.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames)) {\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a description localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedDescription - The localized description for the given locale\n\t */\n\tpublic setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null) {\n\t\tif (!this.description_localizations) {\n\t\t\tReflect.set(this, 'description_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedDescription === null) {\n\t\t\tthis.description_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateDescription(localizedDescription);\n\n\t\tthis.description_localizations![parsedLocale] = localizedDescription;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description localizations for this command.\n\t *\n\t * @param localizedDescriptions - The object of localized descriptions to set\n\t */\n\tpublic setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null) {\n\t\tif (localizedDescriptions === null) {\n\t\t\tReflect.set(this, 'description_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'description_localizations', {});\n\t\tfor (const args of Object.entries(localizedDescriptions)) {\n\t\t\tthis.setDescriptionLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n}\n","import {\n\tApplicationCommandType,\n\ttype ApplicationIntegrationType,\n\ttype InteractionContextType,\n\ttype LocalizationMap,\n\ttype Permissions,\n\ttype RESTPostAPIChatInputApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport type { RestOrArray } from '../../../util/normalizeArray.js';\nimport { normalizeArray } from '../../../util/normalizeArray.js';\nimport {\n\tcontextsPredicate,\n\tintegrationTypesPredicate,\n\tvalidateDMPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDefaultPermission,\n\tvalidateLocalizationMap,\n\tvalidateNSFW,\n\tvalidateRequiredParameters,\n} from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder.js';\n\n/**\n * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.\n */\nexport class SharedSlashCommand {\n\tpublic readonly name: string = undefined!;\n\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\tpublic readonly description: string = undefined!;\n\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * @deprecated Use {@link SharedSlashCommand.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\tpublic readonly nsfw: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the contexts of this command.\n\t *\n\t * @param contexts - The contexts\n\t */\n\tpublic setContexts(...contexts: RestOrArray) {\n\t\tReflect.set(this, 'contexts', contextsPredicate.parse(normalizeArray(contexts)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the integration types of this command.\n\t *\n\t * @param integrationTypes - The integration types\n\t */\n\tpublic setIntegrationTypes(...integrationTypes: RestOrArray) {\n\t\tReflect.set(this, 'integration_types', integrationTypesPredicate.parse(normalizeArray(integrationTypes)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether or not to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run the command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated\n\t * Use {@link SharedSlashCommand.setContexts} instead.\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this command is NSFW.\n\t *\n\t * @param nsfw - Whether this command is NSFW\n\t */\n\tpublic setNSFW(nsfw = true) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateNSFW(nsfw);\n\t\tReflect.set(this, 'nsfw', nsfw);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\treturn {\n\t\t\t...this,\n\t\t\ttype: ApplicationCommandType.ChatInput,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandAttachmentOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command attachment option.\n */\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired, validateLocalizationMap } from '../Assertions.js';\nimport { SharedNameAndDescription } from './NameAndDescription.js';\n\n/**\n * The base application command option builder that contains common symbols for application command builders.\n */\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option is required.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Sets whether this option is required.\n\t *\n\t * @param required - Whether this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\t/**\n\t * This method runs required validators on this builder.\n\t */\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Validate localizations\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandBooleanOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command boolean option.\n */\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandChannelOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.js';\n\n/**\n * A slash command channel option.\n */\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { s } from '@sapphire/shapeshift';\nimport { ChannelType } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../../util/normalizeArray';\n\n/**\n * The allowed channel types used for a channel option in a slash command builder.\n *\n * @privateRemarks This can't be dynamic because const enums are erased at runtime.\n * @internal\n */\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildAnnouncement,\n\tChannelType.AnnouncementThread,\n\tChannelType.PublicThread,\n\tChannelType.PrivateThread,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildForum,\n\tChannelType.GuildMedia,\n] as const;\n\n/**\n * The type of allowed channel types used for a channel option.\n */\nexport type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];\n\nconst channelTypesPredicate = s.array(s.union(allowedChannelTypes.map((type) => s.literal(type))));\n\n/**\n * This mixin holds channel type symbols used for options.\n */\nexport class ApplicationCommandOptionChannelTypesMixin {\n\t/**\n\t * The channel types of this option.\n\t */\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option.\n\t *\n\t * @param channelTypes - The channel types\n\t */\n\tpublic addChannelTypes(...channelTypes: RestOrArray) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tthis.channel_types!.push(...channelTypesPredicate.parse(normalizeArray(channelTypes)));\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandIntegerOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst numberValidator = s.number().int();\n\n/**\n * A slash command integer option.\n */\n@mix(\n\tApplicationCommandNumericOptionMinMaxValueMixin,\n\tApplicationCommandOptionWithAutocompleteMixin,\n\tApplicationCommandOptionWithChoicesMixin,\n)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandIntegerOption;\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","/**\n * This mixin holds minimum and maximum symbols used for options.\n */\nexport abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\t/**\n\t * The maximum value of this option.\n\t */\n\tpublic readonly max_value?: number;\n\n\t/**\n\t * The minimum value of this option.\n\t */\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option.\n\t *\n\t * @param max - The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option.\n\t *\n\t * @param min - The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { s } from '@sapphire/shapeshift';\nimport type { ApplicationCommandOptionType } from 'discord-api-types/v10';\n\nconst booleanPredicate = s.boolean();\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithAutocompleteMixin {\n\t/**\n\t * Whether this option utilizes autocomplete.\n\t */\n\tpublic readonly autocomplete?: boolean;\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option uses autocomplete.\n\t *\n\t * @param autocomplete - Whether this option should use autocomplete\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && 'choices' in this && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../../util/normalizeArray.js';\nimport { localizationMapPredicate, validateChoicesLength } from '../Assertions.js';\n\nconst stringPredicate = s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);\nconst numberPredicate = s.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);\nconst choicesPredicate = s\n\t.object({\n\t\tname: stringPredicate,\n\t\tname_localizations: localizationMapPredicate,\n\t\tvalue: s.union([stringPredicate, numberPredicate]),\n\t})\n\t.array();\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithChoicesMixin {\n\t/**\n\t * The choices of this option.\n\t */\n\tpublic readonly choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices to this option.\n\t *\n\t * @param choices - The choices to add\n\t */\n\tpublic addChoices(...choices: RestOrArray>): this {\n\t\tconst normalizedChoices = normalizeArray(choices);\n\t\tif (normalizedChoices.length > 0 && 'autocomplete' in this && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(normalizedChoices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(normalizedChoices.length, this.choices);\n\n\t\tfor (const { name, name_localizations, value } of normalizedChoices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, name_localizations, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets multiple choices for this option.\n\t *\n\t * @param choices - The choices to set\n\t */\n\tpublic setChoices>(...choices: RestOrArray): this {\n\t\tconst normalizedChoices = normalizeArray(choices);\n\t\tif (normalizedChoices.length > 0 && 'autocomplete' in this && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(normalizedChoices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(normalizedChoices);\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandMentionableOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command mentionable option.\n */\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandNumberOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst numberValidator = s.number();\n\n/**\n * A slash command number option.\n */\n@mix(\n\tApplicationCommandNumericOptionMinMaxValueMixin,\n\tApplicationCommandOptionWithAutocompleteMixin,\n\tApplicationCommandOptionWithChoicesMixin,\n)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandNumberOption;\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandRoleOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command role option.\n */\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandStringOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst minLengthValidator = s.number().greaterThanOrEqual(0).lessThanOrEqual(6_000);\nconst maxLengthValidator = s.number().greaterThanOrEqual(1).lessThanOrEqual(6_000);\n\n/**\n * A slash command string option.\n */\n@mix(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\t/**\n\t * The maximum length of this option.\n\t */\n\tpublic readonly max_length?: number;\n\n\t/**\n\t * The minimum length of this option.\n\t */\n\tpublic readonly min_length?: number;\n\n\t/**\n\t * Sets the maximum length of this string option.\n\t *\n\t * @param max - The maximum length this option can be\n\t */\n\tpublic setMaxLength(max: number): this {\n\t\tmaxLengthValidator.parse(max);\n\n\t\tReflect.set(this, 'max_length', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of this string option.\n\t *\n\t * @param min - The minimum length this option can be\n\t */\n\tpublic setMinLength(min: number): this {\n\t\tminLengthValidator.parse(min);\n\n\t\tReflect.set(this, 'min_length', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandStringOption;\n\t}\n}\n\nexport interface SlashCommandStringOption\n\textends ApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandUserOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command user option.\n */\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandAttachmentOption } from '../options/attachment.js';\nimport { SlashCommandBooleanOption } from '../options/boolean.js';\nimport { SlashCommandChannelOption } from '../options/channel.js';\nimport { SlashCommandIntegerOption } from '../options/integer.js';\nimport { SlashCommandMentionableOption } from '../options/mentionable.js';\nimport { SlashCommandNumberOption } from '../options/number.js';\nimport { SlashCommandRoleOption } from '../options/role.js';\nimport { SlashCommandStringOption } from '../options/string.js';\nimport { SlashCommandUserOption } from '../options/user.js';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase.js';\n\n/**\n * This mixin holds symbols that can be shared in slash command options.\n *\n * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option.\n */\nexport class SharedSlashCommandOptions<\n\tTypeAfterAddingOptions extends SharedSlashCommandOptions,\n> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\t/**\n\t * Where the actual adding magic happens. ✨\n\t *\n\t * @param input - The input. What else?\n\t * @param Instance - The instance of whatever is being added\n\t * @internal\n\t */\n\tprivate _sharedAddOptionMethod(\n\t\tinput: OptionBuilder | ((builder: OptionBuilder) => OptionBuilder),\n\t\tInstance: new () => OptionBuilder,\n\t): TypeAfterAddingOptions {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingOptions;\n\t}\n}\n","import {\n\tApplicationCommandOptionType,\n\ttype APIApplicationCommandSubcommandGroupOption,\n\ttype APIApplicationCommandSubcommandOption,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * Represents a folder for subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands within this subcommand group.\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * A builder that creates API-compatible JSON data for slash command subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options within this subcommand.\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions {}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder.js';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from '../SlashCommandSubcommands.js';\n\n/**\n * This mixin holds symbols that can be shared in slash subcommands.\n *\n * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.\n */\nexport class SharedSlashCommandSubcommands<\n\tTypeAfterAddingSubcommands extends SharedSlashCommandSubcommands,\n> {\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Adds a new subcommand group to this command.\n\t *\n\t * @param input - A function that returns a subcommand group builder or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): TypeAfterAddingSubcommands {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingSubcommands;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): TypeAfterAddingSubcommands {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingSubcommands;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandType, ApplicationIntegrationType, InteractionContextType } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder.js';\n\nconst namePredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t// eslint-disable-next-line prefer-named-capture-group\n\t.regex(/^( *[\\p{P}\\p{L}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}]+ *)+$/u)\n\t.setValidationEnabled(isValidationEnabled);\nconst typePredicate = s\n\t.union([s.literal(ApplicationCommandType.User), s.literal(ApplicationCommandType.Message)])\n\t.setValidationEnabled(isValidationEnabled);\nconst booleanPredicate = s.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst dmPermissionPredicate = s.boolean().nullish();\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s\n\t.union([\n\t\ts.bigint().transform((value) => value.toString()),\n\t\ts\n\t\t\t.number()\n\t\t\t.safeInt()\n\t\t\t.transform((value) => value.toString()),\n\t\ts.string().regex(/^\\d+$/),\n\t])\n\t.nullish();\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport const contextsPredicate = s.array(\n\ts.nativeEnum(InteractionContextType).setValidationEnabled(isValidationEnabled),\n);\n\nexport const integrationTypesPredicate = s.array(\n\ts.nativeEnum(ApplicationIntegrationType).setValidationEnabled(isValidationEnabled),\n);\n","import type {\n\tApplicationCommandType,\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocaleString,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIContextMenuApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport type { RestOrArray } from '../../util/normalizeArray.js';\nimport { normalizeArray } from '../../util/normalizeArray.js';\nimport { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js';\nimport {\n\tvalidateRequiredParameters,\n\tvalidateName,\n\tvalidateType,\n\tvalidateDefaultPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDMPermission,\n\tcontextsPredicate,\n\tintegrationTypesPredicate,\n} from './Assertions.js';\n\n/**\n * The type a context menu command can be.\n */\nexport type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;\n\n/**\n * A builder that creates API-compatible JSON data for context menu commands.\n */\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The type of this command.\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * The contexts for this command.\n\t */\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t * @deprecated\n\t * Use {@link ContextMenuCommandBuilder.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The integration types for this command.\n\t */\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\t/**\n\t * Sets the contexts of this command.\n\t *\n\t * @param contexts - The contexts\n\t */\n\tpublic setContexts(...contexts: RestOrArray) {\n\t\tReflect.set(this, 'contexts', contextsPredicate.parse(normalizeArray(contexts)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets integration types of this command.\n\t *\n\t * @param integrationTypes - The integration types\n\t */\n\tpublic setIntegrationTypes(...integrationTypes: RestOrArray) {\n\t\tReflect.set(this, 'integration_types', integrationTypesPredicate.parse(normalizeArray(integrationTypes)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type of this command.\n\t *\n\t * @param type - The type to use\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run this command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead.\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames))\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\n/**\n * Calculates the length of the embed.\n *\n * @param data - The embed data to check\n */\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA;AAAA,sCAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAkB;;;ACAlB,IAAI,WAAW;AAOR,SAAS,mBAAmB;AAClC,SAAQ,WAAW;AACpB;AAFgB;AAST,SAAS,oBA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AAAA,IACR;AAEA,YAAQ,IAAI,MAAM,sBAAsB,CAAC,CAAC;AAE1C,eAAW,QAAQ,OAAO,QAAQ,cAAc;AAC/C,WAAK,oBAAoB,GAAI,IAAsC;AACpE,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,SAA4D;AAClE,IAAAI,4BAA2B,KAAK,MAAM,KAAK,IAAI;AAE/C,4BAAwB,KAAK,kBAAkB;AAE/C,WAAO,EAAE,GAAG,KAAK;AAAA,EAClB;AACD;;;ACvOO,SAAS,YAAY,MAAgB;AAC3C,UACE,KAAK,OAAO,UAAU,MACtB,KAAK,aAAa,UAAU,MAC5B,KAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,CAAC,KAAK,MACvF,KAAK,QAAQ,KAAK,UAAU,MAC5B,KAAK,QAAQ,KAAK,UAAU;AAE/B;AARgB;;;A5CgET,IAAM,UAAU;","names":["Assertions_exports","Assertions_exports","import_shapeshift","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","import_v10","Assertions_exports","placeholderValidator","import_shapeshift","import_v10","placeholderValidator","placeholderValidator","isEqual","Assertions_exports","validateRequiredParameters","import_shapeshift","validateRequiredParameters","validateRequiredParameters","Assertions_exports","validateRequiredParameters","import_shapeshift","import_v10","descriptionPredicate","validateRequiredParameters","import_ts_mixer","import_v10","validateRequiredParameters","import_v10","validateRequiredParameters","import_v10","import_v10","import_shapeshift","import_v10","import_shapeshift","import_v10","import_ts_mixer","import_shapeshift","booleanPredicate","import_shapeshift","import_v10","import_v10","import_shapeshift","import_v10","import_ts_mixer","numberValidator","import_v10","import_shapeshift","import_v10","import_ts_mixer","minLengthValidator","maxLengthValidator","import_v10","import_v10","import_ts_mixer","validateRequiredParameters","Assertions_exports","contextsPredicate","integrationTypesPredicate","validateDMPermission","validateDefaultMemberPermissions","validateDefaultPermission","validateName","validateRequiredParameters","import_shapeshift","import_v10","namePredicate","booleanPredicate","validateDefaultPermission","validateName","validateRequiredParameters","dmPermissionPredicate","validateDMPermission","memberPermissionPredicate","validateDefaultMemberPermissions","contextsPredicate","integrationTypesPredicate","contextsPredicate","integrationTypesPredicate","validateName","validateDefaultPermission","validateDefaultMemberPermissions","validateDMPermission","validateRequiredParameters"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.mjs b/node_modules/@discordjs/builders/dist/index.mjs new file mode 100644 index 0000000..1ae27c5 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.mjs @@ -0,0 +1,2859 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __decorateClass = (decorators, target, key, kind) => { + var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; + for (var i = decorators.length - 1, decorator; i >= 0; i--) + if (decorator = decorators[i]) + result = (kind ? decorator(target, key, result) : decorator(result)) || result; + if (kind && result) __defProp(target, key, result); + return result; +}; + +// src/messages/embed/Assertions.ts +var Assertions_exports = {}; +__export(Assertions_exports, { + RGBPredicate: () => RGBPredicate, + authorNamePredicate: () => authorNamePredicate, + colorPredicate: () => colorPredicate, + descriptionPredicate: () => descriptionPredicate, + embedAuthorPredicate: () => embedAuthorPredicate, + embedFieldPredicate: () => embedFieldPredicate, + embedFieldsArrayPredicate: () => embedFieldsArrayPredicate, + embedFooterPredicate: () => embedFooterPredicate, + fieldInlinePredicate: () => fieldInlinePredicate, + fieldLengthPredicate: () => fieldLengthPredicate, + fieldNamePredicate: () => fieldNamePredicate, + fieldValuePredicate: () => fieldValuePredicate, + footerTextPredicate: () => footerTextPredicate, + imageURLPredicate: () => imageURLPredicate, + timestampPredicate: () => timestampPredicate, + titlePredicate: () => titlePredicate, + urlPredicate: () => urlPredicate, + validateFieldLength: () => validateFieldLength +}); +import { s } from "@sapphire/shapeshift"; + +// src/util/validation.ts +var validate = true; +function enableValidators() { + return validate = true; +} +__name(enableValidators, "enableValidators"); +function disableValidators() { + return validate = false; +} +__name(disableValidators, "disableValidators"); +function isValidationEnabled() { + return validate; +} +__name(isValidationEnabled, "isValidationEnabled"); + +// src/messages/embed/Assertions.ts +var fieldNamePredicate = s.string().lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled); +var fieldValuePredicate = s.string().lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled); +var fieldInlinePredicate = s.boolean().optional(); +var embedFieldPredicate = s.object({ + name: fieldNamePredicate, + value: fieldValuePredicate, + inline: fieldInlinePredicate +}).setValidationEnabled(isValidationEnabled); +var embedFieldsArrayPredicate = embedFieldPredicate.array().setValidationEnabled(isValidationEnabled); +var fieldLengthPredicate = s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateFieldLength(amountAdding, fields) { + fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding); +} +__name(validateFieldLength, "validateFieldLength"); +var authorNamePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled); +var imageURLPredicate = s.string().url({ + allowedProtocols: ["http:", "https:", "attachment:"] +}).nullish().setValidationEnabled(isValidationEnabled); +var urlPredicate = s.string().url({ + allowedProtocols: ["http:", "https:"] +}).nullish().setValidationEnabled(isValidationEnabled); +var embedAuthorPredicate = s.object({ + name: authorNamePredicate, + iconURL: imageURLPredicate, + url: urlPredicate +}).setValidationEnabled(isValidationEnabled); +var RGBPredicate = s.number().int().greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled); +var colorPredicate = s.number().int().greaterThanOrEqual(0).lessThanOrEqual(16777215).or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable().setValidationEnabled(isValidationEnabled); +var descriptionPredicate = s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable().setValidationEnabled(isValidationEnabled); +var footerTextPredicate = s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable().setValidationEnabled(isValidationEnabled); +var embedFooterPredicate = s.object({ + text: footerTextPredicate, + iconURL: imageURLPredicate +}).setValidationEnabled(isValidationEnabled); +var timestampPredicate = s.union([s.number(), s.date()]).nullable().setValidationEnabled(isValidationEnabled); +var titlePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled); + +// src/util/normalizeArray.ts +function normalizeArray(arr) { + if (Array.isArray(arr[0])) return [...arr[0]]; + return arr; +} +__name(normalizeArray, "normalizeArray"); + +// src/messages/embed/Embed.ts +var EmbedBuilder = class { + static { + __name(this, "EmbedBuilder"); + } + /** + * The API data associated with this embed. + */ + data; + /** + * Creates a new embed from API data. + * + * @param data - The API data to create this embed with + */ + constructor(data = {}) { + this.data = { ...data }; + if (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString(); + } + /** + * Appends fields to the embed. + * + * @remarks + * This method accepts either an array of fields or a variable number of field parameters. + * The maximum amount of fields that can be added is 25. + * @example + * Using an array: + * ```ts + * const fields: APIEmbedField[] = ...; + * const embed = new EmbedBuilder() + * .addFields(fields); + * ``` + * @example + * Using rest parameters (variadic): + * ```ts + * const embed = new EmbedBuilder() + * .addFields( + * { name: 'Field 1', value: 'Value 1' }, + * { name: 'Field 2', value: 'Value 2' }, + * ); + * ``` + * @param fields - The fields to add + */ + addFields(...fields) { + const normalizedFields = normalizeArray(fields); + validateFieldLength(normalizedFields.length, this.data.fields); + embedFieldsArrayPredicate.parse(normalizedFields); + if (this.data.fields) this.data.fields.push(...normalizedFields); + else this.data.fields = normalizedFields; + return this; + } + /** + * Removes, replaces, or inserts fields for this embed. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}. + * The maximum amount of fields that can be added is 25. + * + * It's useful for modifying and adjusting order of the already-existing fields of an embed. + * @example + * Remove the first field: + * ```ts + * embed.spliceFields(0, 1); + * ``` + * @example + * Remove the first n fields: + * ```ts + * const n = 4; + * embed.spliceFields(0, n); + * ``` + * @example + * Remove the last field: + * ```ts + * embed.spliceFields(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of fields to remove + * @param fields - The replacing field objects + */ + spliceFields(index, deleteCount, ...fields) { + validateFieldLength(fields.length - deleteCount, this.data.fields); + embedFieldsArrayPredicate.parse(fields); + if (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields); + else this.data.fields = fields; + return this; + } + /** + * Sets the fields for this embed. + * + * @remarks + * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically, + * it splices the entire array of fields, replacing them with the provided fields. + * + * You can set a maximum of 25 fields. + * @param fields - The fields to set + */ + setFields(...fields) { + this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields)); + return this; + } + /** + * Sets the author of this embed. + * + * @param options - The options to use + */ + setAuthor(options) { + if (options === null) { + this.data.author = void 0; + return this; + } + embedAuthorPredicate.parse(options); + this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL }; + return this; + } + /** + * Sets the color of this embed. + * + * @param color - The color to use + */ + setColor(color) { + colorPredicate.parse(color); + if (Array.isArray(color)) { + const [red, green, blue] = color; + this.data.color = (red << 16) + (green << 8) + blue; + return this; + } + this.data.color = color ?? void 0; + return this; + } + /** + * Sets the description of this embed. + * + * @param description - The description to use + */ + setDescription(description) { + descriptionPredicate.parse(description); + this.data.description = description ?? void 0; + return this; + } + /** + * Sets the footer of this embed. + * + * @param options - The footer to use + */ + setFooter(options) { + if (options === null) { + this.data.footer = void 0; + return this; + } + embedFooterPredicate.parse(options); + this.data.footer = { text: options.text, icon_url: options.iconURL }; + return this; + } + /** + * Sets the image of this embed. + * + * @param url - The image URL to use + */ + setImage(url) { + imageURLPredicate.parse(url); + this.data.image = url ? { url } : void 0; + return this; + } + /** + * Sets the thumbnail of this embed. + * + * @param url - The thumbnail URL to use + */ + setThumbnail(url) { + imageURLPredicate.parse(url); + this.data.thumbnail = url ? { url } : void 0; + return this; + } + /** + * Sets the timestamp of this embed. + * + * @param timestamp - The timestamp or date to use + */ + setTimestamp(timestamp = Date.now()) { + timestampPredicate.parse(timestamp); + this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0; + return this; + } + /** + * Sets the title for this embed. + * + * @param title - The title to use + */ + setTitle(title) { + titlePredicate.parse(title); + this.data.title = title ?? void 0; + return this; + } + /** + * Sets the URL of this embed. + * + * @param url - The URL to use + */ + setURL(url) { + urlPredicate.parse(url); + this.data.url = url ?? void 0; + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + return { ...this.data }; + } +}; + +// src/index.ts +export * from "@discordjs/formatters"; + +// src/components/Assertions.ts +var Assertions_exports2 = {}; +__export(Assertions_exports2, { + buttonLabelValidator: () => buttonLabelValidator, + buttonStyleValidator: () => buttonStyleValidator, + channelTypesValidator: () => channelTypesValidator, + customIdValidator: () => customIdValidator, + defaultValidator: () => defaultValidator, + disabledValidator: () => disabledValidator, + emojiValidator: () => emojiValidator, + jsonOptionValidator: () => jsonOptionValidator, + labelValueDescriptionValidator: () => labelValueDescriptionValidator, + minMaxValidator: () => minMaxValidator, + optionValidator: () => optionValidator, + optionsLengthValidator: () => optionsLengthValidator, + optionsValidator: () => optionsValidator, + placeholderValidator: () => placeholderValidator, + urlValidator: () => urlValidator, + validateRequiredButtonParameters: () => validateRequiredButtonParameters, + validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters, + validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters +}); +import { s as s2 } from "@sapphire/shapeshift"; +import { ButtonStyle, ChannelType } from "discord-api-types/v10"; + +// src/components/selectMenu/StringSelectMenuOption.ts +var StringSelectMenuOptionBuilder = class { + /** + * Creates a new string select menu option from API data. + * + * @param data - The API data to create this string select menu option with + * @example + * Creating a string select menu option from an API data object: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * label: 'catchy label', + * value: '1', + * }); + * ``` + * @example + * Creating a string select menu option using setters and API data: + * ```ts + * const selectMenuOption = new SelectMenuOptionBuilder({ + * default: true, + * value: '1', + * }) + * .setLabel('woah'); + * ``` + */ + constructor(data = {}) { + this.data = data; + } + static { + __name(this, "StringSelectMenuOptionBuilder"); + } + /** + * Sets the label for this option. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = labelValueDescriptionValidator.parse(label); + return this; + } + /** + * Sets the value for this option. + * + * @param value - The value to use + */ + setValue(value) { + this.data.value = labelValueDescriptionValidator.parse(value); + return this; + } + /** + * Sets the description for this option. + * + * @param description - The description to use + */ + setDescription(description) { + this.data.description = labelValueDescriptionValidator.parse(description); + return this; + } + /** + * Sets whether this option is selected by default. + * + * @param isDefault - Whether this option is selected by default + */ + setDefault(isDefault = true) { + this.data.default = defaultValidator.parse(isDefault); + return this; + } + /** + * Sets the emoji to display for this option. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji) { + this.data.emoji = emojiValidator.parse(emoji); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value); + return { + ...this.data + }; + } +}; + +// src/components/Assertions.ts +var customIdValidator = s2.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var emojiValidator = s2.object({ + id: s2.string(), + name: s2.string(), + animated: s2.boolean() +}).partial().strict().setValidationEnabled(isValidationEnabled); +var disabledValidator = s2.boolean(); +var buttonLabelValidator = s2.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled); +var buttonStyleValidator = s2.nativeEnum(ButtonStyle); +var placeholderValidator = s2.string().lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled); +var minMaxValidator = s2.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +var labelValueDescriptionValidator = s2.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var jsonOptionValidator = s2.object({ + label: labelValueDescriptionValidator, + value: labelValueDescriptionValidator, + description: labelValueDescriptionValidator.optional(), + emoji: emojiValidator.optional(), + default: s2.boolean().optional() +}).setValidationEnabled(isValidationEnabled); +var optionValidator = s2.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled); +var optionsValidator = optionValidator.array().lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled); +var optionsLengthValidator = s2.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateRequiredSelectMenuParameters(options, customId) { + customIdValidator.parse(customId); + optionsValidator.parse(options); +} +__name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters"); +var defaultValidator = s2.boolean(); +function validateRequiredSelectMenuOptionParameters(label, value) { + labelValueDescriptionValidator.parse(label); + labelValueDescriptionValidator.parse(value); +} +__name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters"); +var channelTypesValidator = s2.nativeEnum(ChannelType).array().setValidationEnabled(isValidationEnabled); +var urlValidator = s2.string().url({ + allowedProtocols: ["http:", "https:", "discord:"] +}).setValidationEnabled(isValidationEnabled); +function validateRequiredButtonParameters(style, label, emoji, customId, skuId, url) { + if (style === ButtonStyle.Premium) { + if (!skuId) { + throw new RangeError("Premium buttons must have an SKU id."); + } + if (customId || label || url || emoji) { + throw new RangeError("Premium buttons cannot have a custom id, label, URL, or emoji."); + } + } else { + if (skuId) { + throw new RangeError("Non-premium buttons must not have an SKU id."); + } + if (url && customId) { + throw new RangeError("URL and custom id are mutually exclusive."); + } + if (!label && !emoji) { + throw new RangeError("Non-premium buttons must have a label and/or an emoji."); + } + if (style === ButtonStyle.Link) { + if (!url) { + throw new RangeError("Link buttons must have a URL."); + } + } else if (url) { + throw new RangeError("Non-premium and non-link buttons cannot have a URL."); + } + } +} +__name(validateRequiredButtonParameters, "validateRequiredButtonParameters"); + +// src/components/ActionRow.ts +import { + ComponentType as ComponentType9 +} from "discord-api-types/v10"; + +// src/components/Component.ts +var ComponentBuilder = class { + static { + __name(this, "ComponentBuilder"); + } + /** + * The API data associated with this component. + */ + data; + /** + * Constructs a new kind of component. + * + * @param data - The data to construct a component out of + */ + constructor(data) { + this.data = data; + } +}; + +// src/components/Components.ts +import { ComponentType as ComponentType8 } from "discord-api-types/v10"; + +// src/components/button/Button.ts +import { + ComponentType +} from "discord-api-types/v10"; +var ButtonBuilder = class extends ComponentBuilder { + static { + __name(this, "ButtonBuilder"); + } + /** + * Creates a new button from API data. + * + * @param data - The API data to create this button with + * @example + * Creating a button from an API data object: + * ```ts + * const button = new ButtonBuilder({ + * custom_id: 'a cool button', + * style: ButtonStyle.Primary, + * label: 'Click Me', + * emoji: { + * name: 'smile', + * id: '123456789012345678', + * }, + * }); + * ``` + * @example + * Creating a button using setters and API data: + * ```ts + * const button = new ButtonBuilder({ + * style: ButtonStyle.Secondary, + * label: 'Click Me', + * }) + * .setEmoji({ name: '🙂' }) + * .setCustomId('another cool button'); + * ``` + */ + constructor(data) { + super({ type: ComponentType.Button, ...data }); + } + /** + * Sets the style of this button. + * + * @param style - The style to use + */ + setStyle(style) { + this.data.style = buttonStyleValidator.parse(style); + return this; + } + /** + * Sets the URL for this button. + * + * @remarks + * This method is only available to buttons using the `Link` button style. + * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`. + * @param url - The URL to use + */ + setURL(url) { + this.data.url = urlValidator.parse(url); + return this; + } + /** + * Sets the custom id for this button. + * + * @remarks + * This method is only applicable to buttons that are not using the `Link` button style. + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets the SKU id that represents a purchasable SKU for this button. + * + * @remarks Only available when using premium-style buttons. + * @param skuId - The SKU id to use + */ + setSKUId(skuId) { + this.data.sku_id = skuId; + return this; + } + /** + * Sets the emoji to display on this button. + * + * @param emoji - The emoji to use + */ + setEmoji(emoji) { + this.data.emoji = emojiValidator.parse(emoji); + return this; + } + /** + * Sets whether this button is disabled. + * + * @param disabled - Whether to disable this button + */ + setDisabled(disabled = true) { + this.data.disabled = disabledValidator.parse(disabled); + return this; + } + /** + * Sets the label for this button. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = buttonLabelValidator.parse(label); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredButtonParameters( + this.data.style, + this.data.label, + this.data.emoji, + this.data.custom_id, + this.data.sku_id, + this.data.url + ); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/ChannelSelectMenu.ts +import { + ComponentType as ComponentType2, + SelectMenuDefaultValueType +} from "discord-api-types/v10"; + +// src/components/selectMenu/BaseSelectMenu.ts +var BaseSelectMenuBuilder = class extends ComponentBuilder { + static { + __name(this, "BaseSelectMenuBuilder"); + } + /** + * Sets the placeholder for this select menu. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder) { + this.data.placeholder = placeholderValidator.parse(placeholder); + return this; + } + /** + * Sets the minimum values that must be selected in the select menu. + * + * @param minValues - The minimum values that must be selected + */ + setMinValues(minValues) { + this.data.min_values = minMaxValidator.parse(minValues); + return this; + } + /** + * Sets the maximum values that must be selected in the select menu. + * + * @param maxValues - The maximum values that must be selected + */ + setMaxValues(maxValues) { + this.data.max_values = minMaxValidator.parse(maxValues); + return this; + } + /** + * Sets the custom id for this select menu. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets whether this select menu is disabled. + * + * @param disabled - Whether this select menu is disabled + */ + setDisabled(disabled = true) { + this.data.disabled = disabledValidator.parse(disabled); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + customIdValidator.parse(this.data.custom_id); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/ChannelSelectMenu.ts +var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "ChannelSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new ChannelSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement) + * .setMinValues(2); + * ``` + */ + constructor(data) { + super({ ...data, type: ComponentType2.ChannelSelect }); + } + /** + * Adds channel types to this select menu. + * + * @param types - The channel types to use + */ + addChannelTypes(...types) { + const normalizedTypes = normalizeArray(types); + this.data.channel_types ??= []; + this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes)); + return this; + } + /** + * Sets channel types for this select menu. + * + * @param types - The channel types to use + */ + setChannelTypes(...types) { + const normalizedTypes = normalizeArray(types); + this.data.channel_types ??= []; + this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes)); + return this; + } + /** + * Adds default channels to this auto populated select menu. + * + * @param channels - The channels to add + */ + addDefaultChannels(...channels) { + const normalizedValues = normalizeArray(channels); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType.Channel + })) + ); + return this; + } + /** + * Sets default channels for this auto populated select menu. + * + * @param channels - The channels to set + */ + setDefaultChannels(...channels) { + const normalizedValues = normalizeArray(channels); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType.Channel + })); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + customIdValidator.parse(this.data.custom_id); + return { + ...this.data + }; + } +}; + +// src/components/selectMenu/MentionableSelectMenu.ts +import { + ComponentType as ComponentType3, + SelectMenuDefaultValueType as SelectMenuDefaultValueType2 +} from "discord-api-types/v10"; +var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "MentionableSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new MentionableSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: ComponentType3.MentionableSelect }); + } + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType2.Role + })) + ); + return this; + } + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType2.User + })) + ); + return this; + } + /** + * Adds default values to this auto populated select menu. + * + * @param values - The values to add + */ + addDefaultValues(...values) { + const normalizedValues = normalizeArray(values); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push(...normalizedValues); + return this; + } + /** + * Sets default values for this auto populated select menu. + * + * @param values - The values to set + */ + setDefaultValues(...values) { + const normalizedValues = normalizeArray(values); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues; + return this; + } +}; + +// src/components/selectMenu/RoleSelectMenu.ts +import { + ComponentType as ComponentType4, + SelectMenuDefaultValueType as SelectMenuDefaultValueType3 +} from "discord-api-types/v10"; +var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "RoleSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new RoleSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: ComponentType4.RoleSelect }); + } + /** + * Adds default roles to this auto populated select menu. + * + * @param roles - The roles to add + */ + addDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType3.Role + })) + ); + return this; + } + /** + * Sets default roles for this auto populated select menu. + * + * @param roles - The roles to set + */ + setDefaultRoles(...roles) { + const normalizedValues = normalizeArray(roles); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType3.Role + })); + return this; + } +}; + +// src/components/selectMenu/StringSelectMenu.ts +import { ComponentType as ComponentType5 } from "discord-api-types/v10"; +var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "StringSelectMenuBuilder"); + } + /** + * The options within this select menu. + */ + options; + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * options: [ + * { label: 'option 1', value: '1' }, + * { label: 'option 2', value: '2' }, + * { label: 'option 3', value: '3' }, + * ], + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new StringSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1) + * .addOptions({ + * label: 'Catchy', + * value: 'catch', + * }); + * ``` + */ + constructor(data) { + const { options, ...initData } = data ?? {}; + super({ ...initData, type: ComponentType5.StringSelect }); + this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? []; + } + /** + * Adds options to this select menu. + * + * @param options - The options to add + */ + addOptions(...options) { + const normalizedOptions = normalizeArray(options); + optionsLengthValidator.parse(this.options.length + normalizedOptions.length); + this.options.push( + ...normalizedOptions.map( + (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)) + ) + ); + return this; + } + /** + * Sets the options for this select menu. + * + * @param options - The options to set + */ + setOptions(...options) { + return this.spliceOptions(0, this.options.length, ...options); + } + /** + * Removes, replaces, or inserts options for this select menu. + * + * @remarks + * This method behaves similarly + * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}. + * It's useful for modifying and adjusting the order of existing options. + * @example + * Remove the first option: + * ```ts + * selectMenu.spliceOptions(0, 1); + * ``` + * @example + * Remove the first n option: + * ```ts + * const n = 4; + * selectMenu.spliceOptions(0, n); + * ``` + * @example + * Remove the last option: + * ```ts + * selectMenu.spliceOptions(-1, 1); + * ``` + * @param index - The index to start at + * @param deleteCount - The number of options to remove + * @param options - The replacing option objects or builders + */ + spliceOptions(index, deleteCount, ...options) { + const normalizedOptions = normalizeArray(options); + const clone = [...this.options]; + clone.splice( + index, + deleteCount, + ...normalizedOptions.map( + (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)) + ) + ); + optionsLengthValidator.parse(clone.length); + this.options.splice(0, this.options.length, ...clone); + return this; + } + /** + * {@inheritDoc BaseSelectMenuBuilder.toJSON} + */ + toJSON() { + validateRequiredSelectMenuParameters(this.options, this.data.custom_id); + return { + ...this.data, + options: this.options.map((option) => option.toJSON()) + }; + } +}; + +// src/components/selectMenu/UserSelectMenu.ts +import { + ComponentType as ComponentType6, + SelectMenuDefaultValueType as SelectMenuDefaultValueType4 +} from "discord-api-types/v10"; +var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder { + static { + __name(this, "UserSelectMenuBuilder"); + } + /** + * Creates a new select menu from API data. + * + * @param data - The API data to create this select menu with + * @example + * Creating a select menu from an API data object: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * placeholder: 'select an option', + * max_values: 2, + * }); + * ``` + * @example + * Creating a select menu using setters and API data: + * ```ts + * const selectMenu = new UserSelectMenuBuilder({ + * custom_id: 'a cool select menu', + * }) + * .setMinValues(1); + * ``` + */ + constructor(data) { + super({ ...data, type: ComponentType6.UserSelect }); + } + /** + * Adds default users to this auto populated select menu. + * + * @param users - The users to add + */ + addDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length); + this.data.default_values ??= []; + this.data.default_values.push( + ...normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType4.User + })) + ); + return this; + } + /** + * Sets default users for this auto populated select menu. + * + * @param users - The users to set + */ + setDefaultUsers(...users) { + const normalizedValues = normalizeArray(users); + optionsLengthValidator.parse(normalizedValues.length); + this.data.default_values = normalizedValues.map((id) => ({ + id, + type: SelectMenuDefaultValueType4.User + })); + return this; + } +}; + +// src/components/textInput/TextInput.ts +import { isJSONEncodable } from "@discordjs/util"; +import { ComponentType as ComponentType7 } from "discord-api-types/v10"; +import isEqual from "fast-deep-equal"; + +// src/components/textInput/Assertions.ts +var Assertions_exports3 = {}; +__export(Assertions_exports3, { + labelValidator: () => labelValidator, + maxLengthValidator: () => maxLengthValidator, + minLengthValidator: () => minLengthValidator, + placeholderValidator: () => placeholderValidator2, + requiredValidator: () => requiredValidator, + textInputStyleValidator: () => textInputStyleValidator, + validateRequiredParameters: () => validateRequiredParameters, + valueValidator: () => valueValidator +}); +import { s as s3 } from "@sapphire/shapeshift"; +import { TextInputStyle } from "discord-api-types/v10"; +var textInputStyleValidator = s3.nativeEnum(TextInputStyle); +var minLengthValidator = s3.number().int().greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var maxLengthValidator = s3.number().int().greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var requiredValidator = s3.boolean(); +var valueValidator = s3.string().lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled); +var placeholderValidator2 = s3.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var labelValidator = s3.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled); +function validateRequiredParameters(customId, style, label) { + customIdValidator.parse(customId); + textInputStyleValidator.parse(style); + labelValidator.parse(label); +} +__name(validateRequiredParameters, "validateRequiredParameters"); + +// src/components/textInput/TextInput.ts +var TextInputBuilder = class extends ComponentBuilder { + static { + __name(this, "TextInputBuilder"); + } + /** + * Creates a new text input from API data. + * + * @param data - The API data to create this text input with + * @example + * Creating a text input from an API data object: + * ```ts + * const textInput = new TextInputBuilder({ + * custom_id: 'a cool text input', + * label: 'Type something', + * style: TextInputStyle.Short, + * }); + * ``` + * @example + * Creating a text input using setters and API data: + * ```ts + * const textInput = new TextInputBuilder({ + * label: 'Type something else', + * }) + * .setCustomId('woah') + * .setStyle(TextInputStyle.Paragraph); + * ``` + */ + constructor(data) { + super({ type: ComponentType7.TextInput, ...data }); + } + /** + * Sets the custom id for this text input. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Sets the label for this text input. + * + * @param label - The label to use + */ + setLabel(label) { + this.data.label = labelValidator.parse(label); + return this; + } + /** + * Sets the style for this text input. + * + * @param style - The style to use + */ + setStyle(style) { + this.data.style = textInputStyleValidator.parse(style); + return this; + } + /** + * Sets the minimum length of text for this text input. + * + * @param minLength - The minimum length of text for this text input + */ + setMinLength(minLength) { + this.data.min_length = minLengthValidator.parse(minLength); + return this; + } + /** + * Sets the maximum length of text for this text input. + * + * @param maxLength - The maximum length of text for this text input + */ + setMaxLength(maxLength) { + this.data.max_length = maxLengthValidator.parse(maxLength); + return this; + } + /** + * Sets the placeholder for this text input. + * + * @param placeholder - The placeholder to use + */ + setPlaceholder(placeholder) { + this.data.placeholder = placeholderValidator2.parse(placeholder); + return this; + } + /** + * Sets the value for this text input. + * + * @param value - The value to use + */ + setValue(value) { + this.data.value = valueValidator.parse(value); + return this; + } + /** + * Sets whether this text input is required. + * + * @param required - Whether this text input is required + */ + setRequired(required = true) { + this.data.required = requiredValidator.parse(required); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredParameters(this.data.custom_id, this.data.style, this.data.label); + return { + ...this.data + }; + } + /** + * Whether this is equal to another structure. + */ + equals(other) { + if (isJSONEncodable(other)) { + return isEqual(other.toJSON(), this.data); + } + return isEqual(other, this.data); + } +}; + +// src/components/Components.ts +function createComponentBuilder(data) { + if (data instanceof ComponentBuilder) { + return data; + } + switch (data.type) { + case ComponentType8.ActionRow: + return new ActionRowBuilder(data); + case ComponentType8.Button: + return new ButtonBuilder(data); + case ComponentType8.StringSelect: + return new StringSelectMenuBuilder(data); + case ComponentType8.TextInput: + return new TextInputBuilder(data); + case ComponentType8.UserSelect: + return new UserSelectMenuBuilder(data); + case ComponentType8.RoleSelect: + return new RoleSelectMenuBuilder(data); + case ComponentType8.MentionableSelect: + return new MentionableSelectMenuBuilder(data); + case ComponentType8.ChannelSelect: + return new ChannelSelectMenuBuilder(data); + default: + throw new Error(`Cannot properly serialize component type: ${data.type}`); + } +} +__name(createComponentBuilder, "createComponentBuilder"); + +// src/components/ActionRow.ts +var ActionRowBuilder = class extends ComponentBuilder { + static { + __name(this, "ActionRowBuilder"); + } + /** + * The components within this action row. + */ + components; + /** + * Creates a new action row from API data. + * + * @param data - The API data to create this action row with + * @example + * Creating an action row from an API data object: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Type something", + * style: TextInputStyle.Short, + * type: ComponentType.TextInput, + * }, + * ], + * }); + * ``` + * @example + * Creating an action row using setters and API data: + * ```ts + * const actionRow = new ActionRowBuilder({ + * components: [ + * { + * custom_id: "custom id", + * label: "Click me", + * style: ButtonStyle.Primary, + * type: ComponentType.Button, + * }, + * ], + * }) + * .addComponents(button2, button3); + * ``` + */ + constructor({ components, ...data } = {}) { + super({ type: ComponentType9.ActionRow, ...data }); + this.components = components?.map((component) => createComponentBuilder(component)) ?? []; + } + /** + * Adds components to this action row. + * + * @param components - The components to add + */ + addComponents(...components) { + this.components.push(...normalizeArray(components)); + return this; + } + /** + * Sets components for this action row. + * + * @param components - The components to set + */ + setComponents(...components) { + this.components.splice(0, this.components.length, ...normalizeArray(components)); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + return { + ...this.data, + components: this.components.map((component) => component.toJSON()) + }; + } +}; + +// src/interactions/modals/Assertions.ts +var Assertions_exports4 = {}; +__export(Assertions_exports4, { + componentsValidator: () => componentsValidator, + titleValidator: () => titleValidator, + validateRequiredParameters: () => validateRequiredParameters2 +}); +import { s as s4 } from "@sapphire/shapeshift"; +var titleValidator = s4.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled); +var componentsValidator = s4.instance(ActionRowBuilder).array().lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled); +function validateRequiredParameters2(customId, title, components) { + customIdValidator.parse(customId); + titleValidator.parse(title); + componentsValidator.parse(components); +} +__name(validateRequiredParameters2, "validateRequiredParameters"); + +// src/interactions/modals/Modal.ts +var ModalBuilder = class { + static { + __name(this, "ModalBuilder"); + } + /** + * The API data associated with this modal. + */ + data; + /** + * The components within this modal. + */ + components = []; + /** + * Creates a new modal from API data. + * + * @param data - The API data to create this modal with + */ + constructor({ components, ...data } = {}) { + this.data = { ...data }; + this.components = components?.map((component) => createComponentBuilder(component)) ?? []; + } + /** + * Sets the title of this modal. + * + * @param title - The title to use + */ + setTitle(title) { + this.data.title = titleValidator.parse(title); + return this; + } + /** + * Sets the custom id of this modal. + * + * @param customId - The custom id to use + */ + setCustomId(customId) { + this.data.custom_id = customIdValidator.parse(customId); + return this; + } + /** + * Adds components to this modal. + * + * @param components - The components to add + */ + addComponents(...components) { + this.components.push( + ...normalizeArray(components).map( + (component) => component instanceof ActionRowBuilder ? component : new ActionRowBuilder(component) + ) + ); + return this; + } + /** + * Sets components for this modal. + * + * @param components - The components to set + */ + setComponents(...components) { + this.components.splice(0, this.components.length, ...normalizeArray(components)); + return this; + } + /** + * {@inheritDoc ComponentBuilder.toJSON} + */ + toJSON() { + validateRequiredParameters2(this.data.custom_id, this.data.title, this.components); + return { + ...this.data, + components: this.components.map((component) => component.toJSON()) + }; + } +}; + +// src/interactions/slashCommands/Assertions.ts +var Assertions_exports5 = {}; +__export(Assertions_exports5, { + assertReturnOfBuilder: () => assertReturnOfBuilder, + contextsPredicate: () => contextsPredicate, + integrationTypesPredicate: () => integrationTypesPredicate, + localizationMapPredicate: () => localizationMapPredicate, + validateChoicesLength: () => validateChoicesLength, + validateDMPermission: () => validateDMPermission, + validateDefaultMemberPermissions: () => validateDefaultMemberPermissions, + validateDefaultPermission: () => validateDefaultPermission, + validateDescription: () => validateDescription, + validateLocale: () => validateLocale, + validateLocalizationMap: () => validateLocalizationMap, + validateMaxOptionsLength: () => validateMaxOptionsLength, + validateNSFW: () => validateNSFW, + validateName: () => validateName, + validateRequired: () => validateRequired, + validateRequiredParameters: () => validateRequiredParameters3 +}); +import { s as s5 } from "@sapphire/shapeshift"; +import { + ApplicationIntegrationType, + InteractionContextType, + Locale +} from "discord-api-types/v10"; +var namePredicate = s5.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled); +function validateName(name) { + namePredicate.parse(name); +} +__name(validateName, "validateName"); +var descriptionPredicate2 = s5.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled); +var localePredicate = s5.nativeEnum(Locale); +function validateDescription(description) { + descriptionPredicate2.parse(description); +} +__name(validateDescription, "validateDescription"); +var maxArrayLengthPredicate = s5.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateLocale(locale) { + return localePredicate.parse(locale); +} +__name(validateLocale, "validateLocale"); +function validateMaxOptionsLength(options) { + maxArrayLengthPredicate.parse(options); +} +__name(validateMaxOptionsLength, "validateMaxOptionsLength"); +function validateRequiredParameters3(name, description, options) { + validateName(name); + validateDescription(description); + validateMaxOptionsLength(options); +} +__name(validateRequiredParameters3, "validateRequiredParameters"); +var booleanPredicate = s5.boolean(); +function validateDefaultPermission(value) { + booleanPredicate.parse(value); +} +__name(validateDefaultPermission, "validateDefaultPermission"); +function validateRequired(required) { + booleanPredicate.parse(required); +} +__name(validateRequired, "validateRequired"); +var choicesLengthPredicate = s5.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled); +function validateChoicesLength(amountAdding, choices) { + choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding); +} +__name(validateChoicesLength, "validateChoicesLength"); +function assertReturnOfBuilder(input, ExpectedInstanceOf) { + s5.instance(ExpectedInstanceOf).parse(input); +} +__name(assertReturnOfBuilder, "assertReturnOfBuilder"); +var localizationMapPredicate = s5.object(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s5.string().nullish()]))).strict().nullish().setValidationEnabled(isValidationEnabled); +function validateLocalizationMap(value) { + localizationMapPredicate.parse(value); +} +__name(validateLocalizationMap, "validateLocalizationMap"); +var dmPermissionPredicate = s5.boolean().nullish(); +function validateDMPermission(value) { + dmPermissionPredicate.parse(value); +} +__name(validateDMPermission, "validateDMPermission"); +var memberPermissionPredicate = s5.union([ + s5.bigint().transform((value) => value.toString()), + s5.number().safeInt().transform((value) => value.toString()), + s5.string().regex(/^\d+$/) +]).nullish(); +function validateDefaultMemberPermissions(permissions) { + return memberPermissionPredicate.parse(permissions); +} +__name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions"); +function validateNSFW(value) { + booleanPredicate.parse(value); +} +__name(validateNSFW, "validateNSFW"); +var contextsPredicate = s5.array( + s5.nativeEnum(InteractionContextType).setValidationEnabled(isValidationEnabled) +); +var integrationTypesPredicate = s5.array( + s5.nativeEnum(ApplicationIntegrationType).setValidationEnabled(isValidationEnabled) +); + +// src/interactions/slashCommands/SlashCommandBuilder.ts +import { mix as mix6 } from "ts-mixer"; + +// src/interactions/slashCommands/mixins/NameAndDescription.ts +var SharedNameAndDescription = class { + static { + __name(this, "SharedNameAndDescription"); + } + /** + * The name of this command. + */ + name; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The description of this command. + */ + description; + /** + * The description localizations of this command. + */ + description_localizations; + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name) { + validateName(name); + Reflect.set(this, "name", name); + return this; + } + /** + * Sets the description of this command. + * + * @param description - The description to use + */ + setDescription(description) { + validateDescription(description); + Reflect.set(this, "description", description); + return this; + } + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale, localizedName) { + if (!this.name_localizations) { + Reflect.set(this, "name_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedName === null) { + this.name_localizations[parsedLocale] = null; + return this; + } + validateName(localizedName); + this.name_localizations[parsedLocale] = localizedName; + return this; + } + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames) { + if (localizedNames === null) { + Reflect.set(this, "name_localizations", null); + return this; + } + Reflect.set(this, "name_localizations", {}); + for (const args of Object.entries(localizedNames)) { + this.setNameLocalization(...args); + } + return this; + } + /** + * Sets a description localization for this command. + * + * @param locale - The locale to set + * @param localizedDescription - The localized description for the given locale + */ + setDescriptionLocalization(locale, localizedDescription) { + if (!this.description_localizations) { + Reflect.set(this, "description_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedDescription === null) { + this.description_localizations[parsedLocale] = null; + return this; + } + validateDescription(localizedDescription); + this.description_localizations[parsedLocale] = localizedDescription; + return this; + } + /** + * Sets the description localizations for this command. + * + * @param localizedDescriptions - The object of localized descriptions to set + */ + setDescriptionLocalizations(localizedDescriptions) { + if (localizedDescriptions === null) { + Reflect.set(this, "description_localizations", null); + return this; + } + Reflect.set(this, "description_localizations", {}); + for (const args of Object.entries(localizedDescriptions)) { + this.setDescriptionLocalization(...args); + } + return this; + } +}; + +// src/interactions/slashCommands/mixins/SharedSlashCommand.ts +import { + ApplicationCommandType +} from "discord-api-types/v10"; +var SharedSlashCommand = class { + static { + __name(this, "SharedSlashCommand"); + } + name = void 0; + name_localizations; + description = void 0; + description_localizations; + options = []; + contexts; + /** + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + default_permission = void 0; + default_member_permissions = void 0; + /** + * @deprecated Use {@link SharedSlashCommand.contexts} instead. + */ + dm_permission = void 0; + integration_types; + nsfw = void 0; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts) { + Reflect.set(this, "contexts", contextsPredicate.parse(normalizeArray(contexts))); + return this; + } + /** + * Sets the integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes) { + Reflect.set(this, "integration_types", integrationTypesPredicate.parse(normalizeArray(integrationTypes))); + return this; + } + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether or not to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + setDefaultPermission(value) { + validateDefaultPermission(value); + Reflect.set(this, "default_permission", value); + return this; + } + /** + * Sets the default permissions a member should have in order to run the command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions) { + const permissionValue = validateDefaultMemberPermissions(permissions); + Reflect.set(this, "default_member_permissions", permissionValue); + return this; + } + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated + * Use {@link SharedSlashCommand.setContexts} instead. + */ + setDMPermission(enabled) { + validateDMPermission(enabled); + Reflect.set(this, "dm_permission", enabled); + return this; + } + /** + * Sets whether this command is NSFW. + * + * @param nsfw - Whether this command is NSFW + */ + setNSFW(nsfw = true) { + validateNSFW(nsfw); + Reflect.set(this, "nsfw", nsfw); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + validateLocalizationMap(this.name_localizations); + validateLocalizationMap(this.description_localizations); + return { + ...this, + type: ApplicationCommandType.ChatInput, + options: this.options.map((option) => option.toJSON()) + }; + } +}; + +// src/interactions/slashCommands/options/attachment.ts +import { ApplicationCommandOptionType } from "discord-api-types/v10"; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts +var ApplicationCommandOptionBase = class extends SharedNameAndDescription { + static { + __name(this, "ApplicationCommandOptionBase"); + } + /** + * Whether this option is required. + * + * @defaultValue `false` + */ + required = false; + /** + * Sets whether this option is required. + * + * @param required - Whether this option should be required + */ + setRequired(required) { + validateRequired(required); + Reflect.set(this, "required", required); + return this; + } + /** + * This method runs required validators on this builder. + */ + runRequiredValidations() { + validateRequiredParameters3(this.name, this.description, []); + validateLocalizationMap(this.name_localizations); + validateLocalizationMap(this.description_localizations); + validateRequired(this.required); + } +}; + +// src/interactions/slashCommands/options/attachment.ts +var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandAttachmentOption"); + } + /** + * The type of this option. + */ + type = ApplicationCommandOptionType.Attachment; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/boolean.ts +import { ApplicationCommandOptionType as ApplicationCommandOptionType2 } from "discord-api-types/v10"; +var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandBooleanOption"); + } + /** + * The type of this option. + */ + type = ApplicationCommandOptionType2.Boolean; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/channel.ts +import { ApplicationCommandOptionType as ApplicationCommandOptionType3 } from "discord-api-types/v10"; +import { mix } from "ts-mixer"; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts +import { s as s6 } from "@sapphire/shapeshift"; +import { ChannelType as ChannelType2 } from "discord-api-types/v10"; +var allowedChannelTypes = [ + ChannelType2.GuildText, + ChannelType2.GuildVoice, + ChannelType2.GuildCategory, + ChannelType2.GuildAnnouncement, + ChannelType2.AnnouncementThread, + ChannelType2.PublicThread, + ChannelType2.PrivateThread, + ChannelType2.GuildStageVoice, + ChannelType2.GuildForum, + ChannelType2.GuildMedia +]; +var channelTypesPredicate = s6.array(s6.union(allowedChannelTypes.map((type) => s6.literal(type)))); +var ApplicationCommandOptionChannelTypesMixin = class { + static { + __name(this, "ApplicationCommandOptionChannelTypesMixin"); + } + /** + * The channel types of this option. + */ + channel_types; + /** + * Adds channel types to this option. + * + * @param channelTypes - The channel types + */ + addChannelTypes(...channelTypes) { + if (this.channel_types === void 0) { + Reflect.set(this, "channel_types", []); + } + this.channel_types.push(...channelTypesPredicate.parse(normalizeArray(channelTypes))); + return this; + } +}; + +// src/interactions/slashCommands/options/channel.ts +var SlashCommandChannelOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = ApplicationCommandOptionType3.Channel; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; +__name(SlashCommandChannelOption, "SlashCommandChannelOption"); +SlashCommandChannelOption = __decorateClass([ + mix(ApplicationCommandOptionChannelTypesMixin) +], SlashCommandChannelOption); + +// src/interactions/slashCommands/options/integer.ts +import { s as s9 } from "@sapphire/shapeshift"; +import { ApplicationCommandOptionType as ApplicationCommandOptionType5 } from "discord-api-types/v10"; +import { mix as mix2 } from "ts-mixer"; + +// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts +var ApplicationCommandNumericOptionMinMaxValueMixin = class { + static { + __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin"); + } + /** + * The maximum value of this option. + */ + max_value; + /** + * The minimum value of this option. + */ + min_value; +}; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts +import { s as s7 } from "@sapphire/shapeshift"; +var booleanPredicate2 = s7.boolean(); +var ApplicationCommandOptionWithAutocompleteMixin = class { + static { + __name(this, "ApplicationCommandOptionWithAutocompleteMixin"); + } + /** + * Whether this option utilizes autocomplete. + */ + autocomplete; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + type; + /** + * Whether this option uses autocomplete. + * + * @param autocomplete - Whether this option should use autocomplete + */ + setAutocomplete(autocomplete) { + booleanPredicate2.parse(autocomplete); + if (autocomplete && "choices" in this && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + Reflect.set(this, "autocomplete", autocomplete); + return this; + } +}; + +// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts +import { s as s8 } from "@sapphire/shapeshift"; +import { ApplicationCommandOptionType as ApplicationCommandOptionType4 } from "discord-api-types/v10"; +var stringPredicate = s8.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100); +var numberPredicate = s8.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY); +var choicesPredicate = s8.object({ + name: stringPredicate, + name_localizations: localizationMapPredicate, + value: s8.union([stringPredicate, numberPredicate]) +}).array(); +var ApplicationCommandOptionWithChoicesMixin = class { + static { + __name(this, "ApplicationCommandOptionWithChoicesMixin"); + } + /** + * The choices of this option. + */ + choices; + /** + * The type of this option. + * + * @privateRemarks Since this is present and this is a mixin, this is needed. + */ + type; + /** + * Adds multiple choices to this option. + * + * @param choices - The choices to add + */ + addChoices(...choices) { + const normalizedChoices = normalizeArray(choices); + if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + choicesPredicate.parse(normalizedChoices); + if (this.choices === void 0) { + Reflect.set(this, "choices", []); + } + validateChoicesLength(normalizedChoices.length, this.choices); + for (const { name, name_localizations, value } of normalizedChoices) { + if (this.type === ApplicationCommandOptionType4.String) { + stringPredicate.parse(value); + } else { + numberPredicate.parse(value); + } + this.choices.push({ name, name_localizations, value }); + } + return this; + } + /** + * Sets multiple choices for this option. + * + * @param choices - The choices to set + */ + setChoices(...choices) { + const normalizedChoices = normalizeArray(choices); + if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + choicesPredicate.parse(normalizedChoices); + Reflect.set(this, "choices", []); + this.addChoices(normalizedChoices); + return this; + } +}; + +// src/interactions/slashCommands/options/integer.ts +var numberValidator = s9.number().int(); +var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = ApplicationCommandOptionType5.Integer; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max) { + numberValidator.parse(max); + Reflect.set(this, "max_value", max); + return this; + } + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min) { + numberValidator.parse(min); + Reflect.set(this, "min_value", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandIntegerOption, "SlashCommandIntegerOption"); +SlashCommandIntegerOption = __decorateClass([ + mix2( + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin + ) +], SlashCommandIntegerOption); + +// src/interactions/slashCommands/options/mentionable.ts +import { ApplicationCommandOptionType as ApplicationCommandOptionType6 } from "discord-api-types/v10"; +var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandMentionableOption"); + } + /** + * The type of this option. + */ + type = ApplicationCommandOptionType6.Mentionable; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/number.ts +import { s as s10 } from "@sapphire/shapeshift"; +import { ApplicationCommandOptionType as ApplicationCommandOptionType7 } from "discord-api-types/v10"; +import { mix as mix3 } from "ts-mixer"; +var numberValidator2 = s10.number(); +var SlashCommandNumberOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = ApplicationCommandOptionType7.Number; + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue} + */ + setMaxValue(max) { + numberValidator2.parse(max); + Reflect.set(this, "max_value", max); + return this; + } + /** + * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue} + */ + setMinValue(min) { + numberValidator2.parse(min); + Reflect.set(this, "min_value", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandNumberOption, "SlashCommandNumberOption"); +SlashCommandNumberOption = __decorateClass([ + mix3( + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin + ) +], SlashCommandNumberOption); + +// src/interactions/slashCommands/options/role.ts +import { ApplicationCommandOptionType as ApplicationCommandOptionType8 } from "discord-api-types/v10"; +var SlashCommandRoleOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandRoleOption"); + } + /** + * The type of this option. + */ + type = ApplicationCommandOptionType8.Role; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/options/string.ts +import { s as s11 } from "@sapphire/shapeshift"; +import { ApplicationCommandOptionType as ApplicationCommandOptionType9 } from "discord-api-types/v10"; +import { mix as mix4 } from "ts-mixer"; +var minLengthValidator2 = s11.number().greaterThanOrEqual(0).lessThanOrEqual(6e3); +var maxLengthValidator2 = s11.number().greaterThanOrEqual(1).lessThanOrEqual(6e3); +var SlashCommandStringOption = class extends ApplicationCommandOptionBase { + /** + * The type of this option. + */ + type = ApplicationCommandOptionType9.String; + /** + * The maximum length of this option. + */ + max_length; + /** + * The minimum length of this option. + */ + min_length; + /** + * Sets the maximum length of this string option. + * + * @param max - The maximum length this option can be + */ + setMaxLength(max) { + maxLengthValidator2.parse(max); + Reflect.set(this, "max_length", max); + return this; + } + /** + * Sets the minimum length of this string option. + * + * @param min - The minimum length this option can be + */ + setMinLength(min) { + minLengthValidator2.parse(min); + Reflect.set(this, "min_length", min); + return this; + } + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) { + throw new RangeError("Autocomplete and choices are mutually exclusive to each other."); + } + return { ...this }; + } +}; +__name(SlashCommandStringOption, "SlashCommandStringOption"); +SlashCommandStringOption = __decorateClass([ + mix4(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin) +], SlashCommandStringOption); + +// src/interactions/slashCommands/options/user.ts +import { ApplicationCommandOptionType as ApplicationCommandOptionType10 } from "discord-api-types/v10"; +var SlashCommandUserOption = class extends ApplicationCommandOptionBase { + static { + __name(this, "SlashCommandUserOption"); + } + /** + * The type of this option. + */ + type = ApplicationCommandOptionType10.User; + /** + * {@inheritDoc ApplicationCommandOptionBase.toJSON} + */ + toJSON() { + this.runRequiredValidations(); + return { ...this }; + } +}; + +// src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts +var SharedSlashCommandOptions = class { + static { + __name(this, "SharedSlashCommandOptions"); + } + options; + /** + * Adds a boolean option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addBooleanOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandBooleanOption); + } + /** + * Adds a user option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addUserOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandUserOption); + } + /** + * Adds a channel option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addChannelOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandChannelOption); + } + /** + * Adds a role option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addRoleOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandRoleOption); + } + /** + * Adds an attachment option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addAttachmentOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption); + } + /** + * Adds a mentionable option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addMentionableOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandMentionableOption); + } + /** + * Adds a string option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addStringOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandStringOption); + } + /** + * Adds an integer option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addIntegerOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandIntegerOption); + } + /** + * Adds a number option. + * + * @param input - A function that returns an option builder or an already built builder + */ + addNumberOption(input) { + return this._sharedAddOptionMethod(input, SlashCommandNumberOption); + } + /** + * Where the actual adding magic happens. ✨ + * + * @param input - The input. What else? + * @param Instance - The instance of whatever is being added + * @internal + */ + _sharedAddOptionMethod(input, Instance) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new Instance()) : input; + assertReturnOfBuilder(result, Instance); + options.push(result); + return this; + } +}; + +// src/interactions/slashCommands/SlashCommandSubcommands.ts +import { + ApplicationCommandOptionType as ApplicationCommandOptionType11 +} from "discord-api-types/v10"; +import { mix as mix5 } from "ts-mixer"; +var SlashCommandSubcommandGroupBuilder = class { + /** + * The name of this subcommand group. + */ + name = void 0; + /** + * The description of this subcommand group. + */ + description = void 0; + /** + * The subcommands within this subcommand group. + */ + options = []; + /** + * Adds a new subcommand to this group. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandBuilder); + options.push(result); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + return { + type: ApplicationCommandOptionType11.SubcommandGroup, + name: this.name, + name_localizations: this.name_localizations, + description: this.description, + description_localizations: this.description_localizations, + options: this.options.map((option) => option.toJSON()) + }; + } +}; +__name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder"); +SlashCommandSubcommandGroupBuilder = __decorateClass([ + mix5(SharedNameAndDescription) +], SlashCommandSubcommandGroupBuilder); +var SlashCommandSubcommandBuilder = class { + /** + * The name of this subcommand. + */ + name = void 0; + /** + * The description of this subcommand. + */ + description = void 0; + /** + * The options within this subcommand. + */ + options = []; + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters3(this.name, this.description, this.options); + return { + type: ApplicationCommandOptionType11.Subcommand, + name: this.name, + name_localizations: this.name_localizations, + description: this.description, + description_localizations: this.description_localizations, + options: this.options.map((option) => option.toJSON()) + }; + } +}; +__name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder"); +SlashCommandSubcommandBuilder = __decorateClass([ + mix5(SharedNameAndDescription, SharedSlashCommandOptions) +], SlashCommandSubcommandBuilder); + +// src/interactions/slashCommands/mixins/SharedSubcommands.ts +var SharedSlashCommandSubcommands = class { + static { + __name(this, "SharedSlashCommandSubcommands"); + } + options = []; + /** + * Adds a new subcommand group to this command. + * + * @param input - A function that returns a subcommand group builder or an already built builder + */ + addSubcommandGroup(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder); + options.push(result); + return this; + } + /** + * Adds a new subcommand to this command. + * + * @param input - A function that returns a subcommand builder or an already built builder + */ + addSubcommand(input) { + const { options } = this; + validateMaxOptionsLength(options); + const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input; + assertReturnOfBuilder(result, SlashCommandSubcommandBuilder); + options.push(result); + return this; + } +}; + +// src/interactions/slashCommands/SlashCommandBuilder.ts +var SlashCommandBuilder = class { + /** + * The name of this command. + */ + name = void 0; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The description of this command. + */ + description = void 0; + /** + * The description localizations of this command. + */ + description_localizations; + /** + * The options of this command. + */ + options = []; + /** + * The contexts for this command. + */ + contexts; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead. + */ + default_permission = void 0; + /** + * The set of permissions represented as a bit set for the command. + */ + default_member_permissions = void 0; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link SlashCommandBuilder.contexts} instead. + */ + dm_permission = void 0; + /** + * The integration types for this command. + */ + integration_types; + /** + * Whether this command is NSFW. + */ + nsfw = void 0; +}; +__name(SlashCommandBuilder, "SlashCommandBuilder"); +SlashCommandBuilder = __decorateClass([ + mix6(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand) +], SlashCommandBuilder); + +// src/interactions/contextMenuCommands/Assertions.ts +var Assertions_exports6 = {}; +__export(Assertions_exports6, { + contextsPredicate: () => contextsPredicate2, + integrationTypesPredicate: () => integrationTypesPredicate2, + validateDMPermission: () => validateDMPermission2, + validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2, + validateDefaultPermission: () => validateDefaultPermission2, + validateName: () => validateName2, + validateRequiredParameters: () => validateRequiredParameters4, + validateType: () => validateType +}); +import { s as s12 } from "@sapphire/shapeshift"; +import { ApplicationCommandType as ApplicationCommandType2, ApplicationIntegrationType as ApplicationIntegrationType2, InteractionContextType as InteractionContextType2 } from "discord-api-types/v10"; +var namePredicate2 = s12.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled); +var typePredicate = s12.union([s12.literal(ApplicationCommandType2.User), s12.literal(ApplicationCommandType2.Message)]).setValidationEnabled(isValidationEnabled); +var booleanPredicate3 = s12.boolean(); +function validateDefaultPermission2(value) { + booleanPredicate3.parse(value); +} +__name(validateDefaultPermission2, "validateDefaultPermission"); +function validateName2(name) { + namePredicate2.parse(name); +} +__name(validateName2, "validateName"); +function validateType(type) { + typePredicate.parse(type); +} +__name(validateType, "validateType"); +function validateRequiredParameters4(name, type) { + validateName2(name); + validateType(type); +} +__name(validateRequiredParameters4, "validateRequiredParameters"); +var dmPermissionPredicate2 = s12.boolean().nullish(); +function validateDMPermission2(value) { + dmPermissionPredicate2.parse(value); +} +__name(validateDMPermission2, "validateDMPermission"); +var memberPermissionPredicate2 = s12.union([ + s12.bigint().transform((value) => value.toString()), + s12.number().safeInt().transform((value) => value.toString()), + s12.string().regex(/^\d+$/) +]).nullish(); +function validateDefaultMemberPermissions2(permissions) { + return memberPermissionPredicate2.parse(permissions); +} +__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions"); +var contextsPredicate2 = s12.array( + s12.nativeEnum(InteractionContextType2).setValidationEnabled(isValidationEnabled) +); +var integrationTypesPredicate2 = s12.array( + s12.nativeEnum(ApplicationIntegrationType2).setValidationEnabled(isValidationEnabled) +); + +// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +var ContextMenuCommandBuilder = class { + static { + __name(this, "ContextMenuCommandBuilder"); + } + /** + * The name of this command. + */ + name = void 0; + /** + * The name localizations of this command. + */ + name_localizations; + /** + * The type of this command. + */ + type = void 0; + /** + * The contexts for this command. + */ + contexts; + /** + * Whether this command is enabled by default when the application is added to a guild. + * + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + default_permission = void 0; + /** + * The set of permissions represented as a bit set for the command. + */ + default_member_permissions = void 0; + /** + * Indicates whether the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This property is only for global commands. + * @deprecated + * Use {@link ContextMenuCommandBuilder.contexts} instead. + */ + dm_permission = void 0; + /** + * The integration types for this command. + */ + integration_types; + /** + * Sets the contexts of this command. + * + * @param contexts - The contexts + */ + setContexts(...contexts) { + Reflect.set(this, "contexts", contextsPredicate2.parse(normalizeArray(contexts))); + return this; + } + /** + * Sets integration types of this command. + * + * @param integrationTypes - The integration types + */ + setIntegrationTypes(...integrationTypes) { + Reflect.set(this, "integration_types", integrationTypesPredicate2.parse(normalizeArray(integrationTypes))); + return this; + } + /** + * Sets the name of this command. + * + * @param name - The name to use + */ + setName(name) { + validateName2(name); + Reflect.set(this, "name", name); + return this; + } + /** + * Sets the type of this command. + * + * @param type - The type to use + */ + setType(type) { + validateType(type); + Reflect.set(this, "type", type); + return this; + } + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. + * @param value - Whether to enable this command by default + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. + */ + setDefaultPermission(value) { + validateDefaultPermission2(value); + Reflect.set(this, "default_permission", value); + return this; + } + /** + * Sets the default permissions a member should have in order to run this command. + * + * @remarks + * You can set this to `'0'` to disable the command by default. + * @param permissions - The permissions bit field to set + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + */ + setDefaultMemberPermissions(permissions) { + const permissionValue = validateDefaultMemberPermissions2(permissions); + Reflect.set(this, "default_member_permissions", permissionValue); + return this; + } + /** + * Sets if the command is available in direct messages with the application. + * + * @remarks + * By default, commands are visible. This method is only for global commands. + * @param enabled - Whether the command should be enabled in direct messages + * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions} + * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead. + */ + setDMPermission(enabled) { + validateDMPermission2(enabled); + Reflect.set(this, "dm_permission", enabled); + return this; + } + /** + * Sets a name localization for this command. + * + * @param locale - The locale to set + * @param localizedName - The localized name for the given `locale` + */ + setNameLocalization(locale, localizedName) { + if (!this.name_localizations) { + Reflect.set(this, "name_localizations", {}); + } + const parsedLocale = validateLocale(locale); + if (localizedName === null) { + this.name_localizations[parsedLocale] = null; + return this; + } + validateName2(localizedName); + this.name_localizations[parsedLocale] = localizedName; + return this; + } + /** + * Sets the name localizations for this command. + * + * @param localizedNames - The object of localized names to set + */ + setNameLocalizations(localizedNames) { + if (localizedNames === null) { + Reflect.set(this, "name_localizations", null); + return this; + } + Reflect.set(this, "name_localizations", {}); + for (const args of Object.entries(localizedNames)) + this.setNameLocalization(...args); + return this; + } + /** + * Serializes this builder to API-compatible JSON data. + * + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. + */ + toJSON() { + validateRequiredParameters4(this.name, this.type); + validateLocalizationMap(this.name_localizations); + return { ...this }; + } +}; + +// src/util/componentUtil.ts +function embedLength(data) { + return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0); +} +__name(embedLength, "embedLength"); + +// src/index.ts +var version = "1.10.1"; +export { + ActionRowBuilder, + ApplicationCommandNumericOptionMinMaxValueMixin, + ApplicationCommandOptionBase, + ApplicationCommandOptionChannelTypesMixin, + ApplicationCommandOptionWithAutocompleteMixin, + ApplicationCommandOptionWithChoicesMixin, + BaseSelectMenuBuilder, + ButtonBuilder, + ChannelSelectMenuBuilder, + Assertions_exports2 as ComponentAssertions, + ComponentBuilder, + Assertions_exports6 as ContextMenuCommandAssertions, + ContextMenuCommandBuilder, + Assertions_exports as EmbedAssertions, + EmbedBuilder, + MentionableSelectMenuBuilder, + Assertions_exports4 as ModalAssertions, + ModalBuilder, + RoleSelectMenuBuilder, + StringSelectMenuBuilder as SelectMenuBuilder, + StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, + SharedNameAndDescription, + SharedSlashCommand, + SharedSlashCommandOptions, + SharedSlashCommandSubcommands, + Assertions_exports5 as SlashCommandAssertions, + SlashCommandAttachmentOption, + SlashCommandBooleanOption, + SlashCommandBuilder, + SlashCommandChannelOption, + SlashCommandIntegerOption, + SlashCommandMentionableOption, + SlashCommandNumberOption, + SlashCommandRoleOption, + SlashCommandStringOption, + SlashCommandSubcommandBuilder, + SlashCommandSubcommandGroupBuilder, + SlashCommandUserOption, + StringSelectMenuBuilder, + StringSelectMenuOptionBuilder, + Assertions_exports3 as TextInputAssertions, + TextInputBuilder, + UserSelectMenuBuilder, + createComponentBuilder, + disableValidators, + embedLength, + enableValidators, + isValidationEnabled, + normalizeArray, + version +}; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.mjs.map b/node_modules/@discordjs/builders/dist/index.mjs.map new file mode 100644 index 0000000..6900d59 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/messages/embed/Assertions.ts","../src/util/validation.ts","../src/util/normalizeArray.ts","../src/messages/embed/Embed.ts","../src/index.ts","../src/components/Assertions.ts","../src/components/selectMenu/StringSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/Button.ts","../src/components/selectMenu/ChannelSelectMenu.ts","../src/components/selectMenu/BaseSelectMenu.ts","../src/components/selectMenu/MentionableSelectMenu.ts","../src/components/selectMenu/RoleSelectMenu.ts","../src/components/selectMenu/StringSelectMenu.ts","../src/components/selectMenu/UserSelectMenu.ts","../src/components/textInput/TextInput.ts","../src/components/textInput/Assertions.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/SharedSlashCommand.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/slashCommands/mixins/SharedSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/componentUtil.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport type { APIEmbedField } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const fieldNamePredicate = s.string().lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);\n\nexport const fieldValuePredicate = s.string().lengthLessThanOrEqual(1_024).setValidationEnabled(isValidationEnabled);\n\nexport const fieldInlinePredicate = s.boolean().optional();\n\nexport const embedFieldPredicate = s\n\t.object({\n\t\tname: fieldNamePredicate,\n\t\tvalue: fieldValuePredicate,\n\t\tinline: fieldInlinePredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array().setValidationEnabled(isValidationEnabled);\n\nexport const fieldLengthPredicate = s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate\n\t.lengthGreaterThanOrEqual(1)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const imageURLPredicate = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'attachment:'],\n\t})\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const urlPredicate = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:'],\n\t})\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedAuthorPredicate = s\n\t.object({\n\t\tname: authorNamePredicate,\n\t\ticonURL: imageURLPredicate,\n\t\turl: urlPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const RGBPredicate = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(255)\n\t.setValidationEnabled(isValidationEnabled);\nexport const colorPredicate = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(0xffffff)\n\t.or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate]))\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const descriptionPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(4_096)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const footerTextPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(2_048)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFooterPredicate = s\n\t.object({\n\t\ttext: footerTextPredicate,\n\t\ticonURL: imageURLPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const timestampPredicate = s.union([s.number(), s.date()]).nullable().setValidationEnabled(isValidationEnabled);\n\nexport const titlePredicate = fieldNamePredicate\n\t.lengthGreaterThanOrEqual(1)\n\t.nullable()\n\t.setValidationEnabled(isValidationEnabled);\n","let validate = true;\n\n/**\n * Enables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function enableValidators() {\n\treturn (validate = true);\n}\n\n/**\n * Disables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function disableValidators() {\n\treturn (validate = false);\n}\n\n/**\n * Checks whether validation is occurring.\n */\nexport function isValidationEnabled() {\n\treturn validate;\n}\n","/**\n * Normalizes data that is a rest parameter or an array into an array with a depth of 1.\n *\n * @typeParam ItemType - The data that must satisfy {@link RestOrArray}.\n * @param arr - The (possibly variadic) data to normalize\n */\nexport function normalizeArray(arr: RestOrArray): ItemType[] {\n\tif (Array.isArray(arr[0])) return [...arr[0]];\n\treturn arr as ItemType[];\n}\n\n/**\n * Represents data that may be an array or came from a rest parameter.\n *\n * @remarks\n * This type is used throughout builders to ensure both an array and variadic arguments\n * may be used. It is normalized with {@link normalizeArray}.\n */\nexport type RestOrArray = Type[] | [Type[]];\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport {\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedAuthorPredicate,\n\tembedFieldsArrayPredicate,\n\tembedFooterPredicate,\n\timageURLPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions.js';\n\n/**\n * A tuple satisfying the RGB color model.\n *\n * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}\n */\nexport type RGBTuple = [red: number, green: number, blue: number];\n\n/**\n * The base icon data typically used in payloads.\n */\nexport interface IconData {\n\t/**\n\t * The URL of the icon.\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon.\n\t */\n\tproxyIconURL?: string;\n}\n\n/**\n * Represents the author data of an embed.\n */\nexport interface EmbedAuthorData extends IconData, Omit {}\n\n/**\n * Represents the author options of an embed.\n */\nexport interface EmbedAuthorOptions extends Omit {}\n\n/**\n * Represents the footer data of an embed.\n */\nexport interface EmbedFooterData extends IconData, Omit {}\n\n/**\n * Represents the footer options of an embed.\n */\nexport interface EmbedFooterOptions extends Omit {}\n\n/**\n * Represents the image data of an embed.\n */\nexport interface EmbedImageData extends Omit {\n\t/**\n\t * The proxy URL for the image.\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * A builder that creates API-compatible JSON data for embeds.\n */\nexport class EmbedBuilder {\n\t/**\n\t * The API data associated with this embed.\n\t */\n\tpublic readonly data: APIEmbed;\n\n\t/**\n\t * Creates a new embed from API data.\n\t *\n\t * @param data - The API data to create this embed with\n\t */\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Appends fields to the embed.\n\t *\n\t * @remarks\n\t * This method accepts either an array of fields or a variable number of field parameters.\n\t * The maximum amount of fields that can be added is 25.\n\t * @example\n\t * Using an array:\n\t * ```ts\n\t * const fields: APIEmbedField[] = ...;\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(fields);\n\t * ```\n\t * @example\n\t * Using rest parameters (variadic):\n\t * ```ts\n\t * const embed = new EmbedBuilder()\n\t * \t.addFields(\n\t * \t\t{ name: 'Field 1', value: 'Value 1' },\n\t * \t\t{ name: 'Field 2', value: 'Value 2' },\n\t * \t);\n\t * ```\n\t * @param fields - The fields to add\n\t */\n\tpublic addFields(...fields: RestOrArray): this {\n\t\tconst normalizedFields = normalizeArray(fields);\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(normalizedFields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(normalizedFields);\n\n\t\tif (this.data.fields) this.data.fields.push(...normalizedFields);\n\t\telse this.data.fields = normalizedFields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields for this embed.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.\n\t * The maximum amount of fields that can be added is 25.\n\t *\n\t * It's useful for modifying and adjusting order of the already-existing fields of an embed.\n\t * @example\n\t * Remove the first field:\n\t * ```ts\n\t * embed.spliceFields(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n fields:\n\t * ```ts\n\t * const n = 4;\n\t * embed.spliceFields(0, n);\n\t * ```\n\t * @example\n\t * Remove the last field:\n\t * ```ts\n\t * embed.spliceFields(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of fields to remove\n\t * @param fields - The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\tembedFieldsArrayPredicate.parse(fields);\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the fields for this embed.\n\t *\n\t * @remarks\n\t * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,\n\t * it splices the entire array of fields, replacing them with the provided fields.\n\t *\n\t * You can set a maximum of 25 fields.\n\t * @param fields - The fields to set\n\t */\n\tpublic setFields(...fields: RestOrArray): this {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed.\n\t *\n\t * @param options - The options to use\n\t */\n\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedAuthorPredicate.parse(options);\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed.\n\t *\n\t * @param color - The color to use\n\t */\n\tpublic setColor(color: RGBTuple | number | null): this {\n\t\t// Data assertions\n\t\tcolorPredicate.parse(color);\n\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tdescriptionPredicate.parse(description);\n\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed.\n\t *\n\t * @param options - The footer to use\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\t// Data assertions\n\t\tembedFooterPredicate.parse(options);\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed.\n\t *\n\t * @param url - The image URL to use\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed.\n\t *\n\t * @param url - The thumbnail URL to use\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\timageURLPredicate.parse(url);\n\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed.\n\t *\n\t * @param timestamp - The timestamp or date to use\n\t */\n\tpublic setTimestamp(timestamp: Date | number | null = Date.now()): this {\n\t\t// Data assertions\n\t\ttimestampPredicate.parse(timestamp);\n\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title for this embed.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\ttitlePredicate.parse(title);\n\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed.\n\t *\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\turlPredicate.parse(url);\n\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","export * as EmbedAssertions from './messages/embed/Assertions.js';\nexport * from './messages/embed/Embed.js';\n// TODO: Consider removing this dep in the next major version\nexport * from '@discordjs/formatters';\n\nexport * as ComponentAssertions from './components/Assertions.js';\nexport * from './components/ActionRow.js';\nexport * from './components/button/Button.js';\nexport * from './components/Component.js';\nexport * from './components/Components.js';\nexport * from './components/textInput/TextInput.js';\nexport * as TextInputAssertions from './components/textInput/Assertions.js';\nexport * from './interactions/modals/Modal.js';\nexport * as ModalAssertions from './interactions/modals/Assertions.js';\n\nexport * from './components/selectMenu/BaseSelectMenu.js';\nexport * from './components/selectMenu/ChannelSelectMenu.js';\nexport * from './components/selectMenu/MentionableSelectMenu.js';\nexport * from './components/selectMenu/RoleSelectMenu.js';\nexport * from './components/selectMenu/StringSelectMenu.js';\n// TODO: Remove those aliases in v2\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuBuilder} instead.\n\t */\n\tStringSelectMenuBuilder as SelectMenuBuilder,\n} from './components/selectMenu/StringSelectMenu.js';\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuOptionBuilder} instead.\n\t */\n\tStringSelectMenuOptionBuilder as SelectMenuOptionBuilder,\n} from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/UserSelectMenu.js';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions.js';\nexport * from './interactions/slashCommands/SlashCommandBuilder.js';\nexport * from './interactions/slashCommands/SlashCommandSubcommands.js';\nexport * from './interactions/slashCommands/options/boolean.js';\nexport * from './interactions/slashCommands/options/channel.js';\nexport * from './interactions/slashCommands/options/integer.js';\nexport * from './interactions/slashCommands/options/mentionable.js';\nexport * from './interactions/slashCommands/options/number.js';\nexport * from './interactions/slashCommands/options/role.js';\nexport * from './interactions/slashCommands/options/attachment.js';\nexport * from './interactions/slashCommands/options/string.js';\nexport * from './interactions/slashCommands/options/user.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionBase.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.js';\nexport * from './interactions/slashCommands/mixins/NameAndDescription.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommandOptions.js';\nexport * from './interactions/slashCommands/mixins/SharedSubcommands.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommand.js';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions.js';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js';\n\nexport * from './util/componentUtil.js';\nexport * from './util/normalizeArray.js';\nexport * from './util/validation.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version\n * that you are currently using.\n *\n * @privateRemarks This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild.\n */\nexport const version = '1.10.1' as string;\n","import { s } from '@sapphire/shapeshift';\nimport { ButtonStyle, ChannelType, type APIMessageComponentEmoji } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../util/validation.js';\nimport { StringSelectMenuOptionBuilder } from './selectMenu/StringSelectMenuOption.js';\n\nexport const customIdValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const emojiValidator = s\n\t.object({\n\t\tid: s.string(),\n\t\tname: s.string(),\n\t\tanimated: s.boolean(),\n\t})\n\t.partial()\n\t.strict()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const disabledValidator = s.boolean();\n\nexport const buttonLabelValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(80)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const buttonStyleValidator = s.nativeEnum(ButtonStyle);\n\nexport const placeholderValidator = s.string().lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);\nexport const minMaxValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const labelValueDescriptionValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const jsonOptionValidator = s\n\t.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: s.boolean().optional(),\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const optionValidator = s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);\n\nexport const optionsValidator = optionValidator\n\t.array()\n\t.lengthGreaterThanOrEqual(0)\n\t.setValidationEnabled(isValidationEnabled);\nexport const optionsLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(25)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const defaultValidator = s.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueDescriptionValidator.parse(label);\n\tlabelValueDescriptionValidator.parse(value);\n}\n\nexport const channelTypesValidator = s.nativeEnum(ChannelType).array().setValidationEnabled(isValidationEnabled);\n\nexport const urlValidator = s\n\t.string()\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'discord:'],\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\tskuId?: string,\n\turl?: string,\n) {\n\tif (style === ButtonStyle.Premium) {\n\t\tif (!skuId) {\n\t\t\tthrow new RangeError('Premium buttons must have an SKU id.');\n\t\t}\n\n\t\tif (customId || label || url || emoji) {\n\t\t\tthrow new RangeError('Premium buttons cannot have a custom id, label, URL, or emoji.');\n\t\t}\n\t} else {\n\t\tif (skuId) {\n\t\t\tthrow new RangeError('Non-premium buttons must not have an SKU id.');\n\t\t}\n\n\t\tif (url && customId) {\n\t\t\tthrow new RangeError('URL and custom id are mutually exclusive.');\n\t\t}\n\n\t\tif (!label && !emoji) {\n\t\t\tthrow new RangeError('Non-premium buttons must have a label and/or an emoji.');\n\t\t}\n\n\t\tif (style === ButtonStyle.Link) {\n\t\t\tif (!url) {\n\t\t\t\tthrow new RangeError('Link buttons must have a URL.');\n\t\t\t}\n\t\t} else if (url) {\n\t\t\tthrow new RangeError('Non-premium and non-link buttons cannot have a URL.');\n\t\t}\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueDescriptionValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menu options.\n */\nexport class StringSelectMenuOptionBuilder implements JSONEncodable {\n\t/**\n\t * Creates a new string select menu option from API data.\n\t *\n\t * @param data - The API data to create this string select menu option with\n\t * @example\n\t * Creating a string select menu option from an API data object:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tlabel: 'catchy label',\n\t * \tvalue: '1',\n\t * });\n\t * ```\n\t * @example\n\t * Creating a string select menu option using setters and API data:\n\t * ```ts\n\t * const selectMenuOption = new SelectMenuOptionBuilder({\n\t * \tdefault: true,\n\t * \tvalue: '1',\n\t * })\n\t * \t.setLabel('woah');\n\t * ```\n\t */\n\tpublic constructor(public data: Partial = {}) {}\n\n\t/**\n\t * Sets the label for this option.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValueDescriptionValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this option.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = labelValueDescriptionValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description for this option.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = labelValueDescriptionValidator.parse(description);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default.\n\t *\n\t * @param isDefault - Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = defaultValidator.parse(isDefault);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display for this option.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport {\n\ttype APIActionRowComponent,\n\tComponentType,\n\ttype APIMessageActionRowComponent,\n\ttype APIModalActionRowComponent,\n\ttype APIActionRowComponentTypes,\n} from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../util/normalizeArray.js';\nimport { ComponentBuilder } from './Component.js';\nimport { createComponentBuilder } from './Components.js';\nimport type { ButtonBuilder } from './button/Button.js';\nimport type { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport type { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport type { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport type { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport type { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport type { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * The builders that may be used for messages.\n */\nexport type MessageComponentBuilder =\n\t| ActionRowBuilder\n\t| MessageActionRowComponentBuilder;\n\n/**\n * The builders that may be used for modals.\n */\nexport type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;\n\n/**\n * The builders that may be used within an action row for messages.\n */\nexport type MessageActionRowComponentBuilder =\n\t| ButtonBuilder\n\t| ChannelSelectMenuBuilder\n\t| MentionableSelectMenuBuilder\n\t| RoleSelectMenuBuilder\n\t| StringSelectMenuBuilder\n\t| UserSelectMenuBuilder;\n\n/**\n * The builders that may be used within an action row for modals.\n */\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Any builder.\n */\nexport type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;\n\n/**\n * A builder that creates API-compatible JSON data for action rows.\n *\n * @typeParam ComponentType - The types of components this action row holds\n */\nexport class ActionRowBuilder extends ComponentBuilder<\n\tAPIActionRowComponent\n> {\n\t/**\n\t * The components within this action row.\n\t */\n\tpublic readonly components: ComponentType[];\n\n\t/**\n\t * Creates a new action row from API data.\n\t *\n\t * @param data - The API data to create this action row with\n\t * @example\n\t * Creating an action row from an API data object:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Type something\",\n\t * \t\t\tstyle: TextInputStyle.Short,\n\t * \t\t\ttype: ComponentType.TextInput,\n\t * \t\t},\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating an action row using setters and API data:\n\t * ```ts\n\t * const actionRow = new ActionRowBuilder({\n\t * \tcomponents: [\n\t * \t\t{\n\t * \t\t\tcustom_id: \"custom id\",\n\t * \t\t\tlabel: \"Click me\",\n\t * \t\t\tstyle: ButtonStyle.Primary,\n\t * \t\t\ttype: ComponentType.Button,\n\t * \t\t},\n\t * \t],\n\t * })\n\t * \t.addComponents(button2, button3);\n\t * ```\n\t */\n\tpublic constructor({ components, ...data }: Partial> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ?? []) as ComponentType[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(...components: RestOrArray) {\n\t\tthis.components.push(...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this action row.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIActionRowComponent> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIActionRowComponent>;\n\t}\n}\n","import type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Any action row component data represented as an object.\n */\nexport type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes;\n\n/**\n * The base component builder that contains common symbols for all sorts of components.\n *\n * @typeParam DataType - The type of internal API data that is stored within the component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial> = APIBaseComponent,\n> implements JSONEncodable\n{\n\t/**\n\t * The API data associated with this component.\n\t */\n\tpublic readonly data: Partial;\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): AnyAPIActionRowComponent;\n\n\t/**\n\t * Constructs a new kind of component.\n\t *\n\t * @param data - The data to construct a component out of\n\t */\n\tpublic constructor(data: Partial) {\n\t\tthis.data = data;\n\t}\n}\n","import { ComponentType, type APIMessageComponent, type APIModalComponent } from 'discord-api-types/v10';\nimport {\n\tActionRowBuilder,\n\ttype AnyComponentBuilder,\n\ttype MessageComponentBuilder,\n\ttype ModalComponentBuilder,\n} from './ActionRow.js';\nimport { ComponentBuilder } from './Component.js';\nimport { ButtonBuilder } from './button/Button.js';\nimport { ChannelSelectMenuBuilder } from './selectMenu/ChannelSelectMenu.js';\nimport { MentionableSelectMenuBuilder } from './selectMenu/MentionableSelectMenu.js';\nimport { RoleSelectMenuBuilder } from './selectMenu/RoleSelectMenu.js';\nimport { StringSelectMenuBuilder } from './selectMenu/StringSelectMenu.js';\nimport { UserSelectMenuBuilder } from './selectMenu/UserSelectMenu.js';\nimport { TextInputBuilder } from './textInput/TextInput.js';\n\n/**\n * Components here are mapped to their respective builder.\n */\nexport interface MappedComponentTypes {\n\t/**\n\t * The action row component type is associated with an {@link ActionRowBuilder}.\n\t */\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t/**\n\t * The button component type is associated with a {@link ButtonBuilder}.\n\t */\n\t[ComponentType.Button]: ButtonBuilder;\n\t/**\n\t * The string select component type is associated with a {@link StringSelectMenuBuilder}.\n\t */\n\t[ComponentType.StringSelect]: StringSelectMenuBuilder;\n\t/**\n\t * The text input component type is associated with a {@link TextInputBuilder}.\n\t */\n\t[ComponentType.TextInput]: TextInputBuilder;\n\t/**\n\t * The user select component type is associated with a {@link UserSelectMenuBuilder}.\n\t */\n\t[ComponentType.UserSelect]: UserSelectMenuBuilder;\n\t/**\n\t * The role select component type is associated with a {@link RoleSelectMenuBuilder}.\n\t */\n\t[ComponentType.RoleSelect]: RoleSelectMenuBuilder;\n\t/**\n\t * The mentionable select component type is associated with a {@link MentionableSelectMenuBuilder}.\n\t */\n\t[ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;\n\t/**\n\t * The channel select component type is associated with a {@link ChannelSelectMenuBuilder}.\n\t */\n\t[ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;\n}\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam ComponentType - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder(\n\t// eslint-disable-next-line @typescript-eslint/sort-type-constituents\n\tdata: (APIModalComponent | APIMessageComponent) & { type: ComponentType },\n): MappedComponentTypes[ComponentType];\n\n/**\n * Factory for creating components from API data.\n *\n * @typeParam ComponentBuilder - The type of component to use\n * @param data - The API data to transform to a component class\n */\nexport function createComponentBuilder(\n\tdata: ComponentBuilder,\n): ComponentBuilder;\n\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.StringSelect:\n\t\t\treturn new StringSelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tcase ComponentType.UserSelect:\n\t\t\treturn new UserSelectMenuBuilder(data);\n\t\tcase ComponentType.RoleSelect:\n\t\t\treturn new RoleSelectMenuBuilder(data);\n\t\tcase ComponentType.MentionableSelect:\n\t\t\treturn new MentionableSelectMenuBuilder(data);\n\t\tcase ComponentType.ChannelSelect:\n\t\t\treturn new ChannelSelectMenuBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error This case can still occur if we get a newer unsupported component type\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithCustomId,\n\ttype APIButtonComponentWithSKUId,\n\ttype APIButtonComponentWithURL,\n\ttype APIMessageComponentEmoji,\n\ttype ButtonStyle,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * A builder that creates API-compatible JSON data for buttons.\n */\nexport class ButtonBuilder extends ComponentBuilder {\n\t/**\n\t * Creates a new button from API data.\n\t *\n\t * @param data - The API data to create this button with\n\t * @example\n\t * Creating a button from an API data object:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tcustom_id: 'a cool button',\n\t * \tstyle: ButtonStyle.Primary,\n\t * \tlabel: 'Click Me',\n\t * \temoji: {\n\t * \t\tname: 'smile',\n\t * \t\tid: '123456789012345678',\n\t * \t},\n\t * });\n\t * ```\n\t * @example\n\t * Creating a button using setters and API data:\n\t * ```ts\n\t * const button = new ButtonBuilder({\n\t * \tstyle: ButtonStyle.Secondary,\n\t * \tlabel: 'Click Me',\n\t * })\n\t * \t.setEmoji({ name: '🙂' })\n\t * \t.setCustomId('another cool button');\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = buttonStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button.\n\t *\n\t * @remarks\n\t * This method is only available to buttons using the `Link` button style.\n\t * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.\n\t * @param url - The URL to use\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = urlValidator.parse(url);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this button.\n\t *\n\t * @remarks\n\t * This method is only applicable to buttons that are not using the `Link` button style.\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the SKU id that represents a purchasable SKU for this button.\n\t *\n\t * @remarks Only available when using premium-style buttons.\n\t * @param skuId - The SKU id to use\n\t */\n\tpublic setSKUId(skuId: Snowflake) {\n\t\t(this.data as APIButtonComponentWithSKUId).sku_id = skuId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button.\n\t *\n\t * @param emoji - The emoji to use\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\t(this.data as Exclude).emoji = emojiValidator.parse(emoji);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disabled.\n\t *\n\t * @param disabled - Whether to disable this button\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\t(this.data as Exclude).label = buttonLabelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\t(this.data as Exclude).label,\n\t\t\t(this.data as Exclude).emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithSKUId).sku_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import {\n\ttype APIChannelSelectComponent,\n\ttype ChannelType,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { channelTypesValidator, customIdValidator, optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for channel select menus.\n */\nexport class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new ChannelSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)\n\t * \t.setMinValues(2);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.ChannelSelect });\n\t}\n\n\t/**\n\t * Adds channel types to this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic addChannelTypes(...types: RestOrArray) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets channel types for this select menu.\n\t *\n\t * @param types - The channel types to use\n\t */\n\tpublic setChannelTypes(...types: RestOrArray) {\n\t\tconst normalizedTypes = normalizeArray(types);\n\t\tthis.data.channel_types ??= [];\n\t\tthis.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default channels to this auto populated select menu.\n\t *\n\t * @param channels - The channels to add\n\t */\n\tpublic addDefaultChannels(...channels: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(channels);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Channel as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default channels for this auto populated select menu.\n\t *\n\t * @param channels - The channels to set\n\t */\n\tpublic setDefaultChannels(...channels: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(channels);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.Channel as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIChannelSelectComponent {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIChannelSelectComponent;\n\t}\n}\n","import type { APISelectMenuComponent } from 'discord-api-types/v10';\nimport { customIdValidator, disabledValidator, minMaxValidator, placeholderValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\n\n/**\n * The base select menu builder that contains common symbols for select menu builders.\n *\n * @typeParam SelectMenuType - The type of select menu this would be instantiated for.\n */\nexport abstract class BaseSelectMenuBuilder<\n\tSelectMenuType extends APISelectMenuComponent,\n> extends ComponentBuilder {\n\t/**\n\t * Sets the placeholder for this select menu.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu.\n\t *\n\t * @param minValues - The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minMaxValidator.parse(minValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu.\n\t *\n\t * @param maxValues - The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = minMaxValidator.parse(maxValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id for this select menu.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this select menu is disabled.\n\t *\n\t * @param disabled - Whether this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabledValidator.parse(disabled);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): SelectMenuType {\n\t\tcustomIdValidator.parse(this.data.custom_id);\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as SelectMenuType;\n\t}\n}\n","import {\n\ttype APIMentionableSelectComponent,\n\ttype APISelectMenuDefaultValue,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for mentionable select menus.\n */\nexport class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new MentionableSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.MentionableSelect });\n\t}\n\n\t/**\n\t * Adds default roles to this auto populated select menu.\n\t *\n\t * @param roles - The roles to add\n\t */\n\tpublic addDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default users to this auto populated select menu.\n\t *\n\t * @param users - The users to add\n\t */\n\tpublic addDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds default values to this auto populated select menu.\n\t *\n\t * @param values - The values to add\n\t */\n\tpublic addDefaultValues(\n\t\t...values: RestOrArray<\n\t\t\t| APISelectMenuDefaultValue\n\t\t\t| APISelectMenuDefaultValue\n\t\t>\n\t) {\n\t\tconst normalizedValues = normalizeArray(values);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\t\tthis.data.default_values.push(...normalizedValues);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default values for this auto populated select menu.\n\t *\n\t * @param values - The values to set\n\t */\n\tpublic setDefaultValues(\n\t\t...values: RestOrArray<\n\t\t\t| APISelectMenuDefaultValue\n\t\t\t| APISelectMenuDefaultValue\n\t\t>\n\t) {\n\t\tconst normalizedValues = normalizeArray(values);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\t\tthis.data.default_values = normalizedValues;\n\t\treturn this;\n\t}\n}\n","import {\n\ttype APIRoleSelectComponent,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for role select menus.\n */\nexport class RoleSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new RoleSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.RoleSelect });\n\t}\n\n\t/**\n\t * Adds default roles to this auto populated select menu.\n\t *\n\t * @param roles - The roles to add\n\t */\n\tpublic addDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default roles for this auto populated select menu.\n\t *\n\t * @param roles - The roles to set\n\t */\n\tpublic setDefaultRoles(...roles: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(roles);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.Role as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n}\n","import { ComponentType } from 'discord-api-types/v10';\nimport type { APIStringSelectComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { jsonOptionValidator, optionsLengthValidator, validateRequiredSelectMenuParameters } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\nimport { StringSelectMenuOptionBuilder } from './StringSelectMenuOption.js';\n\n/**\n * A builder that creates API-compatible JSON data for string select menus.\n */\nexport class StringSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * The options within this select menu.\n\t */\n\tpublic readonly options: StringSelectMenuOptionBuilder[];\n\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * \toptions: [\n\t * \t\t{ label: 'option 1', value: '1' },\n\t * \t\t{ label: 'option 2', value: '2' },\n\t * \t\t{ label: 'option 3', value: '3' },\n\t * \t],\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new StringSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1)\n\t * \t.addOptions({\n\t * \t\tlabel: 'Catchy',\n\t * \t\tvalue: 'catch',\n\t * \t});\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ ...initData, type: ComponentType.StringSelect });\n\t\tthis.options = options?.map((option: APISelectMenuOption) => new StringSelectMenuOptionBuilder(option)) ?? [];\n\t}\n\n\t/**\n\t * Adds options to this select menu.\n\t *\n\t * @param options - The options to add\n\t */\n\tpublic addOptions(...options: RestOrArray) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\t\toptionsLengthValidator.parse(this.options.length + normalizedOptions.length);\n\t\tthis.options.push(\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options for this select menu.\n\t *\n\t * @param options - The options to set\n\t */\n\tpublic setOptions(...options: RestOrArray) {\n\t\treturn this.spliceOptions(0, this.options.length, ...options);\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts options for this select menu.\n\t *\n\t * @remarks\n\t * This method behaves similarly\n\t * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.\n\t * It's useful for modifying and adjusting the order of existing options.\n\t * @example\n\t * Remove the first option:\n\t * ```ts\n\t * selectMenu.spliceOptions(0, 1);\n\t * ```\n\t * @example\n\t * Remove the first n option:\n\t * ```ts\n\t * const n = 4;\n\t * selectMenu.spliceOptions(0, n);\n\t * ```\n\t * @example\n\t * Remove the last option:\n\t * ```ts\n\t * selectMenu.spliceOptions(-1, 1);\n\t * ```\n\t * @param index - The index to start at\n\t * @param deleteCount - The number of options to remove\n\t * @param options - The replacing option objects or builders\n\t */\n\tpublic spliceOptions(\n\t\tindex: number,\n\t\tdeleteCount: number,\n\t\t...options: RestOrArray\n\t) {\n\t\tconst normalizedOptions = normalizeArray(options);\n\n\t\tconst clone = [...this.options];\n\n\t\tclone.splice(\n\t\t\tindex,\n\t\t\tdeleteCount,\n\t\t\t...normalizedOptions.map((normalizedOption) =>\n\t\t\t\tnormalizedOption instanceof StringSelectMenuOptionBuilder\n\t\t\t\t\t? normalizedOption\n\t\t\t\t\t: new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption)),\n\t\t\t),\n\t\t);\n\n\t\toptionsLengthValidator.parse(clone.length);\n\t\tthis.options.splice(0, this.options.length, ...clone);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseSelectMenuBuilder.toJSON}\n\t */\n\tpublic override toJSON(): APIStringSelectComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t} as APIStringSelectComponent;\n\t}\n}\n","import {\n\ttype APIUserSelectComponent,\n\ttype Snowflake,\n\tComponentType,\n\tSelectMenuDefaultValueType,\n} from 'discord-api-types/v10';\nimport { type RestOrArray, normalizeArray } from '../../util/normalizeArray.js';\nimport { optionsLengthValidator } from '../Assertions.js';\nimport { BaseSelectMenuBuilder } from './BaseSelectMenu.js';\n\n/**\n * A builder that creates API-compatible JSON data for user select menus.\n */\nexport class UserSelectMenuBuilder extends BaseSelectMenuBuilder {\n\t/**\n\t * Creates a new select menu from API data.\n\t *\n\t * @param data - The API data to create this select menu with\n\t * @example\n\t * Creating a select menu from an API data object:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * \tplaceholder: 'select an option',\n\t * \tmax_values: 2,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a select menu using setters and API data:\n\t * ```ts\n\t * const selectMenu = new UserSelectMenuBuilder({\n\t * \tcustom_id: 'a cool select menu',\n\t * })\n\t * \t.setMinValues(1);\n\t * ```\n\t */\n\tpublic constructor(data?: Partial) {\n\t\tsuper({ ...data, type: ComponentType.UserSelect });\n\t}\n\n\t/**\n\t * Adds default users to this auto populated select menu.\n\t *\n\t * @param users - The users to add\n\t */\n\tpublic addDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);\n\t\tthis.data.default_values ??= [];\n\n\t\tthis.data.default_values.push(\n\t\t\t...normalizedValues.map((id) => ({\n\t\t\t\tid,\n\t\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t\t})),\n\t\t);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets default users for this auto populated select menu.\n\t *\n\t * @param users - The users to set\n\t */\n\tpublic setDefaultUsers(...users: RestOrArray) {\n\t\tconst normalizedValues = normalizeArray(users);\n\t\toptionsLengthValidator.parse(normalizedValues.length);\n\n\t\tthis.data.default_values = normalizedValues.map((id) => ({\n\t\t\tid,\n\t\t\ttype: SelectMenuDefaultValueType.User as const,\n\t\t}));\n\n\t\treturn this;\n\t}\n}\n","import { isJSONEncodable, type Equatable, type JSONEncodable } from '@discordjs/util';\nimport { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport isEqual from 'fast-deep-equal';\nimport { customIdValidator } from '../Assertions.js';\nimport { ComponentBuilder } from '../Component.js';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n\tlabelValidator,\n\ttextInputStyleValidator,\n} from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for text inputs.\n */\nexport class TextInputBuilder\n\textends ComponentBuilder\n\timplements Equatable>\n{\n\t/**\n\t * Creates a new text input from API data.\n\t *\n\t * @param data - The API data to create this text input with\n\t * @example\n\t * Creating a text input from an API data object:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tcustom_id: 'a cool text input',\n\t * \tlabel: 'Type something',\n\t * \tstyle: TextInputStyle.Short,\n\t * });\n\t * ```\n\t * @example\n\t * Creating a text input using setters and API data:\n\t * ```ts\n\t * const textInput = new TextInputBuilder({\n\t * \tlabel: 'Type something else',\n\t * })\n\t * \t.setCustomId('woah')\n\t * \t.setStyle(TextInputStyle.Paragraph);\n\t * ```\n\t */\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input.\n\t *\n\t * @param label - The label to use\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = labelValidator.parse(label);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input.\n\t *\n\t * @param style - The style to use\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = textInputStyleValidator.parse(style);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input.\n\t *\n\t * @param minLength - The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLengthValidator.parse(minLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input.\n\t *\n\t * @param maxLength - The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLengthValidator.parse(maxLength);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder for this text input.\n\t *\n\t * @param placeholder - The placeholder to use\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholderValidator.parse(placeholder);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value for this text input.\n\t *\n\t * @param value - The value to use\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = valueValidator.parse(value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required.\n\t *\n\t * @param required - Whether this text input is required\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = requiredValidator.parse(required);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\t/**\n\t * Whether this is equal to another structure.\n\t */\n\tpublic equals(other: APITextInputComponent | JSONEncodable): boolean {\n\t\tif (isJSONEncodable(other)) {\n\t\t\treturn isEqual(other.toJSON(), this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { TextInputStyle } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport { customIdValidator } from '../Assertions.js';\n\nexport const textInputStyleValidator = s.nativeEnum(TextInputStyle);\nexport const minLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const maxLengthValidator = s\n\t.number()\n\t.int()\n\t.greaterThanOrEqual(1)\n\t.lessThanOrEqual(4_000)\n\t.setValidationEnabled(isValidationEnabled);\nexport const requiredValidator = s.boolean();\nexport const valueValidator = s.string().lengthLessThanOrEqual(4_000).setValidationEnabled(isValidationEnabled);\nexport const placeholderValidator = s.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);\nexport const labelValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const titleValidator = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(45)\n\t.setValidationEnabled(isValidationEnabled);\nexport const componentsValidator = s\n\t.instance(ActionRowBuilder)\n\t.array()\n\t.lengthGreaterThanOrEqual(1)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","/* eslint-disable jsdoc/check-param-names */\n\nimport type { JSONEncodable } from '@discordjs/util';\nimport type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../../components/ActionRow.js';\nimport { customIdValidator } from '../../components/Assertions.js';\nimport { createComponentBuilder } from '../../components/Components.js';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport { titleValidator, validateRequiredParameters } from './Assertions.js';\n\n/**\n * A builder that creates API-compatible JSON data for modals.\n */\nexport class ModalBuilder implements JSONEncodable {\n\t/**\n\t * The API data associated with this modal.\n\t */\n\tpublic readonly data: Partial;\n\n\t/**\n\t * The components within this modal.\n\t */\n\tpublic readonly components: ActionRowBuilder[] = [];\n\n\t/**\n\t * Creates a new modal from API data.\n\t *\n\t * @param data - The API data to create this modal with\n\t */\n\tpublic constructor({ components, ...data }: Partial = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((component) => createComponentBuilder(component)) ??\n\t\t\t[]) as ActionRowBuilder[];\n\t}\n\n\t/**\n\t * Sets the title of this modal.\n\t *\n\t * @param title - The title to use\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = titleValidator.parse(title);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of this modal.\n\t *\n\t * @param customId - The custom id to use\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customIdValidator.parse(customId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal.\n\t *\n\t * @param components - The components to add\n\t */\n\tpublic addComponents(\n\t\t...components: RestOrArray<\n\t\t\tActionRowBuilder | APIActionRowComponent\n\t\t>\n\t) {\n\t\tthis.components.push(\n\t\t\t...normalizeArray(components).map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets components for this modal.\n\t *\n\t * @param components - The components to set\n\t */\n\tpublic setComponents(...components: RestOrArray>) {\n\t\tthis.components.splice(0, this.components.length, ...normalizeArray(components));\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ComponentBuilder.toJSON}\n\t */\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport {\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocale,\n\ttype APIApplicationCommandOptionChoice,\n\ttype LocalizationMap,\n} from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\n\nconst namePredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t.regex(/^[\\p{Ll}\\p{Lm}\\p{Lo}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}_-]+$/u)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(100)\n\t.setValidationEnabled(isValidationEnabled);\nconst localePredicate = s.nativeEnum(Locale);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = s.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\nexport function validateLocale(locale: unknown) {\n\treturn localePredicate.parse(locale);\n}\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = s.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tReturnType extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType {\n\ts.instance(ExpectedInstanceOf).parse(input);\n}\n\nexport const localizationMapPredicate = s\n\t.object(Object.fromEntries(Object.values(Locale).map((locale) => [locale, s.string().nullish()])))\n\t.strict()\n\t.nullish()\n\t.setValidationEnabled(isValidationEnabled);\n\nexport function validateLocalizationMap(value: unknown): asserts value is LocalizationMap {\n\tlocalizationMapPredicate.parse(value);\n}\n\nconst dmPermissionPredicate = s.boolean().nullish();\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s\n\t.union([\n\t\ts.bigint().transform((value) => value.toString()),\n\t\ts\n\t\t\t.number()\n\t\t\t.safeInt()\n\t\t\t.transform((value) => value.toString()),\n\t\ts.string().regex(/^\\d+$/),\n\t])\n\t.nullish();\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport function validateNSFW(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport const contextsPredicate = s.array(\n\ts.nativeEnum(InteractionContextType).setValidationEnabled(isValidationEnabled),\n);\n\nexport const integrationTypesPredicate = s.array(\n\ts.nativeEnum(ApplicationIntegrationType).setValidationEnabled(isValidationEnabled),\n);\n","import type {\n\tAPIApplicationCommandOption,\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocalizationMap,\n\tPermissions,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommand } from './mixins/SharedSlashCommand.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\nimport { SharedSlashCommandSubcommands } from './mixins/SharedSubcommands.js';\n\n/**\n * A builder that creates API-compatible JSON data for slash commands.\n */\n@mix(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * The options of this command.\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * The contexts for this command.\n\t */\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t * @deprecated\n\t * Use {@link SlashCommandBuilder.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The integration types for this command.\n\t */\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\t/**\n\t * Whether this command is NSFW.\n\t */\n\tpublic readonly nsfw: boolean | undefined = undefined;\n}\n\nexport interface SlashCommandBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tSharedSlashCommandSubcommands,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface specifically for slash command subcommands.\n */\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandSubcommands,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface specifically for slash command options.\n */\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tSharedSlashCommand {}\n\n/**\n * An interface that ensures the `toJSON()` call will return something\n * that can be serialized into API-compatible data.\n */\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n","import type { LocaleString, LocalizationMap } from 'discord-api-types/v10';\nimport { validateDescription, validateLocale, validateName } from '../Assertions.js';\n\n/**\n * This mixin holds name and description symbols for slash commands.\n */\nexport class SharedNameAndDescription {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name!: string;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The description of this command.\n\t */\n\tpublic readonly description!: string;\n\n\t/**\n\t * The description localizations of this command.\n\t */\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this command.\n\t *\n\t * @param description - The description to use\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames)) {\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a description localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedDescription - The localized description for the given locale\n\t */\n\tpublic setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null) {\n\t\tif (!this.description_localizations) {\n\t\t\tReflect.set(this, 'description_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedDescription === null) {\n\t\t\tthis.description_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateDescription(localizedDescription);\n\n\t\tthis.description_localizations![parsedLocale] = localizedDescription;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description localizations for this command.\n\t *\n\t * @param localizedDescriptions - The object of localized descriptions to set\n\t */\n\tpublic setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null) {\n\t\tif (localizedDescriptions === null) {\n\t\t\tReflect.set(this, 'description_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'description_localizations', {});\n\t\tfor (const args of Object.entries(localizedDescriptions)) {\n\t\t\tthis.setDescriptionLocalization(...(args as [LocaleString, string | null]));\n\t\t}\n\n\t\treturn this;\n\t}\n}\n","import {\n\tApplicationCommandType,\n\ttype ApplicationIntegrationType,\n\ttype InteractionContextType,\n\ttype LocalizationMap,\n\ttype Permissions,\n\ttype RESTPostAPIChatInputApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport type { RestOrArray } from '../../../util/normalizeArray.js';\nimport { normalizeArray } from '../../../util/normalizeArray.js';\nimport {\n\tcontextsPredicate,\n\tintegrationTypesPredicate,\n\tvalidateDMPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDefaultPermission,\n\tvalidateLocalizationMap,\n\tvalidateNSFW,\n\tvalidateRequiredParameters,\n} from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder.js';\n\n/**\n * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.\n */\nexport class SharedSlashCommand {\n\tpublic readonly name: string = undefined!;\n\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\tpublic readonly description: string = undefined!;\n\n\tpublic readonly description_localizations?: LocalizationMap;\n\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * @deprecated Use {@link SharedSlashCommand.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\tpublic readonly nsfw: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the contexts of this command.\n\t *\n\t * @param contexts - The contexts\n\t */\n\tpublic setContexts(...contexts: RestOrArray) {\n\t\tReflect.set(this, 'contexts', contextsPredicate.parse(normalizeArray(contexts)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the integration types of this command.\n\t *\n\t * @param integrationTypes - The integration types\n\t */\n\tpublic setIntegrationTypes(...integrationTypes: RestOrArray) {\n\t\tReflect.set(this, 'integration_types', integrationTypesPredicate.parse(normalizeArray(integrationTypes)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether or not to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run the command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated\n\t * Use {@link SharedSlashCommand.setContexts} instead.\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this command is NSFW.\n\t *\n\t * @param nsfw - Whether this command is NSFW\n\t */\n\tpublic setNSFW(nsfw = true) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateNSFW(nsfw);\n\t\tReflect.set(this, 'nsfw', nsfw);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\treturn {\n\t\t\t...this,\n\t\t\ttype: ApplicationCommandType.ChatInput,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandAttachmentOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command attachment option.\n */\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired, validateLocalizationMap } from '../Assertions.js';\nimport { SharedNameAndDescription } from './NameAndDescription.js';\n\n/**\n * The base application command option builder that contains common symbols for application command builders.\n */\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option is required.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Sets whether this option is required.\n\t *\n\t * @param required - Whether this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\t/**\n\t * This method runs required validators on this builder.\n\t */\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Validate localizations\n\t\tvalidateLocalizationMap(this.name_localizations);\n\t\tvalidateLocalizationMap(this.description_localizations);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandBooleanOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command boolean option.\n */\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandChannelOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.js';\n\n/**\n * A slash command channel option.\n */\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { s } from '@sapphire/shapeshift';\nimport { ChannelType } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../../util/normalizeArray';\n\n/**\n * The allowed channel types used for a channel option in a slash command builder.\n *\n * @privateRemarks This can't be dynamic because const enums are erased at runtime.\n * @internal\n */\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildAnnouncement,\n\tChannelType.AnnouncementThread,\n\tChannelType.PublicThread,\n\tChannelType.PrivateThread,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildForum,\n\tChannelType.GuildMedia,\n] as const;\n\n/**\n * The type of allowed channel types used for a channel option.\n */\nexport type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];\n\nconst channelTypesPredicate = s.array(s.union(allowedChannelTypes.map((type) => s.literal(type))));\n\n/**\n * This mixin holds channel type symbols used for options.\n */\nexport class ApplicationCommandOptionChannelTypesMixin {\n\t/**\n\t * The channel types of this option.\n\t */\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option.\n\t *\n\t * @param channelTypes - The channel types\n\t */\n\tpublic addChannelTypes(...channelTypes: RestOrArray) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tthis.channel_types!.push(...channelTypesPredicate.parse(normalizeArray(channelTypes)));\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandIntegerOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst numberValidator = s.number().int();\n\n/**\n * A slash command integer option.\n */\n@mix(\n\tApplicationCommandNumericOptionMinMaxValueMixin,\n\tApplicationCommandOptionWithAutocompleteMixin,\n\tApplicationCommandOptionWithChoicesMixin,\n)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandIntegerOption;\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","/**\n * This mixin holds minimum and maximum symbols used for options.\n */\nexport abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\t/**\n\t * The maximum value of this option.\n\t */\n\tpublic readonly max_value?: number;\n\n\t/**\n\t * The minimum value of this option.\n\t */\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option.\n\t *\n\t * @param max - The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option.\n\t *\n\t * @param min - The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { s } from '@sapphire/shapeshift';\nimport type { ApplicationCommandOptionType } from 'discord-api-types/v10';\n\nconst booleanPredicate = s.boolean();\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithAutocompleteMixin {\n\t/**\n\t * Whether this option utilizes autocomplete.\n\t */\n\tpublic readonly autocomplete?: boolean;\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Whether this option uses autocomplete.\n\t *\n\t * @param autocomplete - Whether this option should use autocomplete\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && 'choices' in this && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../../util/normalizeArray.js';\nimport { localizationMapPredicate, validateChoicesLength } from '../Assertions.js';\n\nconst stringPredicate = s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);\nconst numberPredicate = s.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);\nconst choicesPredicate = s\n\t.object({\n\t\tname: stringPredicate,\n\t\tname_localizations: localizationMapPredicate,\n\t\tvalue: s.union([stringPredicate, numberPredicate]),\n\t})\n\t.array();\n\n/**\n * This mixin holds choices and autocomplete symbols used for options.\n */\nexport class ApplicationCommandOptionWithChoicesMixin {\n\t/**\n\t * The choices of this option.\n\t */\n\tpublic readonly choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * The type of this option.\n\t *\n\t * @privateRemarks Since this is present and this is a mixin, this is needed.\n\t */\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices to this option.\n\t *\n\t * @param choices - The choices to add\n\t */\n\tpublic addChoices(...choices: RestOrArray>): this {\n\t\tconst normalizedChoices = normalizeArray(choices);\n\t\tif (normalizedChoices.length > 0 && 'autocomplete' in this && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(normalizedChoices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(normalizedChoices.length, this.choices);\n\n\t\tfor (const { name, name_localizations, value } of normalizedChoices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, name_localizations, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets multiple choices for this option.\n\t *\n\t * @param choices - The choices to set\n\t */\n\tpublic setChoices>(...choices: RestOrArray): this {\n\t\tconst normalizedChoices = normalizeArray(choices);\n\t\tif (normalizedChoices.length > 0 && 'autocomplete' in this && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(normalizedChoices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(normalizedChoices);\n\n\t\treturn this;\n\t}\n}\n","import { ApplicationCommandOptionType, type APIApplicationCommandMentionableOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command mentionable option.\n */\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandNumberOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst numberValidator = s.number();\n\n/**\n * A slash command number option.\n */\n@mix(\n\tApplicationCommandNumericOptionMinMaxValueMixin,\n\tApplicationCommandOptionWithAutocompleteMixin,\n\tApplicationCommandOptionWithChoicesMixin,\n)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}\n\t */\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}\n\t */\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandNumberOption;\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandRoleOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command role option.\n */\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandOptionType, type APIApplicationCommandStringOption } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\nimport { ApplicationCommandOptionWithAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nimport { ApplicationCommandOptionWithChoicesMixin } from '../mixins/ApplicationCommandOptionWithChoicesMixin.js';\n\nconst minLengthValidator = s.number().greaterThanOrEqual(0).lessThanOrEqual(6_000);\nconst maxLengthValidator = s.number().greaterThanOrEqual(1).lessThanOrEqual(6_000);\n\n/**\n * A slash command string option.\n */\n@mix(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\t/**\n\t * The maximum length of this option.\n\t */\n\tpublic readonly max_length?: number;\n\n\t/**\n\t * The minimum length of this option.\n\t */\n\tpublic readonly min_length?: number;\n\n\t/**\n\t * Sets the maximum length of this string option.\n\t *\n\t * @param max - The maximum length this option can be\n\t */\n\tpublic setMaxLength(max: number): this {\n\t\tmaxLengthValidator.parse(max);\n\n\t\tReflect.set(this, 'max_length', max);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of this string option.\n\t *\n\t * @param min - The minimum length this option can be\n\t */\n\tpublic setMinLength(min: number): this {\n\t\tminLengthValidator.parse(min);\n\n\t\tReflect.set(this, 'min_length', min);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this } as APIApplicationCommandStringOption;\n\t}\n}\n\nexport interface SlashCommandStringOption\n\textends ApplicationCommandOptionWithChoicesMixin,\n\t\tApplicationCommandOptionWithAutocompleteMixin {}\n","import { ApplicationCommandOptionType, type APIApplicationCommandUserOption } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.js';\n\n/**\n * A slash command user option.\n */\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\t/**\n\t * The type of this option.\n\t */\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\t/**\n\t * {@inheritDoc ApplicationCommandOptionBase.toJSON}\n\t */\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandAttachmentOption } from '../options/attachment.js';\nimport { SlashCommandBooleanOption } from '../options/boolean.js';\nimport { SlashCommandChannelOption } from '../options/channel.js';\nimport { SlashCommandIntegerOption } from '../options/integer.js';\nimport { SlashCommandMentionableOption } from '../options/mentionable.js';\nimport { SlashCommandNumberOption } from '../options/number.js';\nimport { SlashCommandRoleOption } from '../options/role.js';\nimport { SlashCommandStringOption } from '../options/string.js';\nimport { SlashCommandUserOption } from '../options/user.js';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase.js';\n\n/**\n * This mixin holds symbols that can be shared in slash command options.\n *\n * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option.\n */\nexport class SharedSlashCommandOptions<\n\tTypeAfterAddingOptions extends SharedSlashCommandOptions,\n> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option.\n\t *\n\t * @param input - A function that returns an option builder or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\t/**\n\t * Where the actual adding magic happens. ✨\n\t *\n\t * @param input - The input. What else?\n\t * @param Instance - The instance of whatever is being added\n\t * @internal\n\t */\n\tprivate _sharedAddOptionMethod(\n\t\tinput: OptionBuilder | ((builder: OptionBuilder) => OptionBuilder),\n\t\tInstance: new () => OptionBuilder,\n\t): TypeAfterAddingOptions {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingOptions;\n\t}\n}\n","import {\n\tApplicationCommandOptionType,\n\ttype APIApplicationCommandSubcommandGroupOption,\n\ttype APIApplicationCommandSubcommandOption,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder.js';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase.js';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription.js';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions.js';\n\n/**\n * Represents a folder for subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands within this subcommand group.\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * A builder that creates API-compatible JSON data for slash command subcommands.\n *\n * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand.\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options within this subcommand.\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tname_localizations: this.name_localizations,\n\t\t\tdescription: this.description,\n\t\t\tdescription_localizations: this.description_localizations,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions {}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions.js';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder.js';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from '../SlashCommandSubcommands.js';\n\n/**\n * This mixin holds symbols that can be shared in slash subcommands.\n *\n * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.\n */\nexport class SharedSlashCommandSubcommands<\n\tTypeAfterAddingSubcommands extends SharedSlashCommandSubcommands,\n> {\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Adds a new subcommand group to this command.\n\t *\n\t * @param input - A function that returns a subcommand group builder or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): TypeAfterAddingSubcommands {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingSubcommands;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command.\n\t *\n\t * @param input - A function that returns a subcommand builder or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): TypeAfterAddingSubcommands {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this as unknown as TypeAfterAddingSubcommands;\n\t}\n}\n","import { s } from '@sapphire/shapeshift';\nimport { ApplicationCommandType, ApplicationIntegrationType, InteractionContextType } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder.js';\n\nconst namePredicate = s\n\t.string()\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(32)\n\t// eslint-disable-next-line prefer-named-capture-group\n\t.regex(/^( *[\\p{P}\\p{L}\\p{N}\\p{sc=Devanagari}\\p{sc=Thai}]+ *)+$/u)\n\t.setValidationEnabled(isValidationEnabled);\nconst typePredicate = s\n\t.union([s.literal(ApplicationCommandType.User), s.literal(ApplicationCommandType.Message)])\n\t.setValidationEnabled(isValidationEnabled);\nconst booleanPredicate = s.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst dmPermissionPredicate = s.boolean().nullish();\n\nexport function validateDMPermission(value: unknown): asserts value is boolean | null | undefined {\n\tdmPermissionPredicate.parse(value);\n}\n\nconst memberPermissionPredicate = s\n\t.union([\n\t\ts.bigint().transform((value) => value.toString()),\n\t\ts\n\t\t\t.number()\n\t\t\t.safeInt()\n\t\t\t.transform((value) => value.toString()),\n\t\ts.string().regex(/^\\d+$/),\n\t])\n\t.nullish();\n\nexport function validateDefaultMemberPermissions(permissions: unknown) {\n\treturn memberPermissionPredicate.parse(permissions);\n}\n\nexport const contextsPredicate = s.array(\n\ts.nativeEnum(InteractionContextType).setValidationEnabled(isValidationEnabled),\n);\n\nexport const integrationTypesPredicate = s.array(\n\ts.nativeEnum(ApplicationIntegrationType).setValidationEnabled(isValidationEnabled),\n);\n","import type {\n\tApplicationCommandType,\n\tApplicationIntegrationType,\n\tInteractionContextType,\n\tLocaleString,\n\tLocalizationMap,\n\tPermissions,\n\tRESTPostAPIContextMenuApplicationCommandsJSONBody,\n} from 'discord-api-types/v10';\nimport type { RestOrArray } from '../../util/normalizeArray.js';\nimport { normalizeArray } from '../../util/normalizeArray.js';\nimport { validateLocale, validateLocalizationMap } from '../slashCommands/Assertions.js';\nimport {\n\tvalidateRequiredParameters,\n\tvalidateName,\n\tvalidateType,\n\tvalidateDefaultPermission,\n\tvalidateDefaultMemberPermissions,\n\tvalidateDMPermission,\n\tcontextsPredicate,\n\tintegrationTypesPredicate,\n} from './Assertions.js';\n\n/**\n * The type a context menu command can be.\n */\nexport type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;\n\n/**\n * A builder that creates API-compatible JSON data for context menu commands.\n */\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this command.\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The name localizations of this command.\n\t */\n\tpublic readonly name_localizations?: LocalizationMap;\n\n\t/**\n\t * The type of this command.\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * The contexts for this command.\n\t */\n\tpublic readonly contexts?: InteractionContextType[];\n\n\t/**\n\t * Whether this command is enabled by default when the application is added to a guild.\n\t *\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic readonly default_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The set of permissions represented as a bit set for the command.\n\t */\n\tpublic readonly default_member_permissions: Permissions | null | undefined = undefined;\n\n\t/**\n\t * Indicates whether the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This property is only for global commands.\n\t * @deprecated\n\t * Use {@link ContextMenuCommandBuilder.contexts} instead.\n\t */\n\tpublic readonly dm_permission: boolean | undefined = undefined;\n\n\t/**\n\t * The integration types for this command.\n\t */\n\tpublic readonly integration_types?: ApplicationIntegrationType[];\n\n\t/**\n\t * Sets the contexts of this command.\n\t *\n\t * @param contexts - The contexts\n\t */\n\tpublic setContexts(...contexts: RestOrArray) {\n\t\tReflect.set(this, 'contexts', contextsPredicate.parse(normalizeArray(contexts)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets integration types of this command.\n\t *\n\t * @param integrationTypes - The integration types\n\t */\n\tpublic setIntegrationTypes(...integrationTypes: RestOrArray) {\n\t\tReflect.set(this, 'integration_types', integrationTypesPredicate.parse(normalizeArray(integrationTypes)));\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name of this command.\n\t *\n\t * @param name - The name to use\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type of this command.\n\t *\n\t * @param type - The type to use\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * @remarks\n\t * If set to `false`, you will have to later `PUT` the permissions for this command.\n\t * @param value - Whether to enable this command by default\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'default_permission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the default permissions a member should have in order to run this command.\n\t *\n\t * @remarks\n\t * You can set this to `'0'` to disable the command by default.\n\t * @param permissions - The permissions bit field to set\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t */\n\tpublic setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined) {\n\t\t// Assert the value and parse it\n\t\tconst permissionValue = validateDefaultMemberPermissions(permissions);\n\n\t\tReflect.set(this, 'default_member_permissions', permissionValue);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets if the command is available in direct messages with the application.\n\t *\n\t * @remarks\n\t * By default, commands are visible. This method is only for global commands.\n\t * @param enabled - Whether the command should be enabled in direct messages\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}\n\t * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead.\n\t */\n\tpublic setDMPermission(enabled: boolean | null | undefined) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDMPermission(enabled);\n\n\t\tReflect.set(this, 'dm_permission', enabled);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a name localization for this command.\n\t *\n\t * @param locale - The locale to set\n\t * @param localizedName - The localized name for the given `locale`\n\t */\n\tpublic setNameLocalization(locale: LocaleString, localizedName: string | null) {\n\t\tif (!this.name_localizations) {\n\t\t\tReflect.set(this, 'name_localizations', {});\n\t\t}\n\n\t\tconst parsedLocale = validateLocale(locale);\n\n\t\tif (localizedName === null) {\n\t\t\tthis.name_localizations![parsedLocale] = null;\n\t\t\treturn this;\n\t\t}\n\n\t\tvalidateName(localizedName);\n\n\t\tthis.name_localizations![parsedLocale] = localizedName;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the name localizations for this command.\n\t *\n\t * @param localizedNames - The object of localized names to set\n\t */\n\tpublic setNameLocalizations(localizedNames: LocalizationMap | null) {\n\t\tif (localizedNames === null) {\n\t\t\tReflect.set(this, 'name_localizations', null);\n\t\t\treturn this;\n\t\t}\n\n\t\tReflect.set(this, 'name_localizations', {});\n\n\t\tfor (const args of Object.entries(localizedNames))\n\t\t\tthis.setNameLocalization(...(args as [LocaleString, string | null]));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Serializes this builder to API-compatible JSON data.\n\t *\n\t * @remarks\n\t * This method runs validations on the data before serializing it.\n\t * As such, it may throw an error if the data is invalid.\n\t */\n\tpublic toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\n\t\tvalidateLocalizationMap(this.name_localizations);\n\n\t\treturn { ...this };\n\t}\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\n/**\n * Calculates the length of the embed.\n *\n * @param data - The embed data to check\n */\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,SAAS;;;ACAlB,IAAI,WAAW;AAOR,SAAS,mBAAmB;AAClC,SAAQ,WAAW;AACpB;AAFgB;AAST,SAAS,oBAAoB;AACnC,SAAQ,WAAW;AACpB;AAFgB;AAOT,SAAS,sBAAsB;AACrC,SAAO;AACR;AAFgB;;;ADnBT,IAAM,qBAAqB,EAAE,OAAO,EAAE,sBAAsB,GAAG,EAAE,qBAAqB,mBAAmB;AAEzG,IAAM,sBAAs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aAAO;AAAA,IACR;AAEA,IAAAH,cAAa,aAAa;AAE1B,SAAK,mBAAoB,YAAY,IAAI;AACzC,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,qBAAqB,gBAAwC;AACnE,QAAI,mBAAmB,MAAM;AAC5B,cAAQ,IAAI,MAAM,sBAAsB,IAAI;AAC5C,aAAO;AAAA,IACR;AAEA,YAAQ,IAAI,MAAM,sBAAsB,CAAC,CAAC;AAE1C,eAAW,QAAQ,OAAO,QAAQ,cAAc;AAC/C,WAAK,oBAAoB,GAAI,IAAsC;AACpE,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,SAA4D;AAClE,IAAAI,4BAA2B,KAAK,MAAM,KAAK,IAAI;AAE/C,4BAAwB,KAAK,kBAAkB;AAE/C,WAAO,EAAE,GAAG,KAAK;AAAA,EAClB;AACD;;;ACvOO,SAAS,YAAY,MAAgB;AAC3C,UACE,KAAK,OAAO,UAAU,MACtB,KAAK,aAAa,UAAU,MAC5B,KAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,CAAC,KAAK,MACvF,KAAK,QAAQ,KAAK,UAAU,MAC5B,KAAK,QAAQ,KAAK,UAAU;AAE/B;AARgB;;;AxCgET,IAAM,UAAU;","names":["Assertions_exports","s","s","ComponentType","ComponentType","ComponentType","ComponentType","ComponentType","SelectMenuDefaultValueType","ComponentType","SelectMenuDefaultValueType","ComponentType","SelectMenuDefaultValueType","ComponentType","SelectMenuDefaultValueType","ComponentType","ComponentType","ComponentType","SelectMenuDefaultValueType","ComponentType","SelectMenuDefaultValueType","ComponentType","Assertions_exports","placeholderValidator","s","s","placeholderValidator","ComponentType","placeholderValidator","ComponentType","ComponentType","Assertions_exports","validateRequiredParameters","s","s","validateRequiredParameters","validateRequiredParameters","Assertions_exports","validateRequiredParameters","s","s","descriptionPredicate","validateRequiredParameters","mix","validateRequiredParameters","validateRequiredParameters","ApplicationCommandOptionType","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ChannelType","ChannelType","s","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","s","booleanPredicate","s","s","ApplicationCommandOptionType","s","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","numberValidator","s","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","s","ApplicationCommandOptionType","mix","minLengthValidator","s","maxLengthValidator","ApplicationCommandOptionType","mix","ApplicationCommandOptionType","ApplicationCommandOptionType","ApplicationCommandOptionType","mix","validateRequiredParameters","ApplicationCommandOptionType","mix","mix","Assertions_exports","contextsPredicate","integrationTypesPredicate","validateDMPermission","validateDefaultMemberPermissions","validateDefaultPermission","validateName","validateRequiredParameters","s","ApplicationCommandType","ApplicationIntegrationType","InteractionContextType","namePredicate","s","ApplicationCommandType","booleanPredicate","validateDefaultPermission","validateName","validateRequiredParameters","dmPermissionPredicate","validateDMPermission","memberPermissionPredicate","validateDefaultMemberPermissions","contextsPredicate","InteractionContextType","integrationTypesPredicate","ApplicationIntegrationType","contextsPredicate","integrationTypesPredicate","validateName","validateDefaultPermission","validateDefaultMemberPermissions","validateDMPermission","validateRequiredParameters"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/package.json b/node_modules/@discordjs/builders/package.json new file mode 100644 index 0000000..1b92221 --- /dev/null +++ b/node_modules/@discordjs/builders/package.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://json.schemastore.org/package.json", + "name": "@discordjs/builders", + "version": "1.10.1", + "description": "A set of builders that you can use when creating your bot", + "exports": { + ".": { + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + } + } + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "directories": { + "lib": "src", + "test": "__tests__" + }, + "files": [ + "dist" + ], + "contributors": [ + "Vlad Frangu ", + "Crawl ", + "Amish Shah ", + "SpaceEEC ", + "Aura Román " + ], + "license": "Apache-2.0", + "keywords": [ + "discord", + "api", + "bot", + "client", + "node", + "discordapp", + "discordjs" + ], + "repository": { + "type": "git", + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/builders" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "funding": "https://github.com/discordjs/discord.js?sponsor", + "dependencies": { + "@sapphire/shapeshift": "^4.0.0", + "discord-api-types": "^0.37.119", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.4", + "tslib": "^2.6.3", + "@discordjs/util": "^1.1.1", + "@discordjs/formatters": "^0.6.0" + }, + "devDependencies": { + "@favware/cliff-jumper": "^4.1.0", + "@types/node": "^16.18.105", + "@vitest/coverage-v8": "^2.0.5", + "cross-env": "^7.0.3", + "esbuild-plugin-version-injector": "^1.2.1", + "eslint": "^8.57.0", + "eslint-config-neon": "^0.1.62", + "eslint-formatter-pretty": "^6.0.1", + "prettier": "^3.3.3", + "tsup": "^8.2.4", + "turbo": "^2.0.14", + "typescript": "~5.5.4", + "vitest": "^2.0.5", + "@discordjs/api-extractor": "^7.38.1", + "@discordjs/scripts": "^0.1.0" + }, + "engines": { + "node": ">=16.11.0" + }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "scripts": { + "test": "vitest run", + "build": "tsc --noEmit && tsup", + "build:docs": "tsc -p tsconfig.docs.json", + "lint": "prettier --check . && cross-env TIMING=1 eslint --format=pretty src __tests__", + "format": "prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src __tests__", + "fmt": "pnpm run format", + "docs": "pnpm run build:docs && api-extractor run --local --minify && generate-split-documentation", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/builders/*'", + "release": "cliff-jumper" + } +} \ No newline at end of file diff --git a/node_modules/@discordjs/collection/CHANGELOG.md b/node_modules/@discordjs/collection/CHANGELOG.md new file mode 100644 index 0000000..2c43057 --- /dev/null +++ b/node_modules/@discordjs/collection/CHANGELOG.md @@ -0,0 +1,190 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +# [@discordjs/collection@1.5.3](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.2...@discordjs/collection@1.5.3) - (2023-08-17) + +## Documentation + +- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6)) + +# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31) + +## Refactor + +- **collection:** Reduce `reduce`'s code (#9581) ([b85a3f2](https://github.com/discordjs/discord.js/commit/b85a3f2ddee8fc5974749b95fc07389a03093df2)) + +# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31) + +## Refactor + +- **collection:** Reduce `reduce`'s code (#9581) ([b85a3f2](https://github.com/discordjs/discord.js/commit/b85a3f2ddee8fc5974749b95fc07389a03093df2)) + +# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01) + +## Bug Fixes + +- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2)) + +## Documentation + +- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9)) + +# [@discordjs/collection@1.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.4.0...@discordjs/collection@1.5.0) - (2023-04-01) + +## Bug Fixes + +- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b)) + +## Features + +- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b)) + +## Refactor + +- **collection:** Fix/silence linter warnings (#9266) ([d6f4e60](https://github.com/discordjs/discord.js/commit/d6f4e60efd1a1796fc84dbbfbac4f9790e480a1c)) + +# [@discordjs/collection@1.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.3.0...@discordjs/collection@1.4.0) - (2023-03-12) + +## Documentation + +- Fix version export (#9049) ([8b70f49](https://github.com/discordjs/discord.js/commit/8b70f497a1207e30edebdecd12b926c981c13d28)) + +## Features + +- **website:** Add support for source file links (#9048) ([f6506e9](https://github.com/discordjs/discord.js/commit/f6506e99c496683ee0ab67db0726b105b929af38)) + +## Refactor + +- Compare with `undefined` directly (#9191) ([869153c](https://github.com/discordjs/discord.js/commit/869153c3fdf155783e7c0ecebd3627b087c3a026)) + +# [@discordjs/collection@1.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.2.0...@discordjs/collection@1.3.0) - (2022-11-28) + +## Bug Fixes + +- Pin @types/node version ([9d8179c](https://github.com/discordjs/discord.js/commit/9d8179c6a78e1c7f9976f852804055964d5385d4)) + +## Features + +- Add `Collection#subtract()` (#8393) ([291f36c](https://github.com/discordjs/discord.js/commit/291f36cd736b5dea058145a1335bf7c78ec1d81d)) + +# [@discordjs/collection@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.1.0...@discordjs/collection@1.2.0) - (2022-10-08) + +## Bug Fixes + +- Footer / sidebar / deprecation alert ([ba3e0ed](https://github.com/discordjs/discord.js/commit/ba3e0ed348258fe8e51eefb4aa7379a1230616a9)) + +## Documentation + +- Change name (#8604) ([dd5a089](https://github.com/discordjs/discord.js/commit/dd5a08944c258a847fc4377f1d5e953264ab47d0)) +- Remove xml tag from collection#find (#8550) ([4032457](https://github.com/discordjs/discord.js/commit/40324574ebea9894cadcc967e0db0e4e21d62768)) + +## Features + +- Web-components (#8715) ([0ac3e76](https://github.com/discordjs/discord.js/commit/0ac3e766bd9dbdeb106483fa4bb085d74de346a2)) + +## Refactor + +- Website components (#8600) ([c334157](https://github.com/discordjs/discord.js/commit/c3341570d983aea9ecc419979d5a01de658c9d67)) +- Use `eslint-config-neon` for packages. (#8579) ([edadb9f](https://github.com/discordjs/discord.js/commit/edadb9fe5dfd9ff51a3cfc9b25cb242d3f9f5241)) + +## Typings + +- **Collection:** Make fn return type unknown (#8676) ([822b7f2](https://github.com/discordjs/discord.js/commit/822b7f234af053c8f917b0a998b82abfccd33801)) + +# [@discordjs/collection@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.0.1...@discordjs/collection@1.1.0) - (2022-08-22) + +## Bug Fixes + +- Use proper format for `@link` text (#8384) ([2655639](https://github.com/discordjs/discord.js/commit/26556390a3800e954974a00c1328ff47d3e67e9a)) + +## Documentation + +- Fence examples in codeblocks ([193b252](https://github.com/discordjs/discord.js/commit/193b252672440a860318d3c2968aedd9cb88e0ce)) +- Use link tags (#8382) ([5494791](https://github.com/discordjs/discord.js/commit/549479131318c659f86f0eb18578d597e22522d3)) + +## Features + +- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007)) +- **website:** Show descriptions for `@typeParam` blocks (#8523) ([e475b63](https://github.com/discordjs/discord.js/commit/e475b63f257f6261d73cb89fee9ecbcdd84e2a6b)) + +## Refactor + +- **website:** Adjust typography (#8503) ([0f83402](https://github.com/discordjs/discord.js/commit/0f834029850d2448981596cf082ff59917018d66)) +- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e)) + +# [@discordjs/collection@0.8.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.7.0...@discordjs/collection@0.8.0) - (2022-07-17) + +## Bug Fixes + +- **Collection:** Make error messages consistent (#8224) ([5bd6b28](https://github.com/discordjs/discord.js/commit/5bd6b28b3ebfced1cb9d23e83bd7c0def7a12404)) +- Check for function type (#8064) ([3bb9c0e](https://github.com/discordjs/discord.js/commit/3bb9c0e5c37311044ff41761b572ac4f91cda57c)) + +## Documentation + +- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5)) + +## Features + +- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0)) +- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21)) +- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc)) +- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b)) +- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86)) +- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b)) +- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b)) + +## Refactor + +- **collection:** Remove `default` property (#8055) ([c8f1690](https://github.com/discordjs/discord.js/commit/c8f1690896f55f06e05a83704262783cfc2bb91d)) +- **collection:** Remove default export (#8053) ([16810f3](https://github.com/discordjs/discord.js/commit/16810f3e410bf35ed7e6e7412d517ea74c792c5d)) +- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a)) + +## Testing + +- **collection:** Improve coverage (#8222) ([a51f721](https://github.com/discordjs/discord.js/commit/a51f7215eca67a0f46fba8b2d706f7ec6f6dc228)) + +# [@discordjs/collection@0.7.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.6.0...@discordjs/collection@0.7.0) - (2022-06-04) + +## Styling + +- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629)) + +# [@discordjs/collection@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.5.0...@discordjs/collection@0.6.0) - (2022-04-17) + +## Features + +- Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d)) +- **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb)) +- **Collection:** Add merging functions (#7299) ([e4bd07b](https://github.com/discordjs/discord.js/commit/e4bd07b2394f227ea06b72eb6999de9ab3127b25)) + +# [@discordjs/collection@0.5.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.4.0...@discordjs/collection@0.5.0) - (2022-01-24) + +## Refactor + +- Make `intersect` perform a true intersection (#7211) ([d8efba2](https://github.com/discordjs/discord.js/commit/d8efba24e09aa2a8dbf028fc57a561a56e7833fd)) + +## Typings + +- Add `ReadonlyCollection` (#7245) ([db25f52](https://github.com/discordjs/discord.js/commit/db25f529b26d7c819c1c42ad3e26c2263ea2da0e)) +- **Collection:** Union types on `intersect` and `difference` (#7196) ([1f9b922](https://github.com/discordjs/discord.js/commit/1f9b9225f2066e9cc66c3355417139fd25cc403c)) diff --git a/node_modules/@discordjs/collection/LICENSE b/node_modules/@discordjs/collection/LICENSE new file mode 100644 index 0000000..d21f37a --- /dev/null +++ b/node_modules/@discordjs/collection/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021 Noel Buechler + Copyright 2015 Amish Shah + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@discordjs/collection/README.md b/node_modules/@discordjs/collection/README.md new file mode 100644 index 0000000..4ddde14 --- /dev/null +++ b/node_modules/@discordjs/collection/README.md @@ -0,0 +1,67 @@ +
+
+

+ discord.js +

+
+

+ Discord server + npm version + npm downloads + Build status + Code coverage +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`@discordjs/collection` is a powerful utility data structure used in discord.js. + +## Installation + +**Node.js 16.11.0 or newer is required.** + +```sh +npm install @discordjs/collection +yarn add @discordjs/collection +pnpm add @discordjs/collection +``` + +## Links + +- [Website][website] ([source][website-source]) +- [Documentation][documentation] +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/collection/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/collection +[npm]: https://www.npmjs.com/package/@discordjs/collection +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/node_modules/@discordjs/collection/dist/index.d.mts b/node_modules/@discordjs/collection/dist/index.d.mts new file mode 100644 index 0000000..5990c61 --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.d.mts @@ -0,0 +1,457 @@ +/** + * @internal + */ +interface CollectionConstructor { + new (): Collection; + new (entries?: readonly (readonly [K, V])[] | null): Collection; + new (iterable: Iterable): Collection; + readonly prototype: Collection; + readonly [Symbol.species]: CollectionConstructor; +} +/** + * Represents an immutable version of a collection + */ +type ReadonlyCollection = Omit, 'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'> & ReadonlyMap; +/** + * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself + * + * @internal + */ +interface Collection extends Map { + constructor: CollectionConstructor; +} +/** + * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has + * an ID, for significantly improved performance and ease-of-use. + * + * @typeParam K - The key type this collection holds + * @typeParam V - The value type this collection holds + */ +declare class Collection extends Map { + /** + * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator. + * + * @param key - The key to get if it exists, or set otherwise + * @param defaultValueGenerator - A function that generates the default value + * @example + * ```ts + * collection.ensure(guildId, () => defaultGuildConfig); + * ``` + */ + ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V; + /** + * Checks if all of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if all of the elements exist, `false` if at least one does not exist. + */ + hasAll(...keys: K[]): boolean; + /** + * Checks if any of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if any of the elements exist, `false` if none exist. + */ + hasAny(...keys: K[]): boolean; + /** + * Obtains the first value(s) in this collection. + * + * @param amount - Amount of values to obtain from the beginning + * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative + */ + first(): V | undefined; + first(amount: number): V[]; + /** + * Obtains the first key(s) in this collection. + * + * @param amount - Amount of keys to obtain from the beginning + * @returns A single key if no amount is provided or an array of keys, starting from the end if + * amount is negative + */ + firstKey(): K | undefined; + firstKey(amount: number): K[]; + /** + * Obtains the last value(s) in this collection. + * + * @param amount - Amount of values to obtain from the end + * @returns A single value if no amount is provided or an array of values, starting from the start if + * amount is negative + */ + last(): V | undefined; + last(amount: number): V[]; + /** + * Obtains the last key(s) in this collection. + * + * @param amount - Amount of keys to obtain from the end + * @returns A single key if no amount is provided or an array of keys, starting from the start if + * amount is negative + */ + lastKey(): K | undefined; + lastKey(amount: number): K[]; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the item at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the element to obtain + */ + at(index: number): V | undefined; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the key at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the key to obtain + */ + keyAt(index: number): K | undefined; + /** + * Obtains unique random value(s) from this collection. + * + * @param amount - Amount of values to obtain randomly + * @returns A single value if no amount is provided or an array of values + */ + random(): V | undefined; + random(amount: number): V[]; + /** + * Obtains unique random key(s) from this collection. + * + * @param amount - Amount of keys to obtain randomly + * @returns A single key if no amount is provided or an array + */ + randomKey(): K | undefined; + randomKey(amount: number): K[]; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()} + * but returns a Collection instead of an Array. + */ + reverse(): this; + /** + * Searches for a single item where the given function returns a truthy value. This behaves like + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}. + * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you + * should use the `get` method. See + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.find(user => user.username === 'Bob'); + * ``` + */ + find(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined; + find(fn: (value: V, key: K, collection: this) => unknown): V | undefined; + find(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): V2 | undefined; + find(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined; + /** + * Searches for the key of a single item where the given function returns a truthy value. This behaves like + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()}, + * but returns the key rather than the positional index. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.findKey(user => user.username === 'Bob'); + * ``` + */ + findKey(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined; + findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined; + findKey(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): K2 | undefined; + findKey(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined; + /** + * Removes items that satisfy the provided filter function. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @returns The number of removed entries + */ + sweep(fn: (value: V, key: K, collection: this) => unknown): number; + sweep(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number; + /** + * Identical to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()}, + * but returns a Collection instead of an Array. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.filter(user => user.username === 'Bob'); + * ``` + */ + filter(fn: (value: V, key: K, collection: this) => key is K2): Collection; + filter(fn: (value: V, key: K, collection: this) => value is V2): Collection; + filter(fn: (value: V, key: K, collection: this) => unknown): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection; + /** + * Partitions the collection into two collections where the first collection + * contains the items that passed and the second contains the items that failed. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * const [big, small] = collection.partition(guild => guild.memberCount > 250); + * ``` + */ + partition(fn: (value: V, key: K, collection: this) => key is K2): [Collection, Collection, V>]; + partition(fn: (value: V, key: K, collection: this) => value is V2): [Collection, Collection>]; + partition(fn: (value: V, key: K, collection: this) => unknown): [Collection, Collection]; + partition(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): [Collection, Collection, V>]; + partition(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): [Collection, Collection>]; + partition(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): [Collection, Collection]; + /** + * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}. + * + * @param fn - Function that produces a new Collection + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.flatMap(guild => guild.members.cache); + * ``` + */ + flatMap(fn: (value: V, key: K, collection: this) => Collection): Collection; + flatMap(fn: (this: This, value: V, key: K, collection: this) => Collection, thisArg: This): Collection; + /** + * Maps each item to another value into an array. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. + * + * @param fn - Function that produces an element of the new array, taking three arguments + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.map(user => user.tag); + * ``` + */ + map(fn: (value: V, key: K, collection: this) => T): T[]; + map(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[]; + /** + * Maps each item to another value into a collection. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. + * + * @param fn - Function that produces an element of the new collection, taking three arguments + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.mapValues(user => user.tag); + * ``` + */ + mapValues(fn: (value: V, key: K, collection: this) => T): Collection; + mapValues(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection; + /** + * Checks if there exists an item that passes a test. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.some(user => user.discriminator === '0000'); + * ``` + */ + some(fn: (value: V, key: K, collection: this) => unknown): boolean; + some(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean; + /** + * Checks if all items passes a test. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.every(user => !user.bot); + * ``` + */ + every(fn: (value: V, key: K, collection: this) => key is K2): this is Collection; + every(fn: (value: V, key: K, collection: this) => value is V2): this is Collection; + every(fn: (value: V, key: K, collection: this) => unknown): boolean; + every(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): this is Collection; + every(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): this is Collection; + every(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean; + /** + * Applies a function to produce a single value. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}. + * + * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`, + * and `collection` + * @param initialValue - Starting value for the accumulator + * @example + * ```ts + * collection.reduce((acc, guild) => acc + guild.memberCount, 0); + * ``` + */ + reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T; + /** + * Identical to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()}, + * but returns the collection instead of undefined. + * + * @param fn - Function to execute for each element + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection + * .each(user => console.log(user.username)) + * .filter(user => user.bot) + * .each(user => console.log(user.username)); + * ``` + */ + each(fn: (value: V, key: K, collection: this) => void): this; + each(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this; + /** + * Runs a function on the collection and returns the collection. + * + * @param fn - Function to execute + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection + * .tap(coll => console.log(coll.size)) + * .filter(user => user.bot) + * .tap(coll => console.log(coll.size)) + * ``` + */ + tap(fn: (collection: this) => void): this; + tap(fn: (this: T, collection: this) => void, thisArg: T): this; + /** + * Creates an identical shallow copy of this collection. + * + * @example + * ```ts + * const newColl = someColl.clone(); + * ``` + */ + clone(): Collection; + /** + * Combines this collection with others into a new collection. None of the source collections are modified. + * + * @param collections - Collections to merge + * @example + * ```ts + * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); + * ``` + */ + concat(...collections: ReadonlyCollection[]): Collection; + /** + * Checks if this collection shares identical items with another. + * This is different to checking for equality using equal-signs, because + * the collections may be different objects, but contain the same data. + * + * @param collection - Collection to compare with + * @returns Whether the collections have identical contents + */ + equals(collection: ReadonlyCollection): boolean; + /** + * The sort method sorts the items of a collection in place and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element. + * @example + * ```ts + * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sort(compareFunction?: Comparator): this; + /** + * The intersect method returns a new structure containing items where the keys and values are present in both original structures. + * + * @param other - The other Collection to filter against + */ + intersect(other: ReadonlyCollection): Collection; + /** + * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other. + * + * @param other - The other Collection to filter against + */ + subtract(other: ReadonlyCollection): Collection; + /** + * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other. + * + * @param other - The other Collection to filter against + */ + difference(other: ReadonlyCollection): Collection; + /** + * Merges two Collections together into a new Collection. + * + * @param other - The other Collection to merge with + * @param whenInSelf - Function getting the result if the entry only exists in this Collection + * @param whenInOther - Function getting the result if the entry only exists in the other Collection + * @param whenInBoth - Function getting the result if the entry exists in both Collections + * @example + * ```ts + * // Sums up the entries in two collections. + * coll.merge( + * other, + * x => ({ keep: true, value: x }), + * y => ({ keep: true, value: y }), + * (x, y) => ({ keep: true, value: x + y }), + * ); + * ``` + * @example + * ```ts + * // Intersects two collections in a left-biased manner. + * coll.merge( + * other, + * x => ({ keep: false }), + * y => ({ keep: false }), + * (x, _) => ({ keep: true, value: x }), + * ); + * ``` + */ + merge(other: ReadonlyCollection, whenInSelf: (value: V, key: K) => Keep, whenInOther: (valueOther: T, key: K) => Keep, whenInBoth: (value: V, valueOther: T, key: K) => Keep): Collection; + /** + * The sorted method sorts the items of a collection and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, + * according to the string conversion of each element. + * @example + * ```ts + * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sorted(compareFunction?: Comparator): Collection; + toJSON(): V[]; + private static defaultSort; + /** + * Creates a Collection from a list of entries. + * + * @param entries - The list of entries + * @param combine - Function to combine an existing entry with a new one + * @example + * ```ts + * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y); + * // returns Collection { "a" => 3, "b" => 2 } + * ``` + */ + static combineEntries(entries: Iterable<[K, V]>, combine: (firstValue: V, secondValue: V, key: K) => V): Collection; +} +/** + * @internal + */ +type Keep = { + keep: false; +} | { + keep: true; + value: V; +}; +/** + * @internal + */ +type Comparator = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version + * that you are currently using. + */ +declare const version: string; + +export { Collection, CollectionConstructor, Comparator, Keep, ReadonlyCollection, version }; diff --git a/node_modules/@discordjs/collection/dist/index.d.ts b/node_modules/@discordjs/collection/dist/index.d.ts new file mode 100644 index 0000000..5990c61 --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.d.ts @@ -0,0 +1,457 @@ +/** + * @internal + */ +interface CollectionConstructor { + new (): Collection; + new (entries?: readonly (readonly [K, V])[] | null): Collection; + new (iterable: Iterable): Collection; + readonly prototype: Collection; + readonly [Symbol.species]: CollectionConstructor; +} +/** + * Represents an immutable version of a collection + */ +type ReadonlyCollection = Omit, 'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'> & ReadonlyMap; +/** + * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself + * + * @internal + */ +interface Collection extends Map { + constructor: CollectionConstructor; +} +/** + * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has + * an ID, for significantly improved performance and ease-of-use. + * + * @typeParam K - The key type this collection holds + * @typeParam V - The value type this collection holds + */ +declare class Collection extends Map { + /** + * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator. + * + * @param key - The key to get if it exists, or set otherwise + * @param defaultValueGenerator - A function that generates the default value + * @example + * ```ts + * collection.ensure(guildId, () => defaultGuildConfig); + * ``` + */ + ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V; + /** + * Checks if all of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if all of the elements exist, `false` if at least one does not exist. + */ + hasAll(...keys: K[]): boolean; + /** + * Checks if any of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if any of the elements exist, `false` if none exist. + */ + hasAny(...keys: K[]): boolean; + /** + * Obtains the first value(s) in this collection. + * + * @param amount - Amount of values to obtain from the beginning + * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative + */ + first(): V | undefined; + first(amount: number): V[]; + /** + * Obtains the first key(s) in this collection. + * + * @param amount - Amount of keys to obtain from the beginning + * @returns A single key if no amount is provided or an array of keys, starting from the end if + * amount is negative + */ + firstKey(): K | undefined; + firstKey(amount: number): K[]; + /** + * Obtains the last value(s) in this collection. + * + * @param amount - Amount of values to obtain from the end + * @returns A single value if no amount is provided or an array of values, starting from the start if + * amount is negative + */ + last(): V | undefined; + last(amount: number): V[]; + /** + * Obtains the last key(s) in this collection. + * + * @param amount - Amount of keys to obtain from the end + * @returns A single key if no amount is provided or an array of keys, starting from the start if + * amount is negative + */ + lastKey(): K | undefined; + lastKey(amount: number): K[]; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the item at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the element to obtain + */ + at(index: number): V | undefined; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the key at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the key to obtain + */ + keyAt(index: number): K | undefined; + /** + * Obtains unique random value(s) from this collection. + * + * @param amount - Amount of values to obtain randomly + * @returns A single value if no amount is provided or an array of values + */ + random(): V | undefined; + random(amount: number): V[]; + /** + * Obtains unique random key(s) from this collection. + * + * @param amount - Amount of keys to obtain randomly + * @returns A single key if no amount is provided or an array + */ + randomKey(): K | undefined; + randomKey(amount: number): K[]; + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()} + * but returns a Collection instead of an Array. + */ + reverse(): this; + /** + * Searches for a single item where the given function returns a truthy value. This behaves like + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}. + * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you + * should use the `get` method. See + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.find(user => user.username === 'Bob'); + * ``` + */ + find(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined; + find(fn: (value: V, key: K, collection: this) => unknown): V | undefined; + find(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): V2 | undefined; + find(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined; + /** + * Searches for the key of a single item where the given function returns a truthy value. This behaves like + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()}, + * but returns the key rather than the positional index. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.findKey(user => user.username === 'Bob'); + * ``` + */ + findKey(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined; + findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined; + findKey(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): K2 | undefined; + findKey(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined; + /** + * Removes items that satisfy the provided filter function. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @returns The number of removed entries + */ + sweep(fn: (value: V, key: K, collection: this) => unknown): number; + sweep(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number; + /** + * Identical to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()}, + * but returns a Collection instead of an Array. + * + * @param fn - The function to test with (should return boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.filter(user => user.username === 'Bob'); + * ``` + */ + filter(fn: (value: V, key: K, collection: this) => key is K2): Collection; + filter(fn: (value: V, key: K, collection: this) => value is V2): Collection; + filter(fn: (value: V, key: K, collection: this) => unknown): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): Collection; + filter(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection; + /** + * Partitions the collection into two collections where the first collection + * contains the items that passed and the second contains the items that failed. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * const [big, small] = collection.partition(guild => guild.memberCount > 250); + * ``` + */ + partition(fn: (value: V, key: K, collection: this) => key is K2): [Collection, Collection, V>]; + partition(fn: (value: V, key: K, collection: this) => value is V2): [Collection, Collection>]; + partition(fn: (value: V, key: K, collection: this) => unknown): [Collection, Collection]; + partition(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): [Collection, Collection, V>]; + partition(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): [Collection, Collection>]; + partition(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): [Collection, Collection]; + /** + * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}. + * + * @param fn - Function that produces a new Collection + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.flatMap(guild => guild.members.cache); + * ``` + */ + flatMap(fn: (value: V, key: K, collection: this) => Collection): Collection; + flatMap(fn: (this: This, value: V, key: K, collection: this) => Collection, thisArg: This): Collection; + /** + * Maps each item to another value into an array. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. + * + * @param fn - Function that produces an element of the new array, taking three arguments + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.map(user => user.tag); + * ``` + */ + map(fn: (value: V, key: K, collection: this) => T): T[]; + map(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[]; + /** + * Maps each item to another value into a collection. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}. + * + * @param fn - Function that produces an element of the new collection, taking three arguments + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.mapValues(user => user.tag); + * ``` + */ + mapValues(fn: (value: V, key: K, collection: this) => T): Collection; + mapValues(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection; + /** + * Checks if there exists an item that passes a test. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.some(user => user.discriminator === '0000'); + * ``` + */ + some(fn: (value: V, key: K, collection: this) => unknown): boolean; + some(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean; + /** + * Checks if all items passes a test. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}. + * + * @param fn - Function used to test (should return a boolean) + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection.every(user => !user.bot); + * ``` + */ + every(fn: (value: V, key: K, collection: this) => key is K2): this is Collection; + every(fn: (value: V, key: K, collection: this) => value is V2): this is Collection; + every(fn: (value: V, key: K, collection: this) => unknown): boolean; + every(fn: (this: This, value: V, key: K, collection: this) => key is K2, thisArg: This): this is Collection; + every(fn: (this: This, value: V, key: K, collection: this) => value is V2, thisArg: This): this is Collection; + every(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean; + /** + * Applies a function to produce a single value. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}. + * + * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`, + * and `collection` + * @param initialValue - Starting value for the accumulator + * @example + * ```ts + * collection.reduce((acc, guild) => acc + guild.memberCount, 0); + * ``` + */ + reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T; + /** + * Identical to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()}, + * but returns the collection instead of undefined. + * + * @param fn - Function to execute for each element + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection + * .each(user => console.log(user.username)) + * .filter(user => user.bot) + * .each(user => console.log(user.username)); + * ``` + */ + each(fn: (value: V, key: K, collection: this) => void): this; + each(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this; + /** + * Runs a function on the collection and returns the collection. + * + * @param fn - Function to execute + * @param thisArg - Value to use as `this` when executing function + * @example + * ```ts + * collection + * .tap(coll => console.log(coll.size)) + * .filter(user => user.bot) + * .tap(coll => console.log(coll.size)) + * ``` + */ + tap(fn: (collection: this) => void): this; + tap(fn: (this: T, collection: this) => void, thisArg: T): this; + /** + * Creates an identical shallow copy of this collection. + * + * @example + * ```ts + * const newColl = someColl.clone(); + * ``` + */ + clone(): Collection; + /** + * Combines this collection with others into a new collection. None of the source collections are modified. + * + * @param collections - Collections to merge + * @example + * ```ts + * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); + * ``` + */ + concat(...collections: ReadonlyCollection[]): Collection; + /** + * Checks if this collection shares identical items with another. + * This is different to checking for equality using equal-signs, because + * the collections may be different objects, but contain the same data. + * + * @param collection - Collection to compare with + * @returns Whether the collections have identical contents + */ + equals(collection: ReadonlyCollection): boolean; + /** + * The sort method sorts the items of a collection in place and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element. + * @example + * ```ts + * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sort(compareFunction?: Comparator): this; + /** + * The intersect method returns a new structure containing items where the keys and values are present in both original structures. + * + * @param other - The other Collection to filter against + */ + intersect(other: ReadonlyCollection): Collection; + /** + * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other. + * + * @param other - The other Collection to filter against + */ + subtract(other: ReadonlyCollection): Collection; + /** + * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other. + * + * @param other - The other Collection to filter against + */ + difference(other: ReadonlyCollection): Collection; + /** + * Merges two Collections together into a new Collection. + * + * @param other - The other Collection to merge with + * @param whenInSelf - Function getting the result if the entry only exists in this Collection + * @param whenInOther - Function getting the result if the entry only exists in the other Collection + * @param whenInBoth - Function getting the result if the entry exists in both Collections + * @example + * ```ts + * // Sums up the entries in two collections. + * coll.merge( + * other, + * x => ({ keep: true, value: x }), + * y => ({ keep: true, value: y }), + * (x, y) => ({ keep: true, value: x + y }), + * ); + * ``` + * @example + * ```ts + * // Intersects two collections in a left-biased manner. + * coll.merge( + * other, + * x => ({ keep: false }), + * y => ({ keep: false }), + * (x, _) => ({ keep: true, value: x }), + * ); + * ``` + */ + merge(other: ReadonlyCollection, whenInSelf: (value: V, key: K) => Keep, whenInOther: (valueOther: T, key: K) => Keep, whenInBoth: (value: V, valueOther: T, key: K) => Keep): Collection; + /** + * The sorted method sorts the items of a collection and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, + * according to the string conversion of each element. + * @example + * ```ts + * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sorted(compareFunction?: Comparator): Collection; + toJSON(): V[]; + private static defaultSort; + /** + * Creates a Collection from a list of entries. + * + * @param entries - The list of entries + * @param combine - Function to combine an existing entry with a new one + * @example + * ```ts + * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y); + * // returns Collection { "a" => 3, "b" => 2 } + * ``` + */ + static combineEntries(entries: Iterable<[K, V]>, combine: (firstValue: V, secondValue: V, key: K) => V): Collection; +} +/** + * @internal + */ +type Keep = { + keep: false; +} | { + keep: true; + value: V; +}; +/** + * @internal + */ +type Comparator = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number; + +/** + * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version + * that you are currently using. + */ +declare const version: string; + +export { Collection, CollectionConstructor, Comparator, Keep, ReadonlyCollection, version }; diff --git a/node_modules/@discordjs/collection/dist/index.js b/node_modules/@discordjs/collection/dist/index.js new file mode 100644 index 0000000..d9379ea --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.js @@ -0,0 +1,543 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Collection: () => Collection, + version: () => version +}); +module.exports = __toCommonJS(src_exports); + +// src/collection.ts +var Collection = class _Collection extends Map { + static { + __name(this, "Collection"); + } + /** + * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator. + * + * @param key - The key to get if it exists, or set otherwise + * @param defaultValueGenerator - A function that generates the default value + * @example + * ```ts + * collection.ensure(guildId, () => defaultGuildConfig); + * ``` + */ + ensure(key, defaultValueGenerator) { + if (this.has(key)) + return this.get(key); + if (typeof defaultValueGenerator !== "function") + throw new TypeError(`${defaultValueGenerator} is not a function`); + const defaultValue = defaultValueGenerator(key, this); + this.set(key, defaultValue); + return defaultValue; + } + /** + * Checks if all of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if all of the elements exist, `false` if at least one does not exist. + */ + hasAll(...keys) { + return keys.every((key) => super.has(key)); + } + /** + * Checks if any of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if any of the elements exist, `false` if none exist. + */ + hasAny(...keys) { + return keys.some((key) => super.has(key)); + } + first(amount) { + if (amount === void 0) + return this.values().next().value; + if (amount < 0) + return this.last(amount * -1); + amount = Math.min(this.size, amount); + const iter = this.values(); + return Array.from({ length: amount }, () => iter.next().value); + } + firstKey(amount) { + if (amount === void 0) + return this.keys().next().value; + if (amount < 0) + return this.lastKey(amount * -1); + amount = Math.min(this.size, amount); + const iter = this.keys(); + return Array.from({ length: amount }, () => iter.next().value); + } + last(amount) { + const arr = [...this.values()]; + if (amount === void 0) + return arr[arr.length - 1]; + if (amount < 0) + return this.first(amount * -1); + if (!amount) + return []; + return arr.slice(-amount); + } + lastKey(amount) { + const arr = [...this.keys()]; + if (amount === void 0) + return arr[arr.length - 1]; + if (amount < 0) + return this.firstKey(amount * -1); + if (!amount) + return []; + return arr.slice(-amount); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the item at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the element to obtain + */ + at(index) { + index = Math.floor(index); + const arr = [...this.values()]; + return arr.at(index); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the key at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the key to obtain + */ + keyAt(index) { + index = Math.floor(index); + const arr = [...this.keys()]; + return arr.at(index); + } + random(amount) { + const arr = [...this.values()]; + if (amount === void 0) + return arr[Math.floor(Math.random() * arr.length)]; + if (!arr.length || !amount) + return []; + return Array.from( + { length: Math.min(amount, arr.length) }, + () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0] + ); + } + randomKey(amount) { + const arr = [...this.keys()]; + if (amount === void 0) + return arr[Math.floor(Math.random() * arr.length)]; + if (!arr.length || !amount) + return []; + return Array.from( + { length: Math.min(amount, arr.length) }, + () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0] + ); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()} + * but returns a Collection instead of an Array. + */ + reverse() { + const entries = [...this.entries()].reverse(); + this.clear(); + for (const [key, value] of entries) + this.set(key, value); + return this; + } + find(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return val; + } + return void 0; + } + findKey(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return key; + } + return void 0; + } + sweep(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const previousSize = this.size; + for (const [key, val] of this) { + if (fn(val, key, this)) + this.delete(key); + } + return previousSize - this.size; + } + filter(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const results = new this.constructor[Symbol.species](); + for (const [key, val] of this) { + if (fn(val, key, this)) + results.set(key, val); + } + return results; + } + partition(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const results = [ + new this.constructor[Symbol.species](), + new this.constructor[Symbol.species]() + ]; + for (const [key, val] of this) { + if (fn(val, key, this)) { + results[0].set(key, val); + } else { + results[1].set(key, val); + } + } + return results; + } + flatMap(fn, thisArg) { + const collections = this.map(fn, thisArg); + return new this.constructor[Symbol.species]().concat(...collections); + } + map(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const iter = this.entries(); + return Array.from({ length: this.size }, () => { + const [key, value] = iter.next().value; + return fn(value, key, this); + }); + } + mapValues(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const coll = new this.constructor[Symbol.species](); + for (const [key, val] of this) + coll.set(key, fn(val, key, this)); + return coll; + } + some(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return true; + } + return false; + } + every(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (!fn(val, key, this)) + return false; + } + return true; + } + /** + * Applies a function to produce a single value. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}. + * + * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`, + * and `collection` + * @param initialValue - Starting value for the accumulator + * @example + * ```ts + * collection.reduce((acc, guild) => acc + guild.memberCount, 0); + * ``` + */ + reduce(fn, initialValue) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + let accumulator; + const iterator = this.entries(); + if (initialValue === void 0) { + if (this.size === 0) + throw new TypeError("Reduce of empty collection with no initial value"); + accumulator = iterator.next().value[1]; + } else { + accumulator = initialValue; + } + for (const [key, value] of iterator) { + accumulator = fn(accumulator, value, key, this); + } + return accumulator; + } + each(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, value] of this) { + fn(value, key, this); + } + return this; + } + tap(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + fn(this); + return this; + } + /** + * Creates an identical shallow copy of this collection. + * + * @example + * ```ts + * const newColl = someColl.clone(); + * ``` + */ + clone() { + return new this.constructor[Symbol.species](this); + } + /** + * Combines this collection with others into a new collection. None of the source collections are modified. + * + * @param collections - Collections to merge + * @example + * ```ts + * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); + * ``` + */ + concat(...collections) { + const newColl = this.clone(); + for (const coll of collections) { + for (const [key, val] of coll) + newColl.set(key, val); + } + return newColl; + } + /** + * Checks if this collection shares identical items with another. + * This is different to checking for equality using equal-signs, because + * the collections may be different objects, but contain the same data. + * + * @param collection - Collection to compare with + * @returns Whether the collections have identical contents + */ + equals(collection) { + if (!collection) + return false; + if (this === collection) + return true; + if (this.size !== collection.size) + return false; + for (const [key, value] of this) { + if (!collection.has(key) || value !== collection.get(key)) { + return false; + } + } + return true; + } + /** + * The sort method sorts the items of a collection in place and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element. + * @example + * ```ts + * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sort(compareFunction = _Collection.defaultSort) { + const entries = [...this.entries()]; + entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])); + super.clear(); + for (const [key, value] of entries) { + super.set(key, value); + } + return this; + } + /** + * The intersect method returns a new structure containing items where the keys and values are present in both original structures. + * + * @param other - The other Collection to filter against + */ + intersect(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of other) { + if (this.has(key) && Object.is(value, this.get(key))) { + coll.set(key, value); + } + } + return coll; + } + /** + * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other. + * + * @param other - The other Collection to filter against + */ + subtract(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of this) { + if (!other.has(key) || !Object.is(value, other.get(key))) { + coll.set(key, value); + } + } + return coll; + } + /** + * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other. + * + * @param other - The other Collection to filter against + */ + difference(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of other) { + if (!this.has(key)) + coll.set(key, value); + } + for (const [key, value] of this) { + if (!other.has(key)) + coll.set(key, value); + } + return coll; + } + /** + * Merges two Collections together into a new Collection. + * + * @param other - The other Collection to merge with + * @param whenInSelf - Function getting the result if the entry only exists in this Collection + * @param whenInOther - Function getting the result if the entry only exists in the other Collection + * @param whenInBoth - Function getting the result if the entry exists in both Collections + * @example + * ```ts + * // Sums up the entries in two collections. + * coll.merge( + * other, + * x => ({ keep: true, value: x }), + * y => ({ keep: true, value: y }), + * (x, y) => ({ keep: true, value: x + y }), + * ); + * ``` + * @example + * ```ts + * // Intersects two collections in a left-biased manner. + * coll.merge( + * other, + * x => ({ keep: false }), + * y => ({ keep: false }), + * (x, _) => ({ keep: true, value: x }), + * ); + * ``` + */ + merge(other, whenInSelf, whenInOther, whenInBoth) { + const coll = new this.constructor[Symbol.species](); + const keys = /* @__PURE__ */ new Set([...this.keys(), ...other.keys()]); + for (const key of keys) { + const hasInSelf = this.has(key); + const hasInOther = other.has(key); + if (hasInSelf && hasInOther) { + const result = whenInBoth(this.get(key), other.get(key), key); + if (result.keep) + coll.set(key, result.value); + } else if (hasInSelf) { + const result = whenInSelf(this.get(key), key); + if (result.keep) + coll.set(key, result.value); + } else if (hasInOther) { + const result = whenInOther(other.get(key), key); + if (result.keep) + coll.set(key, result.value); + } + } + return coll; + } + /** + * The sorted method sorts the items of a collection and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, + * according to the string conversion of each element. + * @example + * ```ts + * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sorted(compareFunction = _Collection.defaultSort) { + return new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk)); + } + toJSON() { + return [...this.values()]; + } + static defaultSort(firstValue, secondValue) { + return Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1; + } + /** + * Creates a Collection from a list of entries. + * + * @param entries - The list of entries + * @param combine - Function to combine an existing entry with a new one + * @example + * ```ts + * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y); + * // returns Collection { "a" => 3, "b" => 2 } + * ``` + */ + static combineEntries(entries, combine) { + const coll = new _Collection(); + for (const [key, value] of entries) { + if (coll.has(key)) { + coll.set(key, combine(coll.get(key), value, key)); + } else { + coll.set(key, value); + } + } + return coll; + } +}; + +// src/index.ts +var version = "1.5.3"; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Collection, + version +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/collection/dist/index.js.map b/node_modules/@discordjs/collection/dist/index.js.map new file mode 100644 index 0000000..247240c --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/index.ts","../src/collection.ts"],"sourcesContent":["export * from './collection.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.5.3' as string;\n","/* eslint-disable no-param-reassign */\n/**\n * @internal\n */\nexport interface CollectionConstructor {\n\tnew (): Collection;\n\tnew (entries?: readonly (readonly [K, V])[] | null): Collection;\n\tnew (iterable: Iterable): Collection;\n\treadonly prototype: Collection;\n\treadonly [Symbol.species]: CollectionConstructor;\n}\n\n/**\n * Represents an immutable version of a collection\n */\nexport type ReadonlyCollection = Omit<\n\tCollection,\n\t'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'\n> &\n\tReadonlyMap;\n\n/**\n * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself\n *\n * @internal\n */\nexport interface Collection extends Map {\n\tconstructor: CollectionConstructor;\n}\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n *\n * @typeParam K - The key type this collection holds\n * @typeParam V - The value type this collection holds\n */\nexport class Collection extends Map {\n\t/**\n\t * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.\n\t *\n\t * @param key - The key to get if it exists, or set otherwise\n\t * @param defaultValueGenerator - A function that generates the default value\n\t * @example\n\t * ```ts\n\t * collection.ensure(guildId, () => defaultGuildConfig);\n\t * ```\n\t */\n\tpublic ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V {\n\t\tif (this.has(key)) return this.get(key)!;\n\t\tif (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function`);\n\t\tconst defaultValue = defaultValueGenerator(key, this);\n\t\tthis.set(key, defaultValue);\n\t\treturn defaultValue;\n\t}\n\n\t/**\n\t * Checks if all of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if all of the elements exist, `false` if at least one does not exist.\n\t */\n\tpublic hasAll(...keys: K[]) {\n\t\treturn keys.every((key) => super.has(key));\n\t}\n\n\t/**\n\t * Checks if any of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if any of the elements exist, `false` if none exist.\n\t */\n\tpublic hasAny(...keys: K[]) {\n\t\treturn keys.some((key) => super.has(key));\n\t}\n\n\t/**\n\t * Obtains the first value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the beginning\n\t * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative\n\t */\n\tpublic first(): V | undefined;\n\tpublic first(amount: number): V[];\n\tpublic first(amount?: number): V | V[] | undefined {\n\t\tif (amount === undefined) return this.values().next().value;\n\t\tif (amount < 0) return this.last(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.values();\n\t\treturn Array.from({ length: amount }, (): V => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the first key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the beginning\n\t * @returns A single key if no amount is provided or an array of keys, starting from the end if\n\t * amount is negative\n\t */\n\tpublic firstKey(): K | undefined;\n\tpublic firstKey(amount: number): K[];\n\tpublic firstKey(amount?: number): K | K[] | undefined {\n\t\tif (amount === undefined) return this.keys().next().value;\n\t\tif (amount < 0) return this.lastKey(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.keys();\n\t\treturn Array.from({ length: amount }, (): K => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the last value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the end\n\t * @returns A single value if no amount is provided or an array of values, starting from the start if\n\t * amount is negative\n\t */\n\tpublic last(): V | undefined;\n\tpublic last(amount: number): V[];\n\tpublic last(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.first(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Obtains the last key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the end\n\t * @returns A single key if no amount is provided or an array of keys, starting from the start if\n\t * amount is negative\n\t */\n\tpublic lastKey(): K | undefined;\n\tpublic lastKey(amount: number): K[];\n\tpublic lastKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.firstKey(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the item at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the element to obtain\n\t */\n\tpublic at(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.values()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the key at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the key to obtain\n\t */\n\tpublic keyAt(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.keys()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Obtains unique random value(s) from this collection.\n\t *\n\t * @param amount - Amount of values to obtain randomly\n\t * @returns A single value if no amount is provided or an array of values\n\t */\n\tpublic random(): V | undefined;\n\tpublic random(amount: number): V[];\n\tpublic random(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): V => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Obtains unique random key(s) from this collection.\n\t *\n\t * @param amount - Amount of keys to obtain randomly\n\t * @returns A single key if no amount is provided or an array\n\t */\n\tpublic randomKey(): K | undefined;\n\tpublic randomKey(amount: number): K[];\n\tpublic randomKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): K => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}\n\t * but returns a Collection instead of an Array.\n\t */\n\tpublic reverse() {\n\t\tconst entries = [...this.entries()].reverse();\n\t\tthis.clear();\n\t\tfor (const [key, value] of entries) this.set(key, value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Searches for a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.\n\t * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\n\t * should use the `get` method. See\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.find(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic find(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;\n\tpublic find(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): V2 | undefined;\n\tpublic find(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): V | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return val;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Searches for the key of a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},\n\t * but returns the key rather than the positional index.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.findKey(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic findKey(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;\n\tpublic findKey(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): K2 | undefined;\n\tpublic findKey(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): K | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return key;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Removes items that satisfy the provided filter function.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @returns The number of removed entries\n\t */\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown): number;\n\tpublic sweep(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): number {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst previousSize = this.size;\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) this.delete(key);\n\t\t}\n\n\t\treturn previousSize - this.size;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},\n\t * but returns a Collection instead of an Array.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.filter(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic filter(fn: (value: V, key: K, collection: this) => key is K2): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => value is V2): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown): Collection;\n\tpublic filter(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic filter(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic filter(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): Collection {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results = new this.constructor[Symbol.species]();\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) results.set(key, val);\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Partitions the collection into two collections where the first collection\n\t * contains the items that passed and the second contains the items that failed.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * const [big, small] = collection.partition(guild => guild.memberCount > 250);\n\t * ```\n\t */\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => key is K2,\n\t): [Collection, Collection, V>];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => value is V2,\n\t): [Collection, Collection>];\n\tpublic partition(fn: (value: V, key: K, collection: this) => unknown): [Collection, Collection];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): [Collection, Collection, V>];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): [Collection, Collection>];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => unknown,\n\t\tthisArg: This,\n\t): [Collection, Collection];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => unknown,\n\t\tthisArg?: unknown,\n\t): [Collection, Collection] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results: [Collection, Collection] = [\n\t\t\tnew this.constructor[Symbol.species](),\n\t\t\tnew this.constructor[Symbol.species](),\n\t\t];\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) {\n\t\t\t\tresults[0].set(key, val);\n\t\t\t} else {\n\t\t\t\tresults[1].set(key, val);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.\n\t *\n\t * @param fn - Function that produces a new Collection\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.flatMap(guild => guild.members.cache);\n\t * ```\n\t */\n\tpublic flatMap(fn: (value: V, key: K, collection: this) => Collection): Collection;\n\tpublic flatMap(\n\t\tfn: (this: This, value: V, key: K, collection: this) => Collection,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic flatMap(fn: (value: V, key: K, collection: this) => Collection, thisArg?: unknown): Collection {\n\t\t// eslint-disable-next-line unicorn/no-array-method-this-argument\n\t\tconst collections = this.map(fn, thisArg);\n\t\treturn new this.constructor[Symbol.species]().concat(...collections);\n\t}\n\n\t/**\n\t * Maps each item to another value into an array. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new array, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.map(user => user.tag);\n\t * ```\n\t */\n\tpublic map(fn: (value: V, key: K, collection: this) => T): T[];\n\tpublic map(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];\n\tpublic map(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): T[] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst iter = this.entries();\n\t\treturn Array.from({ length: this.size }, (): T => {\n\t\t\tconst [key, value] = iter.next().value;\n\t\t\treturn fn(value, key, this);\n\t\t});\n\t}\n\n\t/**\n\t * Maps each item to another value into a collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new collection, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.mapValues(user => user.tag);\n\t * ```\n\t */\n\tpublic mapValues(fn: (value: V, key: K, collection: this) => T): Collection;\n\tpublic mapValues(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection;\n\tpublic mapValues(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): Collection {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, val] of this) coll.set(key, fn(val, key, this));\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Checks if there exists an item that passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.some(user => user.discriminator === '0000');\n\t * ```\n\t */\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic some(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Checks if all items passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.every(user => !user.bot);\n\t * ```\n\t */\n\tpublic every(fn: (value: V, key: K, collection: this) => key is K2): this is Collection;\n\tpublic every(fn: (value: V, key: K, collection: this) => value is V2): this is Collection;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic every(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): this is Collection;\n\tpublic every(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): this is Collection;\n\tpublic every(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (!fn(val, key, this)) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Applies a function to produce a single value. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.\n\t *\n\t * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\n\t * and `collection`\n\t * @param initialValue - Starting value for the accumulator\n\t * @example\n\t * ```ts\n\t * collection.reduce((acc, guild) => acc + guild.memberCount, 0);\n\t * ```\n\t */\n\tpublic reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tlet accumulator!: T;\n\n\t\tconst iterator = this.entries();\n\t\tif (initialValue === undefined) {\n\t\t\tif (this.size === 0) throw new TypeError('Reduce of empty collection with no initial value');\n\t\t\taccumulator = iterator.next().value[1];\n\t\t} else {\n\t\t\taccumulator = initialValue;\n\t\t}\n\n\t\tfor (const [key, value] of iterator) {\n\t\t\taccumulator = fn(accumulator, value, key, this);\n\t\t}\n\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},\n\t * but returns the collection instead of undefined.\n\t *\n\t * @param fn - Function to execute for each element\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .each(user => console.log(user.username))\n\t * .filter(user => user.bot)\n\t * .each(user => console.log(user.username));\n\t * ```\n\t */\n\tpublic each(fn: (value: V, key: K, collection: this) => void): this;\n\tpublic each(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;\n\tpublic each(fn: (value: V, key: K, collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\n\t\tfor (const [key, value] of this) {\n\t\t\tfn(value, key, this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Runs a function on the collection and returns the collection.\n\t *\n\t * @param fn - Function to execute\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .tap(coll => console.log(coll.size))\n\t * .filter(user => user.bot)\n\t * .tap(coll => console.log(coll.size))\n\t * ```\n\t */\n\tpublic tap(fn: (collection: this) => void): this;\n\tpublic tap(fn: (this: T, collection: this) => void, thisArg: T): this;\n\tpublic tap(fn: (collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfn(this);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates an identical shallow copy of this collection.\n\t *\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.clone();\n\t * ```\n\t */\n\tpublic clone(): Collection {\n\t\treturn new this.constructor[Symbol.species](this);\n\t}\n\n\t/**\n\t * Combines this collection with others into a new collection. None of the source collections are modified.\n\t *\n\t * @param collections - Collections to merge\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);\n\t * ```\n\t */\n\tpublic concat(...collections: ReadonlyCollection[]) {\n\t\tconst newColl = this.clone();\n\t\tfor (const coll of collections) {\n\t\t\tfor (const [key, val] of coll) newColl.set(key, val);\n\t\t}\n\n\t\treturn newColl;\n\t}\n\n\t/**\n\t * Checks if this collection shares identical items with another.\n\t * This is different to checking for equality using equal-signs, because\n\t * the collections may be different objects, but contain the same data.\n\t *\n\t * @param collection - Collection to compare with\n\t * @returns Whether the collections have identical contents\n\t */\n\tpublic equals(collection: ReadonlyCollection) {\n\t\tif (!collection) return false; // runtime check\n\t\tif (this === collection) return true;\n\t\tif (this.size !== collection.size) return false;\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!collection.has(key) || value !== collection.get(key)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * The sort method sorts the items of a collection in place and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sort(compareFunction: Comparator = Collection.defaultSort) {\n\t\tconst entries = [...this.entries()];\n\t\tentries.sort((a, b): number => compareFunction(a[1], b[1], a[0], b[0]));\n\n\t\t// Perform clean-up\n\t\tsuper.clear();\n\n\t\t// Set the new entries\n\t\tfor (const [key, value] of entries) {\n\t\t\tsuper.set(key, value);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * The intersect method returns a new structure containing items where the keys and values are present in both original structures.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic intersect(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (this.has(key) && Object.is(value, this.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic subtract(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key) || !Object.is(value, other.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic difference(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (!this.has(key)) coll.set(key, value);\n\t\t}\n\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key)) coll.set(key, value);\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Merges two Collections together into a new Collection.\n\t *\n\t * @param other - The other Collection to merge with\n\t * @param whenInSelf - Function getting the result if the entry only exists in this Collection\n\t * @param whenInOther - Function getting the result if the entry only exists in the other Collection\n\t * @param whenInBoth - Function getting the result if the entry exists in both Collections\n\t * @example\n\t * ```ts\n\t * // Sums up the entries in two collections.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: true, value: x }),\n\t * y => ({ keep: true, value: y }),\n\t * (x, y) => ({ keep: true, value: x + y }),\n\t * );\n\t * ```\n\t * @example\n\t * ```ts\n\t * // Intersects two collections in a left-biased manner.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: false }),\n\t * y => ({ keep: false }),\n\t * (x, _) => ({ keep: true, value: x }),\n\t * );\n\t * ```\n\t */\n\tpublic merge(\n\t\tother: ReadonlyCollection,\n\t\twhenInSelf: (value: V, key: K) => Keep,\n\t\twhenInOther: (valueOther: T, key: K) => Keep,\n\t\twhenInBoth: (value: V, valueOther: T, key: K) => Keep,\n\t): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tconst keys = new Set([...this.keys(), ...other.keys()]);\n\n\t\tfor (const key of keys) {\n\t\t\tconst hasInSelf = this.has(key);\n\t\t\tconst hasInOther = other.has(key);\n\n\t\t\tif (hasInSelf && hasInOther) {\n\t\t\t\tconst result = whenInBoth(this.get(key)!, other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInSelf) {\n\t\t\t\tconst result = whenInSelf(this.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInOther) {\n\t\t\t\tconst result = whenInOther(other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The sorted method sorts the items of a collection and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value,\n\t * according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sorted(compareFunction: Comparator = Collection.defaultSort) {\n\t\treturn new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));\n\t}\n\n\tpublic toJSON() {\n\t\t// toJSON is called recursively by JSON.stringify.\n\t\treturn [...this.values()];\n\t}\n\n\tprivate static defaultSort(firstValue: V, secondValue: V): number {\n\t\treturn Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;\n\t}\n\n\t/**\n\t * Creates a Collection from a list of entries.\n\t *\n\t * @param entries - The list of entries\n\t * @param combine - Function to combine an existing entry with a new one\n\t * @example\n\t * ```ts\n\t * Collection.combineEntries([[\"a\", 1], [\"b\", 2], [\"a\", 2]], (x, y) => x + y);\n\t * // returns Collection { \"a\" => 3, \"b\" => 2 }\n\t * ```\n\t */\n\tpublic static combineEntries(\n\t\tentries: Iterable<[K, V]>,\n\t\tcombine: (firstValue: V, secondValue: V, key: K) => V,\n\t): Collection {\n\t\tconst coll = new Collection();\n\t\tfor (const [key, value] of entries) {\n\t\t\tif (coll.has(key)) {\n\t\t\t\tcoll.set(key, combine(coll.get(key)!, value, key));\n\t\t\t} else {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n}\n\n/**\n * @internal\n */\nexport type Keep = { keep: false } | { keep: true; value: V };\n\n/**\n * @internal\n */\nexport type Comparator = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqCO,IAAM,aAAN,MAAM,oBAAyB,IAAU;AAAA,EArChD,OAqCgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,OAAO,KAAQ,uBAA2D;AAChF,QAAI,KAAK,IAAI,GAAG;AAAG,aAAO,KAAK,IAAI,GAAG;AACtC,QAAI,OAAO,0BAA0B;AAAY,YAAM,IAAI,UAAU,GAAG,qBAAqB,oBAAoB;AACjH,UAAM,eAAe,sBAAsB,KAAK,IAAI;AACpD,SAAK,IAAI,KAAK,YAAY;AAC1B,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,MAAM,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,UAAU,MAAW;AAC3B,WAAO,KAAK,KAAK,CAAC,QAAQ,MAAM,IAAI,GAAG,CAAC;AAAA,EACzC;AAAA,EAUO,MAAM,QAAsC;AAClD,QAAI,WAAW;AAAW,aAAO,KAAK,OAAO,EAAE,KAAK,EAAE;AACtD,QAAI,SAAS;AAAG,aAAO,KAAK,KAAK,SAAS,EAAE;AAC5C,aAAS,KAAK,IAAI,KAAK,MAAM,MAAM;AACnC,UAAM,OAAO,KAAK,OAAO;AACzB,WAAO,MAAM,KAAK,EAAE,QA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OAAO,CAAC;AAAA,EACzB;AAAA,EAEA,OAAe,YAAe,YAAe,aAAwB;AACpE,WAAO,OAAO,aAAa,WAAW,KAAK,OAAO,eAAe,WAAW,IAAI;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,OAAc,eACb,SACA,SACmB;AACnB,UAAM,OAAO,IAAI,YAAiB;AAClC,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS;AACnC,UAAI,KAAK,IAAI,GAAG,GAAG;AAClB,aAAK,IAAI,KAAK,QAAQ,KAAK,IAAI,GAAG,GAAI,OAAO,GAAG,CAAC;AAAA,MAClD,OAAO;AACN,aAAK,IAAI,KAAK,KAAK;AAAA,MACpB;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;;AD9yBO,IAAM,UAAU;","names":[]} \ No newline at end of file diff --git a/node_modules/@discordjs/collection/dist/index.mjs b/node_modules/@discordjs/collection/dist/index.mjs new file mode 100644 index 0000000..c31c9ee --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.mjs @@ -0,0 +1,517 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); + +// src/collection.ts +var Collection = class _Collection extends Map { + static { + __name(this, "Collection"); + } + /** + * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator. + * + * @param key - The key to get if it exists, or set otherwise + * @param defaultValueGenerator - A function that generates the default value + * @example + * ```ts + * collection.ensure(guildId, () => defaultGuildConfig); + * ``` + */ + ensure(key, defaultValueGenerator) { + if (this.has(key)) + return this.get(key); + if (typeof defaultValueGenerator !== "function") + throw new TypeError(`${defaultValueGenerator} is not a function`); + const defaultValue = defaultValueGenerator(key, this); + this.set(key, defaultValue); + return defaultValue; + } + /** + * Checks if all of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if all of the elements exist, `false` if at least one does not exist. + */ + hasAll(...keys) { + return keys.every((key) => super.has(key)); + } + /** + * Checks if any of the elements exist in the collection. + * + * @param keys - The keys of the elements to check for + * @returns `true` if any of the elements exist, `false` if none exist. + */ + hasAny(...keys) { + return keys.some((key) => super.has(key)); + } + first(amount) { + if (amount === void 0) + return this.values().next().value; + if (amount < 0) + return this.last(amount * -1); + amount = Math.min(this.size, amount); + const iter = this.values(); + return Array.from({ length: amount }, () => iter.next().value); + } + firstKey(amount) { + if (amount === void 0) + return this.keys().next().value; + if (amount < 0) + return this.lastKey(amount * -1); + amount = Math.min(this.size, amount); + const iter = this.keys(); + return Array.from({ length: amount }, () => iter.next().value); + } + last(amount) { + const arr = [...this.values()]; + if (amount === void 0) + return arr[arr.length - 1]; + if (amount < 0) + return this.first(amount * -1); + if (!amount) + return []; + return arr.slice(-amount); + } + lastKey(amount) { + const arr = [...this.keys()]; + if (amount === void 0) + return arr[arr.length - 1]; + if (amount < 0) + return this.firstKey(amount * -1); + if (!amount) + return []; + return arr.slice(-amount); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the item at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the element to obtain + */ + at(index) { + index = Math.floor(index); + const arr = [...this.values()]; + return arr.at(index); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}. + * Returns the key at a given index, allowing for positive and negative integers. + * Negative integers count back from the last item in the collection. + * + * @param index - The index of the key to obtain + */ + keyAt(index) { + index = Math.floor(index); + const arr = [...this.keys()]; + return arr.at(index); + } + random(amount) { + const arr = [...this.values()]; + if (amount === void 0) + return arr[Math.floor(Math.random() * arr.length)]; + if (!arr.length || !amount) + return []; + return Array.from( + { length: Math.min(amount, arr.length) }, + () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0] + ); + } + randomKey(amount) { + const arr = [...this.keys()]; + if (amount === void 0) + return arr[Math.floor(Math.random() * arr.length)]; + if (!arr.length || !amount) + return []; + return Array.from( + { length: Math.min(amount, arr.length) }, + () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0] + ); + } + /** + * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()} + * but returns a Collection instead of an Array. + */ + reverse() { + const entries = [...this.entries()].reverse(); + this.clear(); + for (const [key, value] of entries) + this.set(key, value); + return this; + } + find(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return val; + } + return void 0; + } + findKey(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return key; + } + return void 0; + } + sweep(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const previousSize = this.size; + for (const [key, val] of this) { + if (fn(val, key, this)) + this.delete(key); + } + return previousSize - this.size; + } + filter(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const results = new this.constructor[Symbol.species](); + for (const [key, val] of this) { + if (fn(val, key, this)) + results.set(key, val); + } + return results; + } + partition(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const results = [ + new this.constructor[Symbol.species](), + new this.constructor[Symbol.species]() + ]; + for (const [key, val] of this) { + if (fn(val, key, this)) { + results[0].set(key, val); + } else { + results[1].set(key, val); + } + } + return results; + } + flatMap(fn, thisArg) { + const collections = this.map(fn, thisArg); + return new this.constructor[Symbol.species]().concat(...collections); + } + map(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const iter = this.entries(); + return Array.from({ length: this.size }, () => { + const [key, value] = iter.next().value; + return fn(value, key, this); + }); + } + mapValues(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + const coll = new this.constructor[Symbol.species](); + for (const [key, val] of this) + coll.set(key, fn(val, key, this)); + return coll; + } + some(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (fn(val, key, this)) + return true; + } + return false; + } + every(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, val] of this) { + if (!fn(val, key, this)) + return false; + } + return true; + } + /** + * Applies a function to produce a single value. Identical in behavior to + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}. + * + * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`, + * and `collection` + * @param initialValue - Starting value for the accumulator + * @example + * ```ts + * collection.reduce((acc, guild) => acc + guild.memberCount, 0); + * ``` + */ + reduce(fn, initialValue) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + let accumulator; + const iterator = this.entries(); + if (initialValue === void 0) { + if (this.size === 0) + throw new TypeError("Reduce of empty collection with no initial value"); + accumulator = iterator.next().value[1]; + } else { + accumulator = initialValue; + } + for (const [key, value] of iterator) { + accumulator = fn(accumulator, value, key, this); + } + return accumulator; + } + each(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + for (const [key, value] of this) { + fn(value, key, this); + } + return this; + } + tap(fn, thisArg) { + if (typeof fn !== "function") + throw new TypeError(`${fn} is not a function`); + if (thisArg !== void 0) + fn = fn.bind(thisArg); + fn(this); + return this; + } + /** + * Creates an identical shallow copy of this collection. + * + * @example + * ```ts + * const newColl = someColl.clone(); + * ``` + */ + clone() { + return new this.constructor[Symbol.species](this); + } + /** + * Combines this collection with others into a new collection. None of the source collections are modified. + * + * @param collections - Collections to merge + * @example + * ```ts + * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl); + * ``` + */ + concat(...collections) { + const newColl = this.clone(); + for (const coll of collections) { + for (const [key, val] of coll) + newColl.set(key, val); + } + return newColl; + } + /** + * Checks if this collection shares identical items with another. + * This is different to checking for equality using equal-signs, because + * the collections may be different objects, but contain the same data. + * + * @param collection - Collection to compare with + * @returns Whether the collections have identical contents + */ + equals(collection) { + if (!collection) + return false; + if (this === collection) + return true; + if (this.size !== collection.size) + return false; + for (const [key, value] of this) { + if (!collection.has(key) || value !== collection.get(key)) { + return false; + } + } + return true; + } + /** + * The sort method sorts the items of a collection in place and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element. + * @example + * ```ts + * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sort(compareFunction = _Collection.defaultSort) { + const entries = [...this.entries()]; + entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])); + super.clear(); + for (const [key, value] of entries) { + super.set(key, value); + } + return this; + } + /** + * The intersect method returns a new structure containing items where the keys and values are present in both original structures. + * + * @param other - The other Collection to filter against + */ + intersect(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of other) { + if (this.has(key) && Object.is(value, this.get(key))) { + coll.set(key, value); + } + } + return coll; + } + /** + * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other. + * + * @param other - The other Collection to filter against + */ + subtract(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of this) { + if (!other.has(key) || !Object.is(value, other.get(key))) { + coll.set(key, value); + } + } + return coll; + } + /** + * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other. + * + * @param other - The other Collection to filter against + */ + difference(other) { + const coll = new this.constructor[Symbol.species](); + for (const [key, value] of other) { + if (!this.has(key)) + coll.set(key, value); + } + for (const [key, value] of this) { + if (!other.has(key)) + coll.set(key, value); + } + return coll; + } + /** + * Merges two Collections together into a new Collection. + * + * @param other - The other Collection to merge with + * @param whenInSelf - Function getting the result if the entry only exists in this Collection + * @param whenInOther - Function getting the result if the entry only exists in the other Collection + * @param whenInBoth - Function getting the result if the entry exists in both Collections + * @example + * ```ts + * // Sums up the entries in two collections. + * coll.merge( + * other, + * x => ({ keep: true, value: x }), + * y => ({ keep: true, value: y }), + * (x, y) => ({ keep: true, value: x + y }), + * ); + * ``` + * @example + * ```ts + * // Intersects two collections in a left-biased manner. + * coll.merge( + * other, + * x => ({ keep: false }), + * y => ({ keep: false }), + * (x, _) => ({ keep: true, value: x }), + * ); + * ``` + */ + merge(other, whenInSelf, whenInOther, whenInBoth) { + const coll = new this.constructor[Symbol.species](); + const keys = /* @__PURE__ */ new Set([...this.keys(), ...other.keys()]); + for (const key of keys) { + const hasInSelf = this.has(key); + const hasInOther = other.has(key); + if (hasInSelf && hasInOther) { + const result = whenInBoth(this.get(key), other.get(key), key); + if (result.keep) + coll.set(key, result.value); + } else if (hasInSelf) { + const result = whenInSelf(this.get(key), key); + if (result.keep) + coll.set(key, result.value); + } else if (hasInOther) { + const result = whenInOther(other.get(key), key); + if (result.keep) + coll.set(key, result.value); + } + } + return coll; + } + /** + * The sorted method sorts the items of a collection and returns it. + * The sort is not necessarily stable in Node 10 or older. + * The default sort order is according to string Unicode code points. + * + * @param compareFunction - Specifies a function that defines the sort order. + * If omitted, the collection is sorted according to each character's Unicode code point value, + * according to the string conversion of each element. + * @example + * ```ts + * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp); + * ``` + */ + sorted(compareFunction = _Collection.defaultSort) { + return new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk)); + } + toJSON() { + return [...this.values()]; + } + static defaultSort(firstValue, secondValue) { + return Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1; + } + /** + * Creates a Collection from a list of entries. + * + * @param entries - The list of entries + * @param combine - Function to combine an existing entry with a new one + * @example + * ```ts + * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y); + * // returns Collection { "a" => 3, "b" => 2 } + * ``` + */ + static combineEntries(entries, combine) { + const coll = new _Collection(); + for (const [key, value] of entries) { + if (coll.has(key)) { + coll.set(key, combine(coll.get(key), value, key)); + } else { + coll.set(key, value); + } + } + return coll; + } +}; + +// src/index.ts +var version = "1.5.3"; +export { + Collection, + version +}; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/node_modules/@discordjs/collection/dist/index.mjs.map b/node_modules/@discordjs/collection/dist/index.mjs.map new file mode 100644 index 0000000..fcf72ab --- /dev/null +++ b/node_modules/@discordjs/collection/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/collection.ts","../src/index.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\n/**\n * @internal\n */\nexport interface CollectionConstructor {\n\tnew (): Collection;\n\tnew (entries?: readonly (readonly [K, V])[] | null): Collection;\n\tnew (iterable: Iterable): Collection;\n\treadonly prototype: Collection;\n\treadonly [Symbol.species]: CollectionConstructor;\n}\n\n/**\n * Represents an immutable version of a collection\n */\nexport type ReadonlyCollection = Omit<\n\tCollection,\n\t'delete' | 'ensure' | 'forEach' | 'get' | 'reverse' | 'set' | 'sort' | 'sweep'\n> &\n\tReadonlyMap;\n\n/**\n * Separate interface for the constructor so that emitted js does not have a constructor that overwrites itself\n *\n * @internal\n */\nexport interface Collection extends Map {\n\tconstructor: CollectionConstructor;\n}\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n *\n * @typeParam K - The key type this collection holds\n * @typeParam V - The value type this collection holds\n */\nexport class Collection extends Map {\n\t/**\n\t * Obtains the value of the given key if it exists, otherwise sets and returns the value provided by the default value generator.\n\t *\n\t * @param key - The key to get if it exists, or set otherwise\n\t * @param defaultValueGenerator - A function that generates the default value\n\t * @example\n\t * ```ts\n\t * collection.ensure(guildId, () => defaultGuildConfig);\n\t * ```\n\t */\n\tpublic ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V {\n\t\tif (this.has(key)) return this.get(key)!;\n\t\tif (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function`);\n\t\tconst defaultValue = defaultValueGenerator(key, this);\n\t\tthis.set(key, defaultValue);\n\t\treturn defaultValue;\n\t}\n\n\t/**\n\t * Checks if all of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if all of the elements exist, `false` if at least one does not exist.\n\t */\n\tpublic hasAll(...keys: K[]) {\n\t\treturn keys.every((key) => super.has(key));\n\t}\n\n\t/**\n\t * Checks if any of the elements exist in the collection.\n\t *\n\t * @param keys - The keys of the elements to check for\n\t * @returns `true` if any of the elements exist, `false` if none exist.\n\t */\n\tpublic hasAny(...keys: K[]) {\n\t\treturn keys.some((key) => super.has(key));\n\t}\n\n\t/**\n\t * Obtains the first value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the beginning\n\t * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative\n\t */\n\tpublic first(): V | undefined;\n\tpublic first(amount: number): V[];\n\tpublic first(amount?: number): V | V[] | undefined {\n\t\tif (amount === undefined) return this.values().next().value;\n\t\tif (amount < 0) return this.last(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.values();\n\t\treturn Array.from({ length: amount }, (): V => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the first key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the beginning\n\t * @returns A single key if no amount is provided or an array of keys, starting from the end if\n\t * amount is negative\n\t */\n\tpublic firstKey(): K | undefined;\n\tpublic firstKey(amount: number): K[];\n\tpublic firstKey(amount?: number): K | K[] | undefined {\n\t\tif (amount === undefined) return this.keys().next().value;\n\t\tif (amount < 0) return this.lastKey(amount * -1);\n\t\tamount = Math.min(this.size, amount);\n\t\tconst iter = this.keys();\n\t\treturn Array.from({ length: amount }, (): K => iter.next().value);\n\t}\n\n\t/**\n\t * Obtains the last value(s) in this collection.\n\t *\n\t * @param amount - Amount of values to obtain from the end\n\t * @returns A single value if no amount is provided or an array of values, starting from the start if\n\t * amount is negative\n\t */\n\tpublic last(): V | undefined;\n\tpublic last(amount: number): V[];\n\tpublic last(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.first(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Obtains the last key(s) in this collection.\n\t *\n\t * @param amount - Amount of keys to obtain from the end\n\t * @returns A single key if no amount is provided or an array of keys, starting from the start if\n\t * amount is negative\n\t */\n\tpublic lastKey(): K | undefined;\n\tpublic lastKey(amount: number): K[];\n\tpublic lastKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[arr.length - 1];\n\t\tif (amount < 0) return this.firstKey(amount * -1);\n\t\tif (!amount) return [];\n\t\treturn arr.slice(-amount);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the item at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the element to obtain\n\t */\n\tpublic at(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.values()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at | Array.at()}.\n\t * Returns the key at a given index, allowing for positive and negative integers.\n\t * Negative integers count back from the last item in the collection.\n\t *\n\t * @param index - The index of the key to obtain\n\t */\n\tpublic keyAt(index: number) {\n\t\tindex = Math.floor(index);\n\t\tconst arr = [...this.keys()];\n\t\treturn arr.at(index);\n\t}\n\n\t/**\n\t * Obtains unique random value(s) from this collection.\n\t *\n\t * @param amount - Amount of values to obtain randomly\n\t * @returns A single value if no amount is provided or an array of values\n\t */\n\tpublic random(): V | undefined;\n\tpublic random(amount: number): V[];\n\tpublic random(amount?: number): V | V[] | undefined {\n\t\tconst arr = [...this.values()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): V => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Obtains unique random key(s) from this collection.\n\t *\n\t * @param amount - Amount of keys to obtain randomly\n\t * @returns A single key if no amount is provided or an array\n\t */\n\tpublic randomKey(): K | undefined;\n\tpublic randomKey(amount: number): K[];\n\tpublic randomKey(amount?: number): K | K[] | undefined {\n\t\tconst arr = [...this.keys()];\n\t\tif (amount === undefined) return arr[Math.floor(Math.random() * arr.length)];\n\t\tif (!arr.length || !amount) return [];\n\t\treturn Array.from(\n\t\t\t{ length: Math.min(amount, arr.length) },\n\t\t\t(): K => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]!,\n\t\t);\n\t}\n\n\t/**\n\t * Identical to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse | Array.reverse()}\n\t * but returns a Collection instead of an Array.\n\t */\n\tpublic reverse() {\n\t\tconst entries = [...this.entries()].reverse();\n\t\tthis.clear();\n\t\tfor (const [key, value] of entries) this.set(key, value);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Searches for a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find | Array.find()}.\n\t * All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\n\t * should use the `get` method. See\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get | MDN} for details.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.find(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic find(fn: (value: V, key: K, collection: this) => value is V2): V2 | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown): V | undefined;\n\tpublic find(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): V2 | undefined;\n\tpublic find(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): V | undefined;\n\tpublic find(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): V | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return val;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Searches for the key of a single item where the given function returns a truthy value. This behaves like\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex | Array.findIndex()},\n\t * but returns the key rather than the positional index.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.findKey(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic findKey(fn: (value: V, key: K, collection: this) => key is K2): K2 | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown): K | undefined;\n\tpublic findKey(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): K2 | undefined;\n\tpublic findKey(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): K | undefined;\n\tpublic findKey(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): K | undefined {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return key;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Removes items that satisfy the provided filter function.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @returns The number of removed entries\n\t */\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown): number;\n\tpublic sweep(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): number;\n\tpublic sweep(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): number {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst previousSize = this.size;\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) this.delete(key);\n\t\t}\n\n\t\treturn previousSize - this.size;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter | Array.filter()},\n\t * but returns a Collection instead of an Array.\n\t *\n\t * @param fn - The function to test with (should return boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.filter(user => user.username === 'Bob');\n\t * ```\n\t */\n\tpublic filter(fn: (value: V, key: K, collection: this) => key is K2): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => value is V2): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown): Collection;\n\tpublic filter(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic filter(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic filter(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): Collection;\n\tpublic filter(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): Collection {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results = new this.constructor[Symbol.species]();\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) results.set(key, val);\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Partitions the collection into two collections where the first collection\n\t * contains the items that passed and the second contains the items that failed.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * const [big, small] = collection.partition(guild => guild.memberCount > 250);\n\t * ```\n\t */\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => key is K2,\n\t): [Collection, Collection, V>];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => value is V2,\n\t): [Collection, Collection>];\n\tpublic partition(fn: (value: V, key: K, collection: this) => unknown): [Collection, Collection];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): [Collection, Collection, V>];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): [Collection, Collection>];\n\tpublic partition(\n\t\tfn: (this: This, value: V, key: K, collection: this) => unknown,\n\t\tthisArg: This,\n\t): [Collection, Collection];\n\tpublic partition(\n\t\tfn: (value: V, key: K, collection: this) => unknown,\n\t\tthisArg?: unknown,\n\t): [Collection, Collection] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst results: [Collection, Collection] = [\n\t\t\tnew this.constructor[Symbol.species](),\n\t\t\tnew this.constructor[Symbol.species](),\n\t\t];\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) {\n\t\t\t\tresults[0].set(key, val);\n\t\t\t} else {\n\t\t\t\tresults[1].set(key, val);\n\t\t\t}\n\t\t}\n\n\t\treturn results;\n\t}\n\n\t/**\n\t * Maps each item into a Collection, then joins the results into a single Collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap | Array.flatMap()}.\n\t *\n\t * @param fn - Function that produces a new Collection\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.flatMap(guild => guild.members.cache);\n\t * ```\n\t */\n\tpublic flatMap(fn: (value: V, key: K, collection: this) => Collection): Collection;\n\tpublic flatMap(\n\t\tfn: (this: This, value: V, key: K, collection: this) => Collection,\n\t\tthisArg: This,\n\t): Collection;\n\tpublic flatMap(fn: (value: V, key: K, collection: this) => Collection, thisArg?: unknown): Collection {\n\t\t// eslint-disable-next-line unicorn/no-array-method-this-argument\n\t\tconst collections = this.map(fn, thisArg);\n\t\treturn new this.constructor[Symbol.species]().concat(...collections);\n\t}\n\n\t/**\n\t * Maps each item to another value into an array. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new array, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.map(user => user.tag);\n\t * ```\n\t */\n\tpublic map(fn: (value: V, key: K, collection: this) => T): T[];\n\tpublic map(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): T[];\n\tpublic map(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): T[] {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst iter = this.entries();\n\t\treturn Array.from({ length: this.size }, (): T => {\n\t\t\tconst [key, value] = iter.next().value;\n\t\t\treturn fn(value, key, this);\n\t\t});\n\t}\n\n\t/**\n\t * Maps each item to another value into a collection. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map | Array.map()}.\n\t *\n\t * @param fn - Function that produces an element of the new collection, taking three arguments\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.mapValues(user => user.tag);\n\t * ```\n\t */\n\tpublic mapValues(fn: (value: V, key: K, collection: this) => T): Collection;\n\tpublic mapValues(fn: (this: This, value: V, key: K, collection: this) => T, thisArg: This): Collection;\n\tpublic mapValues(fn: (value: V, key: K, collection: this) => T, thisArg?: unknown): Collection {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, val] of this) coll.set(key, fn(val, key, this));\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Checks if there exists an item that passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some | Array.some()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.some(user => user.discriminator === '0000');\n\t * ```\n\t */\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic some(fn: (this: T, value: V, key: K, collection: this) => unknown, thisArg: T): boolean;\n\tpublic some(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (fn(val, key, this)) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Checks if all items passes a test. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every | Array.every()}.\n\t *\n\t * @param fn - Function used to test (should return a boolean)\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection.every(user => !user.bot);\n\t * ```\n\t */\n\tpublic every(fn: (value: V, key: K, collection: this) => key is K2): this is Collection;\n\tpublic every(fn: (value: V, key: K, collection: this) => value is V2): this is Collection;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown): boolean;\n\tpublic every(\n\t\tfn: (this: This, value: V, key: K, collection: this) => key is K2,\n\t\tthisArg: This,\n\t): this is Collection;\n\tpublic every(\n\t\tfn: (this: This, value: V, key: K, collection: this) => value is V2,\n\t\tthisArg: This,\n\t): this is Collection;\n\tpublic every(fn: (this: This, value: V, key: K, collection: this) => unknown, thisArg: This): boolean;\n\tpublic every(fn: (value: V, key: K, collection: this) => unknown, thisArg?: unknown): boolean {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfor (const [key, val] of this) {\n\t\t\tif (!fn(val, key, this)) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Applies a function to produce a single value. Identical in behavior to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce | Array.reduce()}.\n\t *\n\t * @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\n\t * and `collection`\n\t * @param initialValue - Starting value for the accumulator\n\t * @example\n\t * ```ts\n\t * collection.reduce((acc, guild) => acc + guild.memberCount, 0);\n\t * ```\n\t */\n\tpublic reduce(fn: (accumulator: T, value: V, key: K, collection: this) => T, initialValue?: T): T {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tlet accumulator!: T;\n\n\t\tconst iterator = this.entries();\n\t\tif (initialValue === undefined) {\n\t\t\tif (this.size === 0) throw new TypeError('Reduce of empty collection with no initial value');\n\t\t\taccumulator = iterator.next().value[1];\n\t\t} else {\n\t\t\taccumulator = initialValue;\n\t\t}\n\n\t\tfor (const [key, value] of iterator) {\n\t\t\taccumulator = fn(accumulator, value, key, this);\n\t\t}\n\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Identical to\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach | Map.forEach()},\n\t * but returns the collection instead of undefined.\n\t *\n\t * @param fn - Function to execute for each element\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .each(user => console.log(user.username))\n\t * .filter(user => user.bot)\n\t * .each(user => console.log(user.username));\n\t * ```\n\t */\n\tpublic each(fn: (value: V, key: K, collection: this) => void): this;\n\tpublic each(fn: (this: T, value: V, key: K, collection: this) => void, thisArg: T): this;\n\tpublic each(fn: (value: V, key: K, collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\n\t\tfor (const [key, value] of this) {\n\t\t\tfn(value, key, this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Runs a function on the collection and returns the collection.\n\t *\n\t * @param fn - Function to execute\n\t * @param thisArg - Value to use as `this` when executing function\n\t * @example\n\t * ```ts\n\t * collection\n\t * .tap(coll => console.log(coll.size))\n\t * .filter(user => user.bot)\n\t * .tap(coll => console.log(coll.size))\n\t * ```\n\t */\n\tpublic tap(fn: (collection: this) => void): this;\n\tpublic tap(fn: (this: T, collection: this) => void, thisArg: T): this;\n\tpublic tap(fn: (collection: this) => void, thisArg?: unknown): this {\n\t\tif (typeof fn !== 'function') throw new TypeError(`${fn} is not a function`);\n\t\tif (thisArg !== undefined) fn = fn.bind(thisArg);\n\t\tfn(this);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates an identical shallow copy of this collection.\n\t *\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.clone();\n\t * ```\n\t */\n\tpublic clone(): Collection {\n\t\treturn new this.constructor[Symbol.species](this);\n\t}\n\n\t/**\n\t * Combines this collection with others into a new collection. None of the source collections are modified.\n\t *\n\t * @param collections - Collections to merge\n\t * @example\n\t * ```ts\n\t * const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);\n\t * ```\n\t */\n\tpublic concat(...collections: ReadonlyCollection[]) {\n\t\tconst newColl = this.clone();\n\t\tfor (const coll of collections) {\n\t\t\tfor (const [key, val] of coll) newColl.set(key, val);\n\t\t}\n\n\t\treturn newColl;\n\t}\n\n\t/**\n\t * Checks if this collection shares identical items with another.\n\t * This is different to checking for equality using equal-signs, because\n\t * the collections may be different objects, but contain the same data.\n\t *\n\t * @param collection - Collection to compare with\n\t * @returns Whether the collections have identical contents\n\t */\n\tpublic equals(collection: ReadonlyCollection) {\n\t\tif (!collection) return false; // runtime check\n\t\tif (this === collection) return true;\n\t\tif (this.size !== collection.size) return false;\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!collection.has(key) || value !== collection.get(key)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * The sort method sorts the items of a collection in place and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sort((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sort(compareFunction: Comparator = Collection.defaultSort) {\n\t\tconst entries = [...this.entries()];\n\t\tentries.sort((a, b): number => compareFunction(a[1], b[1], a[0], b[0]));\n\n\t\t// Perform clean-up\n\t\tsuper.clear();\n\n\t\t// Set the new entries\n\t\tfor (const [key, value] of entries) {\n\t\t\tsuper.set(key, value);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * The intersect method returns a new structure containing items where the keys and values are present in both original structures.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic intersect(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (this.has(key) && Object.is(value, this.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The subtract method returns a new structure containing items where the keys and values of the original structure are not present in the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic subtract(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key) || !Object.is(value, other.get(key))) {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.\n\t *\n\t * @param other - The other Collection to filter against\n\t */\n\tpublic difference(other: ReadonlyCollection): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tfor (const [key, value] of other) {\n\t\t\tif (!this.has(key)) coll.set(key, value);\n\t\t}\n\n\t\tfor (const [key, value] of this) {\n\t\t\tif (!other.has(key)) coll.set(key, value);\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * Merges two Collections together into a new Collection.\n\t *\n\t * @param other - The other Collection to merge with\n\t * @param whenInSelf - Function getting the result if the entry only exists in this Collection\n\t * @param whenInOther - Function getting the result if the entry only exists in the other Collection\n\t * @param whenInBoth - Function getting the result if the entry exists in both Collections\n\t * @example\n\t * ```ts\n\t * // Sums up the entries in two collections.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: true, value: x }),\n\t * y => ({ keep: true, value: y }),\n\t * (x, y) => ({ keep: true, value: x + y }),\n\t * );\n\t * ```\n\t * @example\n\t * ```ts\n\t * // Intersects two collections in a left-biased manner.\n\t * coll.merge(\n\t * other,\n\t * x => ({ keep: false }),\n\t * y => ({ keep: false }),\n\t * (x, _) => ({ keep: true, value: x }),\n\t * );\n\t * ```\n\t */\n\tpublic merge(\n\t\tother: ReadonlyCollection,\n\t\twhenInSelf: (value: V, key: K) => Keep,\n\t\twhenInOther: (valueOther: T, key: K) => Keep,\n\t\twhenInBoth: (value: V, valueOther: T, key: K) => Keep,\n\t): Collection {\n\t\tconst coll = new this.constructor[Symbol.species]();\n\t\tconst keys = new Set([...this.keys(), ...other.keys()]);\n\n\t\tfor (const key of keys) {\n\t\t\tconst hasInSelf = this.has(key);\n\t\t\tconst hasInOther = other.has(key);\n\n\t\t\tif (hasInSelf && hasInOther) {\n\t\t\t\tconst result = whenInBoth(this.get(key)!, other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInSelf) {\n\t\t\t\tconst result = whenInSelf(this.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t} else if (hasInOther) {\n\t\t\t\tconst result = whenInOther(other.get(key)!, key);\n\t\t\t\tif (result.keep) coll.set(key, result.value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n\n\t/**\n\t * The sorted method sorts the items of a collection and returns it.\n\t * The sort is not necessarily stable in Node 10 or older.\n\t * The default sort order is according to string Unicode code points.\n\t *\n\t * @param compareFunction - Specifies a function that defines the sort order.\n\t * If omitted, the collection is sorted according to each character's Unicode code point value,\n\t * according to the string conversion of each element.\n\t * @example\n\t * ```ts\n\t * collection.sorted((userA, userB) => userA.createdTimestamp - userB.createdTimestamp);\n\t * ```\n\t */\n\tpublic sorted(compareFunction: Comparator = Collection.defaultSort) {\n\t\treturn new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk));\n\t}\n\n\tpublic toJSON() {\n\t\t// toJSON is called recursively by JSON.stringify.\n\t\treturn [...this.values()];\n\t}\n\n\tprivate static defaultSort(firstValue: V, secondValue: V): number {\n\t\treturn Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1;\n\t}\n\n\t/**\n\t * Creates a Collection from a list of entries.\n\t *\n\t * @param entries - The list of entries\n\t * @param combine - Function to combine an existing entry with a new one\n\t * @example\n\t * ```ts\n\t * Collection.combineEntries([[\"a\", 1], [\"b\", 2], [\"a\", 2]], (x, y) => x + y);\n\t * // returns Collection { \"a\" => 3, \"b\" => 2 }\n\t * ```\n\t */\n\tpublic static combineEntries(\n\t\tentries: Iterable<[K, V]>,\n\t\tcombine: (firstValue: V, secondValue: V, key: K) => V,\n\t): Collection {\n\t\tconst coll = new Collection();\n\t\tfor (const [key, value] of entries) {\n\t\t\tif (coll.has(key)) {\n\t\t\t\tcoll.set(key, combine(coll.get(key)!, value, key));\n\t\t\t} else {\n\t\t\t\tcoll.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn coll;\n\t}\n}\n\n/**\n * @internal\n */\nexport type Keep = { keep: false } | { keep: true; value: V };\n\n/**\n * @internal\n */\nexport type Comparator = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;\n","export * from './collection.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/collection/#readme | @discordjs/collection} version\n * that you are currently using.\n */\n// This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild\nexport const version = '1.5.3' as string;\n"],"mappings":";;;;AAqCO,IAAM,aAAN,MAAM,oBAAyB,IAAU;AAAA,EArChD,OAqCgD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWxC,OAAO,KAAQ,uBAA2D;AAChF,QAAI,KAAK,IAAI,GAAG;AAAG,aAAO,KAAK,IAAI,GAAG;AACtC,QAAI,OAAO,0BAA0B;AAAY,YAAM,IAAI,UAAU,GAAG,qBAAqB,oBAAoB;AACjH,UAAM,eAAe,sBAAsB,KAAK,IAAI;AACpD,SAAK,IAAI,KAAK,YAAY;AAC1B,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAA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AAAA,MAC5C,WAAW,YAAY;AACtB,cAAM,SAAS,YAAY,MAAM,IAAI,GAAG,GAAI,GAAG;AAC/C,YAAI,OAAO;AAAM,eAAK,IAAI,KAAK,OAAO,KAAK;AAAA,MAC5C;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeO,OAAO,kBAAoC,YAAW,aAAa;AACzE,WAAO,IAAI,KAAK,YAAY,OAAO,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI,OAAO,gBAAgB,IAAI,IAAI,IAAI,EAAE,CAAC;AAAA,EAC3G;AAAA,EAEO,SAAS;AAEf,WAAO,CAAC,GAAG,KAAK,OAAO,CAAC;AAAA,EACzB;AAAA,EAEA,OAAe,YAAe,YAAe,aAAwB;AACpE,WAAO,OAAO,aAAa,WAAW,KAAK,OAAO,eAAe,WAAW,IAAI;AAAA,EACjF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,OAAc,eACb,SACA,SACmB;AACnB,UAAM,OAAO,IAAI,YAAiB;AAClC,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS;AACnC,UAAI,KAAK,IAAI,GAAG,GAAG;AAClB,aAAK,IAAI,KAAK,QAAQ,KAAK,IAAI,GAAG,GAAI,OAAO,GAAG,CAAC;AAAA,MAClD,OAAO;AACN,aAAK,IAAI,KAAK,KAAK;AAAA,MACpB;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;;;AC9yBO,IAAM,UAAU;","names":[]} \ No newline at end of file diff --git a/node_modules/@discordjs/collection/package.json b/node_modules/@discordjs/collection/package.json new file mode 100644 index 0000000..81e2418 --- /dev/null +++ b/node_modules/@discordjs/collection/package.json @@ -0,0 +1,76 @@ +{ + "name": "@discordjs/collection", + "version": "1.5.3", + "description": "Utility data structure used in discord.js", + "scripts": { + "test": "vitest run", + "build": "tsup", + "build:docs": "tsc -p tsconfig.docs.json", + "lint": "prettier --check . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --format=pretty", + "format": "prettier --write . && cross-env TIMING=1 eslint src __tests__ --ext .mjs,.js,.ts --fix --format=pretty", + "fmt": "yarn format", + "docs": "yarn build:docs && api-extractor run --local && api-extractor run --local --config ./api-extractor-docs.json", + "prepack": "yarn lint && yarn test && yarn build", + "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'", + "release": "cliff-jumper" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "directories": { + "lib": "src", + "test": "__tests__" + }, + "files": [ + "dist" + ], + "contributors": [ + "Crawl ", + "Amish Shah ", + "SpaceEEC ", + "Vlad Frangu ", + "Aura Román " + ], + "license": "Apache-2.0", + "keywords": [ + "map", + "collection", + "utility" + ], + "repository": { + "type": "git", + "url": "https://github.com/discordjs/discord.js.git", + "directory": "packages/collection" + }, + "bugs": { + "url": "https://github.com/discordjs/discord.js/issues" + }, + "homepage": "https://discord.js.org", + "devDependencies": { + "@favware/cliff-jumper": "^2.1.1", + "@microsoft/api-extractor": "^7.36.4", + "@types/node": "16.18.40", + "@vitest/coverage-v8": "^0.34.2", + "cross-env": "^7.0.3", + "esbuild-plugin-version-injector": "^1.2.0", + "eslint": "^8.47.0", + "eslint-config-neon": "^0.1.47", + "eslint-formatter-pretty": "^5.0.0", + "prettier": "^2.8.8", + "tsup": "^7.2.0", + "turbo": "^1.10.12", + "typescript": "^5.1.6", + "vitest": "^0.34.2" + }, + "engines": { + "node": ">=16.11.0" + }, + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/node_modules/@discordjs/formatters/LICENSE b/node_modules/@discordjs/formatters/LICENSE new file mode 100644 index 0000000..e2baac1 --- /dev/null +++ b/node_modules/@discordjs/formatters/LICENSE @@ -0,0 +1,191 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021 Noel Buechler + Copyright 2021 Vlad Frangu + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@discordjs/formatters/README.md b/node_modules/@discordjs/formatters/README.md new file mode 100644 index 0000000..65ad4b0 --- /dev/null +++ b/node_modules/@discordjs/formatters/README.md @@ -0,0 +1,82 @@ +
+
+

+ discord.js +

+
+

+ Discord server + npm version + npm downloads + Build status + Code coverage +

+

+ Vercel + Cloudflare Workers +

+
+ +## About + +`@discordjs/formatters` is a collection of functions for formatting strings to be used on Discord. + +## Installation + +**Node.js 16.11.0 or newer is required.** + +```sh +npm install @discordjs/formatters +yarn add @discordjs/formatters +pnpm add @discordjs/formatters +bun add @discordjs/formatters +``` + +## Example usage + +````ts +import { codeBlock } from '@discordjs/formatters'; + +const formattedCode = codeBlock('hello world!'); +console.log(formattedCode); + +// Prints: +// ``` +// hello world! +// ``` +```` + +## Links + +- [Website][website] ([source][website-source]) +- [Documentation][documentation] +- [Guide][guide] ([source][guide-source]) + Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. +- [discord.js Discord server][discord] +- [Discord API Discord server][discord-api] +- [GitHub][source] +- [npm][npm] +- [Related libraries][related-libs] + +## Contributing + +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation][documentation]. +See [the contribution guide][contributing] if you'd like to submit a PR. + +## Help + +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord]. + +[website]: https://discord.js.org +[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website +[documentation]: https://discord.js.org/docs/packages/formatters/stable +[guide]: https://discordjs.guide/ +[guide-source]: https://github.com/discordjs/guide +[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html +[discord]: https://discord.gg/djs +[discord-api]: https://discord.gg/discord-api +[source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters +[npm]: https://www.npmjs.com/package/@discordjs/formatters +[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries +[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md diff --git a/node_modules/@discordjs/formatters/dist/index.d.mts b/node_modules/@discordjs/formatters/dist/index.d.mts new file mode 100644 index 0000000..b792965 --- /dev/null +++ b/node_modules/@discordjs/formatters/dist/index.d.mts @@ -0,0 +1,673 @@ +import { URL } from 'node:url'; +import { Snowflake } from 'discord-api-types/globals'; + +/** + * The options that affect what will be escaped. + */ +interface EscapeMarkdownOptions { + /** + * Whether to escape bold text. + * + * @defaultValue `true` + */ + bold?: boolean; + /** + * Whether to escape bulleted lists. + * + * @defaultValue `false` + */ + bulletedList?: boolean; + /** + * Whether to escape code blocks. + * + * @defaultValue `true` + */ + codeBlock?: boolean; + /** + * Whether to escape text inside code blocks. + * + * @defaultValue `true` + */ + codeBlockContent?: boolean; + /** + * Whether to escape `\`. + * + * @defaultValue `true` + */ + escape?: boolean; + /** + * Whether to escape headings. + * + * @defaultValue `false` + */ + heading?: boolean; + /** + * Whether to escape inline code. + * + * @defaultValue `true` + */ + inlineCode?: boolean; + /** + * Whether to escape text inside inline code. + * + * @defaultValue `true` + */ + inlineCodeContent?: boolean; + /** + * Whether to escape italics. + * + * @defaultValue `true` + */ + italic?: boolean; + /** + * Whether to escape masked links. + * + * @defaultValue `false` + */ + maskedLink?: boolean; + /** + * Whether to escape numbered lists. + * + * @defaultValue `false` + */ + numberedList?: boolean; + /** + * Whether to escape spoilers. + * + * @defaultValue `true` + */ + spoiler?: boolean; + /** + * Whether to escape strikethroughs. + * + * @defaultValue `true` + */ + strikethrough?: boolean; + /** + * Whether to escape underlines. + * + * @defaultValue `true` + */ + underline?: boolean; +} +/** + * Escapes any Discord-flavored markdown in a string. + * + * @param text - Content to escape + * @param options - Options for escaping the markdown + */ +declare function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string; +/** + * Escapes code block markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeCodeBlock(text: string): string; +/** + * Escapes inline code markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeInlineCode(text: string): string; +/** + * Escapes italic markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeItalic(text: string): string; +/** + * Escapes bold markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeBold(text: string): string; +/** + * Escapes underline markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeUnderline(text: string): string; +/** + * Escapes strikethrough markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeStrikethrough(text: string): string; +/** + * Escapes spoiler markdown in a string. + * + * @param text - Content to escape + */ +declare function escapeSpoiler(text: string): string; +/** + * Escapes escape characters in a string. + * + * @param text - Content to escape + */ +declare function escapeEscape(text: string): string; +/** + * Escapes heading characters in a string. + * + * @param text - Content to escape + */ +declare function escapeHeading(text: string): string; +/** + * Escapes bulleted list characters in a string. + * + * @param text - Content to escape + */ +declare function escapeBulletedList(text: string): string; +/** + * Escapes numbered list characters in a string. + * + * @param text - Content to escape + */ +declare function escapeNumberedList(text: string): string; +/** + * Escapes masked link characters in a string. + * + * @param text - Content to escape + */ +declare function escapeMaskedLink(text: string): string; + +/** + * Wraps the content inside a code block with no language. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function codeBlock(content: Content): `\`\`\`\n${Content}\n\`\`\``; +/** + * Wraps the content inside a code block with the specified language. + * + * @typeParam Language - This is inferred by the supplied language + * @typeParam Content - This is inferred by the supplied content + * @param language - The language for the code block + * @param content - The content to wrap + */ +declare function codeBlock(language: Language, content: Content): `\`\`\`${Language}\n${Content}\n\`\`\``; +/** + * Wraps the content inside \`backticks\` which formats it as inline code. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function inlineCode(content: Content): `\`${Content}\``; +/** + * Formats the content into italic text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function italic(content: Content): `_${Content}_`; +/** + * Formats the content into bold text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function bold(content: Content): `**${Content}**`; +/** + * Formats the content into underscored text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + * @deprecated Use {@link underline} instead. + */ +declare function underscore(content: Content): `__${Content}__`; +/** + * Formats the content into underlined text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function underline(content: Content): `__${Content}__`; +/** + * Formats the content into strike-through text. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function strikethrough(content: Content): `~~${Content}~~`; +/** + * Formats the content into a quote. + * + * @remarks This needs to be at the start of the line for Discord to format it. + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function quote(content: Content): `> ${Content}`; +/** + * Formats the content into a block quote. + * + * @remarks This needs to be at the start of the line for Discord to format it. + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function blockQuote(content: Content): `>>> ${Content}`; +/** + * Wraps the URL into `<>` which stops it from embedding. + * + * @typeParam Content - This is inferred by the supplied content + * @param url - The URL to wrap + */ +declare function hideLinkEmbed(url: Content): `<${Content}>`; +/** + * Wraps the URL into `<>` which stops it from embedding. + * + * @param url - The URL to wrap + */ +declare function hideLinkEmbed(url: URL): `<${string}>`; +/** + * Formats the content and the URL into a masked URL. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to display + * @param url - The URL the content links to + */ +declare function hyperlink(content: Content, url: URL): `[${Content}](${string})`; +/** + * Formats the content and the URL into a masked URL. + * + * @typeParam Content - This is inferred by the supplied content + * @typeParam Url - This is inferred by the supplied URL + * @param content - The content to display + * @param url - The URL the content links to + */ +declare function hyperlink(content: Content, url: Url): `[${Content}](${Url})`; +/** + * Formats the content and the URL into a masked URL with a custom tooltip. + * + * @typeParam Content - This is inferred by the supplied content + * @typeParam Title - This is inferred by the supplied title + * @param content - The content to display + * @param url - The URL the content links to + * @param title - The title shown when hovering on the masked link + */ +declare function hyperlink(content: Content, url: URL, title: Title): `[${Content}](${string} "${Title}")`; +/** + * Formats the content and the URL into a masked URL with a custom tooltip. + * + * @typeParam Content - This is inferred by the supplied content + * @typeParam Url - This is inferred by the supplied URL + * @typeParam Title - This is inferred by the supplied title + * @param content - The content to display + * @param url - The URL the content links to + * @param title - The title shown when hovering on the masked link + */ +declare function hyperlink(content: Content, url: Url, title: Title): `[${Content}](${Url} "${Title}")`; +/** + * Formats the content into a spoiler. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function spoiler(content: Content): `||${Content}||`; +/** + * Formats a user id into a user mention. + * + * @typeParam UserId - This is inferred by the supplied user id + * @param userId - The user id to format + */ +declare function userMention(userId: UserId): `<@${UserId}>`; +/** + * Formats a channel id into a channel mention. + * + * @typeParam ChannelId - This is inferred by the supplied channel id + * @param channelId - The channel id to format + */ +declare function channelMention(channelId: ChannelId): `<#${ChannelId}>`; +/** + * Formats a role id into a role mention. + * + * @typeParam RoleId - This is inferred by the supplied role id + * @param roleId - The role id to format + */ +declare function roleMention(roleId: RoleId): `<@&${RoleId}>`; +/** + * Formats an application command name, subcommand group name, subcommand name, and id into an application command mention. + * + * @typeParam CommandName - This is inferred by the supplied command name + * @typeParam SubcommandGroupName - This is inferred by the supplied subcommand group name + * @typeParam SubcommandName - This is inferred by the supplied subcommand name + * @typeParam CommandId - This is inferred by the supplied command id + * @param commandName - The application command name to format + * @param subcommandGroupName - The subcommand group name to format + * @param subcommandName - The subcommand name to format + * @param commandId - The application command id to format + */ +declare function chatInputApplicationCommandMention(commandName: CommandName, subcommandGroupName: SubcommandGroupName, subcommandName: SubcommandName, commandId: CommandId): ``; +/** + * Formats an application command name, subcommand name, and id into an application command mention. + * + * @typeParam CommandName - This is inferred by the supplied command name + * @typeParam SubcommandName - This is inferred by the supplied subcommand name + * @typeParam CommandId - This is inferred by the supplied command id + * @param commandName - The application command name to format + * @param subcommandName - The subcommand name to format + * @param commandId - The application command id to format + */ +declare function chatInputApplicationCommandMention(commandName: CommandName, subcommandName: SubcommandName, commandId: CommandId): ``; +/** + * Formats an application command name and id into an application command mention. + * + * @typeParam CommandName - This is inferred by the supplied command name + * @typeParam CommandId - This is inferred by the supplied command id + * @param commandName - The application command name to format + * @param commandId - The application command id to format + */ +declare function chatInputApplicationCommandMention(commandName: CommandName, commandId: CommandId): ``; +/** + * Formats a non-animated emoji id into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format + */ +declare function formatEmoji(emojiId: EmojiId, animated?: false): `<:_:${EmojiId}>`; +/** + * Formats an animated emoji id into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format + * @param animated - Whether the emoji is animated + */ +declare function formatEmoji(emojiId: EmojiId, animated?: true): ``; +/** + * Formats an emoji id into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @param emojiId - The emoji id to format + * @param animated - Whether the emoji is animated + */ +declare function formatEmoji(emojiId: EmojiId, animated?: boolean): `<:_:${EmojiId}>` | ``; +/** + * Formats a non-animated emoji id and name into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @typeParam EmojiName - This is inferred by the supplied name + * @param options - The options for formatting an emoji + */ +declare function formatEmoji(options: FormatEmojiOptions & { + animated: true; +}): ``; +/** + * Formats an animated emoji id and name into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @typeParam EmojiName - This is inferred by the supplied name + * @param options - The options for formatting an emoji + */ +declare function formatEmoji(options: FormatEmojiOptions & { + animated?: false; +}): `<:${EmojiName}:${EmojiId}>`; +/** + * Formats an emoji id and name into a fully qualified emoji identifier. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @typeParam EmojiName - This is inferred by the supplied emoji name + * @param options - The options for formatting an emoji + */ +declare function formatEmoji(options: FormatEmojiOptions): `<:${EmojiName}:${EmojiId}>` | ``; +/** + * The options for formatting an emoji. + * + * @typeParam EmojiId - This is inferred by the supplied emoji id + * @typeParam EmojiName - This is inferred by the supplied emoji name + */ +interface FormatEmojiOptions { + /** + * Whether the emoji is animated + */ + animated?: boolean; + /** + * The emoji id to format + */ + id: EmojiId; + /** + * The name of the emoji + */ + name?: EmojiName; +} +/** + * Formats a channel link for a direct message channel. + * + * @typeParam ChannelId - This is inferred by the supplied channel id + * @param channelId - The channel's id + */ +declare function channelLink(channelId: ChannelId): `https://discord.com/channels/@me/${ChannelId}`; +/** + * Formats a channel link for a guild channel. + * + * @typeParam ChannelId - This is inferred by the supplied channel id + * @typeParam GuildId - This is inferred by the supplied guild id + * @param channelId - The channel's id + * @param guildId - The guild's id + */ +declare function channelLink(channelId: ChannelId, guildId: GuildId): `https://discord.com/channels/${GuildId}/${ChannelId}`; +/** + * Formats a message link for a direct message channel. + * + * @typeParam ChannelId - This is inferred by the supplied channel id + * @typeParam MessageId - This is inferred by the supplied message id + * @param channelId - The channel's id + * @param messageId - The message's id + */ +declare function messageLink(channelId: ChannelId, messageId: MessageId): `https://discord.com/channels/@me/${ChannelId}/${MessageId}`; +/** + * Formats a message link for a guild channel. + * + * @typeParam ChannelId - This is inferred by the supplied channel id + * @typeParam MessageId - This is inferred by the supplied message id + * @typeParam GuildId - This is inferred by the supplied guild id + * @param channelId - The channel's id + * @param messageId - The message's id + * @param guildId - The guild's id + */ +declare function messageLink(channelId: ChannelId, messageId: MessageId, guildId: GuildId): `https://discord.com/channels/${GuildId}/${ChannelId}/${MessageId}`; +/** + * The heading levels for expanded markdown. + */ +declare enum HeadingLevel { + /** + * The first heading level. + */ + One = 1, + /** + * The second heading level. + */ + Two = 2, + /** + * The third heading level. + */ + Three = 3 +} +/** + * Formats the content into a heading level. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + * @param level - The heading level + */ +declare function heading(content: Content, level?: HeadingLevel.One): `# ${Content}`; +/** + * Formats the content into a heading level. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + * @param level - The heading level + */ +declare function heading(content: Content, level: HeadingLevel.Two): `## ${Content}`; +/** + * Formats the content into a heading level. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + * @param level - The heading level + */ +declare function heading(content: Content, level: HeadingLevel.Three): `### ${Content}`; +/** + * A type that recursively traverses into arrays. + */ +type RecursiveArray = readonly (ItemType | RecursiveArray)[]; +/** + * Formats the elements in the array to an ordered list. + * + * @param list - The array of elements to list + * @param startNumber - The starting number for the list + */ +declare function orderedList(list: RecursiveArray, startNumber?: number): string; +/** + * Formats the elements in the array to an unordered list. + * + * @param list - The array of elements to list + */ +declare function unorderedList(list: RecursiveArray): string; +/** + * Formats the content into a subtext. + * + * @typeParam Content - This is inferred by the supplied content + * @param content - The content to wrap + */ +declare function subtext(content: Content): `-# ${Content}`; +/** + * Formats a date into a short date-time string. + * + * @param date - The date to format. Defaults to the current time + */ +declare function time(date?: Date): ``; +/** + * Formats a date given a format style. + * + * @typeParam Style - This is inferred by the supplied {@link TimestampStylesString} + * @param date - The date to format + * @param style - The style to use + */ +declare function time