From c816f8d1f1ab90a575123339721332a99efb531b Mon Sep 17 00:00:00 2001 From: tyowk Date: Sun, 29 Dec 2024 07:22:50 +0000 Subject: [PATCH] v1.0.0 --- .env.example | 9 + .github/ISSUE_TEMPLATE/bugs.yml | 21 + .github/ISSUE_TEMPLATE/config.yml | 5 + .github/ISSUE_TEMPLATE/features.yml | 12 + .github/PULL_REQUEST_TEMPLATE.md | 13 + .gitignore | 7 + .prettierrc.json | 9 + LICENSE | 438 +++++ README.md | 92 + package-lock.json | 1719 +++++++++++++++++ package.json | 35 + src/client.js | 48 + src/commands/client/events/clientReady.js | 13 + src/commands/client/events/guildJoin.js | 22 + src/commands/client/events/guildLeave.js | 22 + .../client/events/voiceStateUpdate.js | 53 + src/commands/client/filters/8D.js | 24 + src/commands/client/filters/bass.js | 23 + src/commands/client/filters/chimpunk.js | 23 + src/commands/client/filters/china.js | 23 + src/commands/client/filters/clear.js | 24 + src/commands/client/filters/darthvader.js | 23 + src/commands/client/filters/daycore.js | 23 + src/commands/client/filters/doubletime.js | 23 + src/commands/client/filters/earrape.js | 23 + src/commands/client/filters/electronic.js | 23 + src/commands/client/filters/equalizer.js | 23 + src/commands/client/filters/karaoke.js | 23 + src/commands/client/filters/nightcore.js | 23 + src/commands/client/filters/party.js | 23 + src/commands/client/filters/pitch.js | 23 + src/commands/client/filters/pop.js | 23 + src/commands/client/filters/radio.js | 23 + src/commands/client/filters/rate.js | 23 + src/commands/client/filters/slow.js | 23 + src/commands/client/filters/soft.js | 23 + src/commands/client/filters/speed.js | 23 + src/commands/client/filters/treblebass.js | 23 + src/commands/client/filters/tremolo.js | 23 + src/commands/client/filters/vaporwave.js | 23 + src/commands/client/filters/vibrato.js | 23 + src/commands/client/music/autoPlay.js | 29 + src/commands/client/music/clearQueue.js | 28 + src/commands/client/music/connect.js | 28 + src/commands/client/music/disconnect.js | 19 + src/commands/client/music/grab.js | 33 + src/commands/client/music/loop.js | 35 + src/commands/client/music/lyrics.js | 43 + src/commands/client/music/nowPlaying.js | 26 + src/commands/client/music/pause.js | 29 + src/commands/client/music/play.js | 47 + src/commands/client/music/previous.js | 29 + src/commands/client/music/queue.js | 60 + src/commands/client/music/remove.js | 37 + src/commands/client/music/replay.js | 27 + src/commands/client/music/resume.js | 29 + src/commands/client/music/search.js | 82 + src/commands/client/music/seek.js | 47 + src/commands/client/music/shuffle.js | 24 + src/commands/client/music/skip.js | 24 + src/commands/client/music/skipTo.js | 42 + src/commands/client/music/stop.js | 25 + src/commands/client/music/unShuffle.js | 24 + src/commands/client/music/volume.js | 46 + src/commands/client/owner/eval.js | 30 + src/commands/client/utilities/247.js | 12 + src/commands/client/utilities/help.js | 27 + src/commands/client/utilities/info.js | 33 + src/commands/client/utilities/invite.js | 14 + src/commands/client/utilities/node.js | 28 + src/commands/client/utilities/ping.js | 24 + src/commands/client/utilities/prefix.js | 20 + src/commands/client/utilities/privacy.js | 31 + src/commands/client/utilities/support.js | 11 + src/commands/client/utilities/terms.js | 29 + src/commands/player/nodeConnect.js | 12 + src/commands/player/nodeDestroy.js | 12 + src/commands/player/nodeDisconnect.js | 12 + src/commands/player/nodeError.js | 12 + src/commands/player/nodeReconnect.js | 12 + src/commands/player/queueEnd.js | 22 + src/commands/player/trackEnd.js | 9 + src/commands/player/trackStart.js | 12 + src/config/emojis.js | 13 + src/config/index.js | 23 + src/config/nodes.example.js | 12 + src/handlers/functions.js | 632 ++++++ src/handlers/index.js | 52 + src/handlers/interaction.js | 57 + src/handlers/statuses.js | 14 + src/handlers/topgg.js | 46 + src/handlers/variables.js | 7 + src/index.js | 17 + 93 files changed, 5143 insertions(+) create mode 100644 .env.example create mode 100644 .github/ISSUE_TEMPLATE/bugs.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/features.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitignore create mode 100644 .prettierrc.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/client.js create mode 100644 src/commands/client/events/clientReady.js create mode 100644 src/commands/client/events/guildJoin.js create mode 100644 src/commands/client/events/guildLeave.js create mode 100644 src/commands/client/events/voiceStateUpdate.js create mode 100644 src/commands/client/filters/8D.js create mode 100644 src/commands/client/filters/bass.js create mode 100644 src/commands/client/filters/chimpunk.js create mode 100644 src/commands/client/filters/china.js create mode 100644 src/commands/client/filters/clear.js create mode 100644 src/commands/client/filters/darthvader.js create mode 100644 src/commands/client/filters/daycore.js create mode 100644 src/commands/client/filters/doubletime.js create mode 100644 src/commands/client/filters/earrape.js create mode 100644 src/commands/client/filters/electronic.js create mode 100644 src/commands/client/filters/equalizer.js create mode 100644 src/commands/client/filters/karaoke.js create mode 100644 src/commands/client/filters/nightcore.js create mode 100644 src/commands/client/filters/party.js create mode 100644 src/commands/client/filters/pitch.js create mode 100644 src/commands/client/filters/pop.js create mode 100644 src/commands/client/filters/radio.js create mode 100644 src/commands/client/filters/rate.js create mode 100644 src/commands/client/filters/slow.js create mode 100644 src/commands/client/filters/soft.js create mode 100644 src/commands/client/filters/speed.js create mode 100644 src/commands/client/filters/treblebass.js create mode 100644 src/commands/client/filters/tremolo.js create mode 100644 src/commands/client/filters/vaporwave.js create mode 100644 src/commands/client/filters/vibrato.js create mode 100644 src/commands/client/music/autoPlay.js create mode 100644 src/commands/client/music/clearQueue.js create mode 100644 src/commands/client/music/connect.js create mode 100644 src/commands/client/music/disconnect.js create mode 100644 src/commands/client/music/grab.js create mode 100644 src/commands/client/music/loop.js create mode 100644 src/commands/client/music/lyrics.js create mode 100644 src/commands/client/music/nowPlaying.js create mode 100644 src/commands/client/music/pause.js create mode 100644 src/commands/client/music/play.js create mode 100644 src/commands/client/music/previous.js create mode 100644 src/commands/client/music/queue.js create mode 100644 src/commands/client/music/remove.js create mode 100644 src/commands/client/music/replay.js create mode 100644 src/commands/client/music/resume.js create mode 100644 src/commands/client/music/search.js create mode 100644 src/commands/client/music/seek.js create mode 100644 src/commands/client/music/shuffle.js create mode 100644 src/commands/client/music/skip.js create mode 100644 src/commands/client/music/skipTo.js create mode 100644 src/commands/client/music/stop.js create mode 100644 src/commands/client/music/unShuffle.js create mode 100644 src/commands/client/music/volume.js create mode 100644 src/commands/client/owner/eval.js create mode 100644 src/commands/client/utilities/247.js create mode 100644 src/commands/client/utilities/help.js create mode 100644 src/commands/client/utilities/info.js create mode 100644 src/commands/client/utilities/invite.js create mode 100644 src/commands/client/utilities/node.js create mode 100644 src/commands/client/utilities/ping.js create mode 100644 src/commands/client/utilities/prefix.js create mode 100644 src/commands/client/utilities/privacy.js create mode 100644 src/commands/client/utilities/support.js create mode 100644 src/commands/client/utilities/terms.js create mode 100644 src/commands/player/nodeConnect.js create mode 100644 src/commands/player/nodeDestroy.js create mode 100644 src/commands/player/nodeDisconnect.js create mode 100644 src/commands/player/nodeError.js create mode 100644 src/commands/player/nodeReconnect.js create mode 100644 src/commands/player/queueEnd.js create mode 100644 src/commands/player/trackEnd.js create mode 100644 src/commands/player/trackStart.js create mode 100644 src/config/emojis.js create mode 100644 src/config/index.js create mode 100644 src/config/nodes.example.js create mode 100644 src/handlers/functions.js create mode 100644 src/handlers/index.js create mode 100644 src/handlers/interaction.js create mode 100644 src/handlers/statuses.js create mode 100644 src/handlers/topgg.js create mode 100644 src/handlers/variables.js create mode 100644 src/index.js diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..86af38a --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +TOKEN="your_discord_bot_token" +CLIENT_ID="your_discord_bot_id" +DATABASE="your_mysql_database_uri" +TOPGG_TOKEN="topgg_api_token" +TOPGG_AUTH="topgg_webhook_auth" +GENIUS_API="genius_api_key" +DEBUG="true/false" +PORT="your_server_port" +PREFIX="your_bot_prefix" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bugs.yml b/.github/ISSUE_TEMPLATE/bugs.yml new file mode 100644 index 0000000..5493774 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bugs.yml @@ -0,0 +1,21 @@ +name: Bug Report +description: Report us the issue. +title: 'Bug: ' +labels: 'bug' +body: + - type: textarea + id: code + attributes: + label: BUGS + render: markdown + placeholder: There is a bugs at... + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. + render: shell + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..46a1c96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: NouJS Discord Server + url: https://discord.com/invite/hyQYXcVnmZ + about: Join to support server to get help more faster! diff --git a/.github/ISSUE_TEMPLATE/features.yml b/.github/ISSUE_TEMPLATE/features.yml new file mode 100644 index 0000000..8eecd6c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/features.yml @@ -0,0 +1,12 @@ +name: Feature Request +description: Request a feature or suggest us! +labels: 'enhancement' +body: + - type: textarea + id: paragraph + attributes: + label: What features would you like to add? + description: Please describe what you're requesting for. + placeholder: So i want... + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6acddb2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +## Description + +> Please include a summary of the changes and also include relevant motivation and context. List any dependencies that are required for this change. + +## Issues + +> Fixes # (issue) + +## Type of change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6b1ec2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules +.npm +logs +.gitconfig +.env +.npmrc +src/config/nodes.js \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..227325a --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,9 @@ +{ + "singleQuote": true, + "printWidth": 120, + "trailingComma": "all", + "endOfLine": "lf", + "tabWidth": 4, + "semi": true, + "arrowParens": "avoid" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..385bca2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,438 @@ +Attribution-NonCommercial-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International +Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-NonCommercial-ShareAlike 4.0 International Public License +("Public License"). To the extent this Public License may be +interpreted as a contract, You are granted the Licensed Rights in +consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the +Licensor receives from making the Licensed Material available under +these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-NC-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution, NonCommercial, and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. NonCommercial means not primarily intended for or directed towards + commercial advantage or monetary compensation. For purposes of + this Public License, the exchange of the Licensed Material for + other material subject to Copyright and Similar Rights by digital + file-sharing or similar means is NonCommercial provided there is + no payment of monetary compensation in connection with the + exchange. + + l. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + m. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + n. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part, for NonCommercial purposes only; and + + b. produce, reproduce, and Share Adapted Material for + NonCommercial purposes only. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties, including when + the Licensed Material is used other than for NonCommercial + purposes. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-NC-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database for NonCommercial purposes + only; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + including for purposes of Section 3(b); and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the β€œLicensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..983c5f5 --- /dev/null +++ b/README.md @@ -0,0 +1,92 @@ +[![Discord Bots](https://top.gg/api/widget/1297801416848441386.svg)](https://top.gg/bot/1297801416848441386/invite) + +# NouRax + +🎢 Your ultimate music companion for Discord! Play, pause, and enjoy your favorite tunes from Spotify, Apple Music, and Deezer with seamless commands. + +## Features + +- **Multi-Platform Support**: Stream music from popular services like Spotify, Apple Music, and Deezer, allowing users to enjoy their favorite tracks without leaving Discord. +- **User-Friendly Commands**: Intuitive commands make it easy for users to control playback, search for songs, and manage their listening experience. +- **Volume Control**: Users can easily adjust the volume of the music playback to suit their preferences, ensuring an optimal listening experience. +- **Queue Management**: Users can add, remove, and reorder songs in the playback queue, giving them full control over what they want to listen to next. + +## Installation + +**Follow these steps to install and run the bot:** + +1. **Clone the repository**: + +```bash +git clone https://github.com/tyowk/NouRax.git +cd NouRax +``` + +2. **Install dependencies**: + +```bash +npm install +``` + +3. **Change env.example to .env** in the root of the project directory, and ensure that all required environment variables are correctly configured for the project to function properly. + +4. **Run the bot**: + +```bash +npm start +``` + +## Contributing + +**We welcome contributions to improve the bot! To contribute:** + +1. Fork this repository. + +2. Create a new branch: + +```bash +git checkout -b feature-name +``` + +3. Make your changes and commit them: + +```bash +git commit -m 'Add new feature' +``` + +4. Push your changes to your forked repository: + +```bash +git push origin feature-name +``` + +5. Open a pull request to the main repository. + +Please ensure that your code follows the existing coding style and passes any tests or linters in place. + +## License + +This project is licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://github.com/tyowk/NouRax/blob/master/LICENSE) ("CC BY-NC-SA 4.0"). +You are free to: + +- **Share** β€” Copy and redistribute the material in any medium or format. +- **Adapt** β€” Remix, transform, and build upon the material. + +**Under the following terms:** + +- **Attribution** β€” You must give appropriate credit, provide a link to the license, and indicate if changes were made. +- **NonCommercial** β€” You may not use the material for commercial purposes. +- **ShareAlike** β€” If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. + +See [here](https://github.com/tyowk/NouRax/tree/master/LICENSE) for more details. + +## Acknowledgements + +- [discord.js](https://discord.js.org/): A powerful library for interacting with the Discord API. +- [aoi.js](https://aoi.js.org): A framework that simplifies the creation of Discord bots. +- [topgg.utils](https://github.com/tyowk/topgg.utils): Utilities for interacting with the Top.gg API. +- [aoijs.lavalink](https://lavalink.noujs.my.id): A package for handling audio streaming, providing high-quality music playback. + +## Support + +If you encounter any issues or have questions, feel free to open an issue in the repository or join our [support server on Discord](https://discord.com/invite/hyQYXcVnmZ). We appreciate your feedback and contributions to make NouRax even better! diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..d60d531 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1719 @@ +{ + "name": "NouRax", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "NouRax", + "license": "ISC", + "dependencies": { + "aoi.js": "^6.9.0", + "aoijs.lavalink": "^4.0.0", + "aoijs.mysql": "^4.0.0", + "discord-hybrid-sharding": "^2.2.3", + "dotenv": "^16.4.7", + "genius-lyrics": "^4.4.7", + "topgg.utils": "^5.0.0" + }, + "devDependencies": { + "prettier": "3.4.2" + } + }, + "node_modules/@aoijs/aoi.db": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/@aoijs/aoi.db/-/aoi.db-0.0.0.tgz", + "integrity": "sha512-pbHa+8PaRQv0D7nSvkJeG8C+bePkn2Vz6ZEoWCswRQX/uD28/Xa/tpWWAqpjheJAvbJhyz4vxmW9MWGCl3owlg==", + "dependencies": { + "@aoijs/aoi.structures": "^1.0.0", + "jsonrepair": "^3.5.1", + "JSONStream": "^1.3.5", + "sorted-btree": "^1.8.1", + "tar": "^6.1.15", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=20.x" + } + }, + "node_modules/@aoijs/aoi.structures": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@aoijs/aoi.structures/-/aoi.structures-1.0.0.tgz", + "integrity": "sha512-ro7bKjBffwCIWAC47vSRIobFP43bDj0L5CDnu1BPuVJdo/lTMQTbLHFvMWDRuloXQaa8o93YaBzcD/U6S6kxrw==" + }, + "node_modules/@discordjs/builders": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.9.0.tgz", + "integrity": "sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==", + "dependencies": { + "@discordjs/formatters": "^0.5.0", + "@discordjs/util": "^1.1.1", + "@sapphire/shapeshift": "^4.0.0", + "discord-api-types": "0.37.97", + "fast-deep-equal": "^3.1.3", + "ts-mixer": "^6.0.4", + "tslib": "^2.6.3" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/builders/node_modules/discord-api-types": { + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==" + }, + "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.5.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.5.0.tgz", + "integrity": "sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==", + "dependencies": { + "discord-api-types": "0.37.97" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/formatters/node_modules/discord-api-types": { + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==" + }, + "node_modules/@discordjs/rest": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.0.tgz", + "integrity": "sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==", + "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.97", + "magic-bytes.js": "^1.10.0", + "tslib": "^2.6.3", + "undici": "6.19.8" + }, + "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/rest/node_modules/discord-api-types": { + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==" + }, + "node_modules/@discordjs/rest/node_modules/undici": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", + "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "engines": { + "node": ">=18.17" + } + }, + "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.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.1.1.tgz", + "integrity": "sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==", + "dependencies": { + "@discordjs/collection": "^2.1.0", + "@discordjs/rest": "^2.3.0", + "@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.83", + "tslib": "^2.6.2", + "ws": "^8.16.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/@discordjs/ws/node_modules/discord-api-types": { + "version": "0.37.83", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.83.tgz", + "integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==" + }, + "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.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/ws": { + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.13.tgz", + "integrity": "sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==", + "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/aoi.js": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/aoi.js/-/aoi.js-6.9.0.tgz", + "integrity": "sha512-aI9h/2A5Thd9/P4J/hd8m4FrTvxk2CIxbzUk7A1e6JyFHXSC1XvIwdbZV0OOSYSEb62S2gPIqphB3H4rk+IVKw==", + "dependencies": { + "@aoijs/aoi.db": "^0.0.0", + "@aoijs/aoi.structures": "^1.0.0", + "chalk": "^4.1.2", + "discord.js": "^14.16.1", + "undici": "^6.9.0" + }, + "engines": { + "node": ">=20.x" + } + }, + "node_modules/aoijs.lavalink": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/aoijs.lavalink/-/aoijs.lavalink-4.0.0.tgz", + "integrity": "sha512-krIa8nfCE37ZfqXXul6vEePUQjivXfER2hq7P0BGNMrFXODVfpPFYyj92YNoT+IFWF8T8B7vcR4XprdkwQuyuQ==", + "funding": [ + { + "type": "individual", + "url": "https://trakteer.id/tyowk" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/tyowk_official" + } + ], + "dependencies": { + "@aoijs/aoi.structures": "^1.0.0", + "chalk": "^4.1.2", + "shoukaku": "^4.1.1" + } + }, + "node_modules/aoijs.mysql": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/aoijs.mysql/-/aoijs.mysql-4.0.0.tgz", + "integrity": "sha512-UFRTMWtJFdZt6aUaNmC1wxnXgFkcCxGzhiYKbXZgH4cYLFDPajeBvPCxjWa34w+Y/SV3o6BqhpWH10NYYUdFfw==", + "funding": [ + { + "type": "individual", + "url": "https://trakteer.id/tyowk" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/tyowk_official" + } + ], + "dependencies": { + "chalk": "^4.1.2", + "mysql2": "^3.11.5" + } + }, + "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.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "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/body-parser/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/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "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.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "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/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "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/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/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "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.100", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.100.tgz", + "integrity": "sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA==" + }, + "node_modules/discord-hybrid-sharding": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/discord-hybrid-sharding/-/discord-hybrid-sharding-2.2.3.tgz", + "integrity": "sha512-1s2UFiN3y9OmPQAqUXfHZLubmIce4FHWSK2Sdy6lOUQhZoVlfTASo/SyrbGalZfteLd3kVTp1ccbL54JGlmlIw==" + }, + "node_modules/discord.js": { + "version": "14.16.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.16.3.tgz", + "integrity": "sha512-EPCWE9OkA9DnFFNrO7Kl1WHHDYFXu3CNVFJg63bfU7hVtjZGyhShwZtSBImINQRWxWP2tgo2XI+QhdXx28r0aA==", + "dependencies": { + "@discordjs/builders": "^1.9.0", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.5.0", + "@discordjs/rest": "^2.4.0", + "@discordjs/util": "^1.1.1", + "@discordjs/ws": "1.1.1", + "@sapphire/snowflake": "3.5.3", + "discord-api-types": "0.37.100", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "^2.6.3", + "undici": "6.19.8" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/discord.js/node_modules/undici": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", + "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "engines": { + "node": ">=18.17" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.1.tgz", + "integrity": "sha512-xWXmuRnN9OMP6ptPd2+H0cCbcYBULa5YDTbMm/2lvkWvNA3O4wcW+GvzooqBuNM8yy6pl3VIAeJTUUWUbfI5Fw==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "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/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "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.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "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/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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/genius-lyrics": { + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/genius-lyrics/-/genius-lyrics-4.4.7.tgz", + "integrity": "sha512-cgO5nSeFqtLZAUyWB+8XWMRBIRzPUSUC42N3CoDGRgKX1anGAyDUhM6/RVIJXCNnQa6XHZHswKcKgHaRiyl+GQ==", + "dependencies": { + "node-html-parser": "^6.1.13", + "undici": "^6.11.1" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "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.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/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/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/jsonrepair": { + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/jsonrepair/-/jsonrepair-3.11.2.tgz", + "integrity": "sha512-ejydGcTq0qKk1r0NUBwjtvswbPFhs19+QEfwSeGwB8KJZ59W7/AOFmQh04c68mkJ+2hGk+OkOmkr2bKG4tGlLQ==", + "bin": { + "jsonrepair": "bin/cli.js" + } + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "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.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "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.1", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.1.tgz", + "integrity": "sha512-FbAj6lXil6t8z4z3j0E5mfRlPzxkySotzUHwRXjlpRh10vc6AI6WN62ehZj82VG7M20rqogJ0GLwar2Xa05a8Q==", + "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/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/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mysql2": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.12.0.tgz", + "integrity": "sha512-C8fWhVysZoH63tJbX8d10IAoYCyXy4fdRFz2Ihrt9jtPILYynFEKUUzpp1U7qxzDc3tMbotvaBH+sl6bFnGZiw==", + "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/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/node-html-parser": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz", + "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==", + "dependencies": { + "css-select": "^5.1.0", + "he": "1.2.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "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/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "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/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/raw-body/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/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/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/shoukaku": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/shoukaku/-/shoukaku-4.1.1.tgz", + "integrity": "sha512-E7xXqjQ38TJu9gps95zVe8LaWhBhUyZvGFbO0mNAkBywm/DieDP0HSs9fAT97lL7vVZldkay2tmFhllNLboUbg==", + "dependencies": { + "ws": "^8.18.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.0.0" + } + }, + "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/sorted-btree": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sorted-btree/-/sorted-btree-1.8.1.tgz", + "integrity": "sha512-395+XIP+wqNn3USkFSrNz7G3Ss/MXlZEqesxvzCRFwL14h6e8LukDHdLBePn5pwbm5OQ9vGu8mDyz2lLDIqamQ==" + }, + "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/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/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "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/topgg.utils": { + "version": "5.0.0", + "resolved": "git+ssh://git@github.com/tyowk/topgg.utils.git#a34c40f0bfb67573f4ba1a53ff877d14d2f464dc", + "funding": [ + { + "type": "individual", + "url": "https://trakteer.id/tyowk" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/tyowk_official" + } + ], + "license": "MIT", + "dependencies": { + "axios": "^1.7.9", + "express": "^4.21.2" + } + }, + "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/undici": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", + "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "engines": { + "node": ">=18.17" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + }, + "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/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/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "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/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..fad8e35 --- /dev/null +++ b/package.json @@ -0,0 +1,35 @@ +{ + "name": "NouRax", + "description": "A simple discord music bot built with aoi.js and lavalink ✨", + "main": "src/index.js", + "license": "ISC", + "files": [ + "src", + "package.json", + "LICENSE", + "README.md" + ], + "scripts": { + "format": "npx prettier . --write", + "start": "node ." + }, + "dependencies": { + "aoi.js": "^6.9.0", + "aoijs.lavalink": "^4.0.0", + "aoijs.mysql": "^4.0.0", + "discord-hybrid-sharding": "^2.2.3", + "dotenv": "^16.4.7", + "genius-lyrics": "^4.4.7", + "topgg.utils": "^5.0.0" + }, + "devDependencies": { + "prettier": "3.4.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/tyowk/NouRax.git" + }, + "bugs": { + "url": "https://github.com/tyowk/NouRax/issues" + } +} diff --git a/src/client.js b/src/client.js new file mode 100644 index 0000000..fe81a57 --- /dev/null +++ b/src/client.js @@ -0,0 +1,48 @@ +const { AoiClient } = require('aoi.js'); +const { Manager } = require('aoijs.lavalink'); +//const { Database } = require('aoijs.mysql'); +const { Handlers } = require('./handlers'); +const { ClusterClient, getInfo } = require('discord-hybrid-sharding'); +const config = require('./config'); + +const client = new AoiClient({ + token: config.token, + prefix: [ + config.prefix, + //'$getGuildVar[prefix]', + '<@$clientId>', + ], + intents: ['Guilds', 'GuildMessages', 'GuildVoiceStates', 'DirectMessages', 'MessageContent'], + events: ['onMessage', 'onInteractionCreate', 'onVoiceStateUpdate', 'onGuildJoin', 'onGuildLeave'], + allowedMentions: { + parse: ['users', 'roles'], + repliedUser: false, + }, + disableAoiDB: true, + suppressAllErrors: config.debug ? false : true, + aoiLogs: config.debug, + shards: getInfo().SHARD_LIST, + shardCount: getInfo().TOTAL_SHARDS, +}); + +/*new Database(client, { + url: config.database, + tables: ['main'], + debug: config.debug, +});*/ + +new Manager(client, { + nodes: config.nodes, + searchEngine: 'spotify', + maxQueueSize: 1000, + maxPlaylistSize: 1000, + debug: config.debug, + voiceConnectionTimeout: 60, + reconnectInterval: 20, + reconnectTries: 200, +}); + +client.cluster = new ClusterClient(client); +Handlers(client, config); +client.loadCommands('src/commands/client', config.debug); +client.loadVoiceEvents('src/commands/player', config.debug); diff --git a/src/commands/client/events/clientReady.js b/src/commands/client/events/clientReady.js new file mode 100644 index 0000000..57dcc87 --- /dev/null +++ b/src/commands/client/events/clientReady.js @@ -0,0 +1,13 @@ +module.exports = [ + { + name: 'clientReady', + type: 'ready', + channel: '$getConfig[logs.ready]', + code: ` +$title[$getEmoji[online] | Client] +$description[**NouRax** is now online and fully operational] +$addTimestamp +$color[Green] +$sendMessage[{newEmbed:{description:$nonEscape[<:idle:1318498782731698197>] **Connecting...**}{color:Yellow}}]`, + }, +]; diff --git a/src/commands/client/events/guildJoin.js b/src/commands/client/events/guildJoin.js new file mode 100644 index 0000000..079ba1c --- /dev/null +++ b/src/commands/client/events/guildJoin.js @@ -0,0 +1,22 @@ +module.exports = [ + { + name: 'guildJoin', + type: 'guildJoin', + $if: 'old', + channel: '$getConfig[logs.join]', + code: ` +$thumbnail[$guildIcon[$guildId]] +$addField[Information;>>> - Shard ID: $numberSeparator[$djseval[client.cluster?.id || 0;true]] +- Channels: $numberSeparator[$channelCount] +- Members: $numberSeparator[$membersCount] +- Roles: $numberSeparator[$roleCount] +- Level: $guildVerificationLevel] +$addField[Owner;$username[$guildOwnerId] (\`$guildOwnerId\`)] +$addField[Guild ID;\`$guildId\`] +$addField[Guild Name;$guildName] +$color[Green] +$title[Added to "$nonEscape[$guildName]"] +$addTimestamp +`, + }, +]; diff --git a/src/commands/client/events/guildLeave.js b/src/commands/client/events/guildLeave.js new file mode 100644 index 0000000..923b2bd --- /dev/null +++ b/src/commands/client/events/guildLeave.js @@ -0,0 +1,22 @@ +module.exports = [ + { + name: 'guildLeave', + type: 'guildLeave', + $if: 'old', + channel: '$getConfig[logs.leave]', + code: ` +$thumbnail[$guildIcon[$guildId]] +$addField[Information;>>> - Shard ID: $numberSeparator[$djseval[client.cluster?.id || 0;true]] +- Channels: $numberSeparator[$channelCount] +- Members: $numberSeparator[$membersCount] +- Roles: $numberSeparator[$roleCount] +- Level: $guildVerificationLevel] +$addField[Owner;$username[$guildOwnerId] (\`$guildOwnerId\`)] +$addField[Guild ID;\`$guildId\`] +$addField[Guild Name;$guildName] +$color[Red] +$title[Kicked from "$nonEscape[$guildName]"] +$addTimestamp +`, + }, +]; diff --git a/src/commands/client/events/voiceStateUpdate.js b/src/commands/client/events/voiceStateUpdate.js new file mode 100644 index 0000000..c66dda3 --- /dev/null +++ b/src/commands/client/events/voiceStateUpdate.js @@ -0,0 +1,53 @@ +module.exports = [ + { + name: 'voiceStates', + type: 'voiceStateUpdate', + $if: 'old', + code: ` +$if[$authorId!=$clientId] +$if[$playerEmpty==true&&$voiceId[$authorId]!=&&$voiceMemberCount[$voiceId[$clientId]]!=1] +$if[$playerStatus==paused] +$playerEmpty[false] +$resumeTrack +$endif +$elseif[$playerEmpty==false&&$voiceId[$authorId]==&&$voiceMemberCount[$voiceId[$clientId]]==1] +$awaitExecute[handleStates] +$if[$playerStatus!=paused] +$playerEmpty[true] +$pauseTrack +$endif +$endelseif +$endif +$onlyIf[$hasPlayer==true;] +$else +$description[πŸ˜‘ I have been kicked from the voice channel] +$color[Red] +$useChannel[$get[ID]] +$onlyIf[$hasPermsInChannel[$get[ID];$clientId;sendmessages;embedlinks]==true;] +$onlyIf[$channelExists[$get[ID]]==true;] +$destroyPlayer +$deleteNowPlaying +$let[ID;$playerChannelId] +$onlyIf[$voiceId[$clientId]==&&$hasPlayer==true;] +$endif +$onlyIf[$oldState[mute]==$newState[mute]||$oldState[deaf]==$newState[deaf]&&$isBot==false;] +`, + }, + { + name: 'handleStates', + type: 'awaited', + $if: 'old', + code: ` +$description[The voice channel is empty more than 1 minute +Stopped the player and leaving the voice channel] +$color[Red] +$useChannel[$get[ID]] +$onlyIf[$hasPermsInChannel[$get[ID];$clientId;sendmessages;embedlinks]==true;] +$onlyIf[$channelExists[$get[ID]]==true;] +$destroyPlayer +$deleteNowPlaying +$let[ID;$playerChannelId] +$onlyif[$hasPlayer==true&&$voiceMemberCount[$voiceId[$clientid]]==1;] +$wait[1m]`, + }, +]; diff --git a/src/commands/client/filters/8D.js b/src/commands/client/filters/8D.js new file mode 100644 index 0000000..92ba609 --- /dev/null +++ b/src/commands/client/filters/8D.js @@ -0,0 +1,24 @@ +module.exports = { + name: '8d', + description: 'Applies 8D audio effect', + aliases: 'eightd', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] 8D filter applied] +$color[#4367FE] +$setFilter[8d] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/bass.js b/src/commands/client/filters/bass.js new file mode 100644 index 0000000..c074970 --- /dev/null +++ b/src/commands/client/filters/bass.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'bass', + description: 'Applies bass filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Bass filter applied] +$color[#4367FE] +$setFilter[bass] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/chimpunk.js b/src/commands/client/filters/chimpunk.js new file mode 100644 index 0000000..3bc0641 --- /dev/null +++ b/src/commands/client/filters/chimpunk.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'chimpunk', + description: 'Applies chimpunk filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Chimpunk filter applied] +$color[#4367FE] +$setFilter[chimpunk] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/china.js b/src/commands/client/filters/china.js new file mode 100644 index 0000000..2ae9c76 --- /dev/null +++ b/src/commands/client/filters/china.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'china', + description: 'Applies china filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] China filter applied] +$color[#4367FE] +$setFilter[china] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/clear.js b/src/commands/client/filters/clear.js new file mode 100644 index 0000000..fa46189 --- /dev/null +++ b/src/commands/client/filters/clear.js @@ -0,0 +1,24 @@ +module.exports = { + name: 'clear', + description: 'Clearing all applied filter', + aliases: 'reset', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Cleared the filter] +$color[#4367FE] +$setFilter[clear] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/darthvader.js b/src/commands/client/filters/darthvader.js new file mode 100644 index 0000000..cd449b7 --- /dev/null +++ b/src/commands/client/filters/darthvader.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'darthvader', + description: 'Applies Darth Vader filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Darth Vader filter applied] +$color[#4367FE] +$setFilter[darthvader] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/daycore.js b/src/commands/client/filters/daycore.js new file mode 100644 index 0000000..9eaa25a --- /dev/null +++ b/src/commands/client/filters/daycore.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'daycore', + description: 'Applied daycore filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Daycore filter applied] +$color[#4367FE] +$setFilter[daycore] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/doubletime.js b/src/commands/client/filters/doubletime.js new file mode 100644 index 0000000..d755266 --- /dev/null +++ b/src/commands/client/filters/doubletime.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'doubletime', + description: 'Applies double time filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Double time filter applied] +$color[#4367FE] +$setFilter[doubletime] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/earrape.js b/src/commands/client/filters/earrape.js new file mode 100644 index 0000000..765ba4e --- /dev/null +++ b/src/commands/client/filters/earrape.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'earrape', + description: 'Applies earrape filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Earrape filter applied] +$color[#4367FE] +$setFilter[earrape] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/electronic.js b/src/commands/client/filters/electronic.js new file mode 100644 index 0000000..a9b9dc2 --- /dev/null +++ b/src/commands/client/filters/electronic.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'electronic', + description: 'Applies electronic filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Electronic filter applied] +$color[#4367FE] +$setFilter[electronic] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/equalizer.js b/src/commands/client/filters/equalizer.js new file mode 100644 index 0000000..3a21bc6 --- /dev/null +++ b/src/commands/client/filters/equalizer.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'equalizer', + description: 'Applies equalizer filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Equalizer filter applied] +$color[#4367FE] +$setFilter[equalizer] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/karaoke.js b/src/commands/client/filters/karaoke.js new file mode 100644 index 0000000..d8efd1b --- /dev/null +++ b/src/commands/client/filters/karaoke.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'karaoke', + description: 'Applies karaoke filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Karaoke filter applied] +$color[#4367FE] +$setFilter[speed] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/nightcore.js b/src/commands/client/filters/nightcore.js new file mode 100644 index 0000000..acfff45 --- /dev/null +++ b/src/commands/client/filters/nightcore.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'nightcore', + description: 'Applies nightcore filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Nightcore filter applied] +$color[#4367FE] +$setFilter[nightcore] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/party.js b/src/commands/client/filters/party.js new file mode 100644 index 0000000..e66193a --- /dev/null +++ b/src/commands/client/filters/party.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'party', + description: 'Applies party filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Party filter applied +$color[#4367FE] +$setFilter[party] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/pitch.js b/src/commands/client/filters/pitch.js new file mode 100644 index 0000000..2d6a92c --- /dev/null +++ b/src/commands/client/filters/pitch.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'pitch', + description: 'Applies pitch filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Pitch filter applied] +$color[#4367FE] +$setFilter[pitch] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/pop.js b/src/commands/client/filters/pop.js new file mode 100644 index 0000000..82694f6 --- /dev/null +++ b/src/commands/client/filters/pop.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'pop', + description: 'Applies pop filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Pop filter applied] +$color[#4367FE] +$setFilter[pop] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/radio.js b/src/commands/client/filters/radio.js new file mode 100644 index 0000000..7edf9cd --- /dev/null +++ b/src/commands/client/filters/radio.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'radio', + description: 'Applies radio filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Radio filter applied] +$color[#4367FE] +$setFilter[radio] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/rate.js b/src/commands/client/filters/rate.js new file mode 100644 index 0000000..31eb8e4 --- /dev/null +++ b/src/commands/client/filters/rate.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'rate', + description: 'Applies rate filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Rate filter applied] +$color[#4367FE] +$setFilter[rate] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/slow.js b/src/commands/client/filters/slow.js new file mode 100644 index 0000000..e34a118 --- /dev/null +++ b/src/commands/client/filters/slow.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'slow', + description: 'Applies slow filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Slow filter applied] +$color[#4367FE] +$setFilter[slow] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/soft.js b/src/commands/client/filters/soft.js new file mode 100644 index 0000000..d369ca6 --- /dev/null +++ b/src/commands/client/filters/soft.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'soft', + description: 'Applies soft filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Soft filter applied] +$color[#4367FE] +$setFilter[soft] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/speed.js b/src/commands/client/filters/speed.js new file mode 100644 index 0000000..96a9e61 --- /dev/null +++ b/src/commands/client/filters/speed.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'speed', + description: 'Applies speed filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Speed filter applied] +$color[#4367FE] +$setFilter[speed] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/treblebass.js b/src/commands/client/filters/treblebass.js new file mode 100644 index 0000000..dd553ec --- /dev/null +++ b/src/commands/client/filters/treblebass.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'treblebass', + description: 'Applies treble bass filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Treble bass filter applied] +$color[#4367FE] +$setFilter[treblebass] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/tremolo.js b/src/commands/client/filters/tremolo.js new file mode 100644 index 0000000..bf9cb0b --- /dev/null +++ b/src/commands/client/filters/tremolo.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'tremolo', + description: 'Applied tremolo filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Tremolo filter applied] +$color[#4367FE] +$setFilter[tremolo] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/vaporwave.js b/src/commands/client/filters/vaporwave.js new file mode 100644 index 0000000..2a3b0d4 --- /dev/null +++ b/src/commands/client/filters/vaporwave.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'vaporwave', + description: 'Applies vapor wave filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Vapor wave filter applied] +$color[#4367FE] +$setFilter[vaporwave] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/filters/vibrato.js b/src/commands/client/filters/vibrato.js new file mode 100644 index 0000000..6300fbd --- /dev/null +++ b/src/commands/client/filters/vibrato.js @@ -0,0 +1,23 @@ +module.exports = { + name: 'vibrato', + description: 'Applies vibrato filter', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Vibrato filter applied] +$color[#4367FE] +$setFilter[vibrato] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/autoPlay.js b/src/commands/client/music/autoPlay.js new file mode 100644 index 0000000..4e4f37f --- /dev/null +++ b/src/commands/client/music/autoPlay.js @@ -0,0 +1,29 @@ +module.exports = { + name: 'autoplay', + description: 'Toggle autoplay of the music player', + aliases: 'ap', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$autoplay==false] +$description[$getEmoji[yes] Autoplay mode is enabled] +$color[#4367FE] +$autoplay[true] +$endelseif +$else +$description[$getEmoji[yes] Autoplay mode is disabled] +$color[Red] +$autoplay[false] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/clearQueue.js b/src/commands/client/music/clearQueue.js new file mode 100644 index 0000000..839d23d --- /dev/null +++ b/src/commands/client/music/clearQueue.js @@ -0,0 +1,28 @@ +module.exports = { + name: 'clearqueue', + description: 'Remove all tracks from the queue', + aliases: 'cq', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$queuelength==0] +$description[$getEmoji[no] The queue already is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$clearQueue +$if[$queueLength>1] +$description[$getEmoji[yes] Deleting $queueLength songs from the queue] +$else +$description[$getEmoji[yes] Remove $queueLength song from the queue] +$endif +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/connect.js b/src/commands/client/music/connect.js new file mode 100644 index 0000000..aa461fa --- /dev/null +++ b/src/commands/client/music/connect.js @@ -0,0 +1,28 @@ +module.exports = { + name: 'connect', + description: 'Connect to a voice channel', + aliases: 'join', + options: [ + { + name: 'channel', + description: 'Select the voice channel', + type: 7, + required: false, + channel_types: [2], + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==true] +$description[$getEmoji[no] I already joined to <#$voiceId[$clientId]>!] +$color[Red] +$deleteIn[5s] +$else +$description[$getEmoji[yes] Joined to <#$voiceId[$clientId]>] +$color[#4367FE] +$joinvc[$getContext[channel;false]] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/disconnect.js b/src/commands/client/music/disconnect.js new file mode 100644 index 0000000..0999964 --- /dev/null +++ b/src/commands/client/music/disconnect.js @@ -0,0 +1,19 @@ +module.exports = { + name: 'disconnect', + description: 'Disconnect from a voice channel', + aliases: ['dc', 'leave'], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$else +$leavevc +$description[$getEmoji[yes] Leaving the voice channel <#$voiceId[$clientId]>] +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/grab.js b/src/commands/client/music/grab.js new file mode 100644 index 0000000..2a6b401 --- /dev/null +++ b/src/commands/client/music/grab.js @@ -0,0 +1,33 @@ +module.exports = { + name: 'grab', + description: 'Grab currently playing track and sending it to your DM', + aliases: 'gr', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$isUserDmEnabled[$authorId]==false] +$description[$getEmoji[no] Your DM is currently disabled!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$dm +$description[$replaceNowPlaying[$songInfo[sourceName]] **[$songInfo[title]]($songInfo[url])**] +$image[$songInfo[thumbnail]] +$addField[Requested by;$songInfo[requester.username] ($songInfo[requester.mention])] +$addField[Duration;$humanizeMs[$currentTrackDuration] / $songInfo[duration]] +$addField[Artist;$songInfo[artist]] +$addButton[1;Search Song;link;$nonEscape[$songInfo[url]];false;$replaceNowPlaying[$songInfo[platform]]] +$color[#4367FE] +$endif +$checkPerms`, +}; diff --git a/src/commands/client/music/loop.js b/src/commands/client/music/loop.js new file mode 100644 index 0000000..be7067f --- /dev/null +++ b/src/commands/client/music/loop.js @@ -0,0 +1,35 @@ +module.exports = { + name: 'loop', + description: 'Change the current loop mode', + aliases: ['l', 'lm'], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$if[$loopStatus==off] +$description[$getEmoji[yes] Set the loop mode to **\`SONG\`**] +$color[#4367FE] +$loopMode[repeat] +$elseif[$loopStatus==repeat] +$description[$getEmoji[yes] Set the loop mode to **\`QUEUE\`**] +$color[#4367FE] +$loopMode[queue] +$endelseif +$else +$description[$getEmoji[yes] Disabled loop mode] +$color[Red] +$loopMode[off] +$endif +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/lyrics.js b/src/commands/client/music/lyrics.js new file mode 100644 index 0000000..e641d3a --- /dev/null +++ b/src/commands/client/music/lyrics.js @@ -0,0 +1,43 @@ +module.exports = [ + { + name: 'lyrics', + description: 'Display or search lyrics of the track', + options: [ + { + name: 'search', + description: 'The song title', + type: 3, + required: false, + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$getContext[search;all]==] +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$isCurrentExist==false||$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$title[Lyrics for **"$songInfo[title]"**] +$description[>>> $chunkedText[1]] +$color[#4367FE] +$thumbnail[$songInfo[artworkUrl]] +$onlyIf[$chunkedLength>0;{newEmbed:{description:$nonEscape[$getEmoji[no]] No results found}{color:Red}}{ephemeral}{deleteIn:5s}] +$textChunk[$lyrics[$songInfo[title] - $songInfo[artist]];4000] +$endif +$else +$title[Lyrics for **"$getContext[search;all]"**] +$description[>>> $chunkedText[1]] +$color[#4367FE] +$onlyIf[$chunkedLength>0;{newEmbed:{description:$nonEscape[$getEmoji[no]] No results found}{color:Red}}{ephemeral}{deleteIn:5s}] +$textChunk[$lyrics[$getContext[search;all]];4000] +$endif +$checkPerms`, + }, +]; diff --git a/src/commands/client/music/nowPlaying.js b/src/commands/client/music/nowPlaying.js new file mode 100644 index 0000000..db45511 --- /dev/null +++ b/src/commands/client/music/nowPlaying.js @@ -0,0 +1,26 @@ +module.exports = { + name: 'nowplaying', + description: 'See the information about current playing track', + aliases: 'np', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$replaceNowPlaying[$songInfo[sourceName]] **Now playing [$songInfo[title]]($songInfo[url])**] +$thumbnail[$songInfo[thumbnail]] +$addField[Requested by;$songInfo[requester.username] ($songInfo[requester.mention])] +$addField[Duration;$humanizeMs[$currentTrackDuration] / $songInfo[duration]] +$addField[Artist;$songInfo[artist]] +$color[#4367FE] +$endif +$checkPerms`, +}; diff --git a/src/commands/client/music/pause.js b/src/commands/client/music/pause.js new file mode 100644 index 0000000..f9804fd --- /dev/null +++ b/src/commands/client/music/pause.js @@ -0,0 +1,29 @@ +module.exports = { + name: 'pause', + description: 'Pause the current playing track', + aliases: 'ps', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$playerStatus==paused] +$description[$getEmoji[no] The track already paused!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] The track has been paused] +$color[#4367FE] +$pauseTrack +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/play.js b/src/commands/client/music/play.js new file mode 100644 index 0000000..53851d6 --- /dev/null +++ b/src/commands/client/music/play.js @@ -0,0 +1,47 @@ +module.exports = { + name: 'play', + description: 'Add new track to the guild queue', + aliases: 'p', + options: [ + { + name: 'song', + description: 'Song title or a valid url', + type: 3, + required: true, + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false&&$playerStatus==destroyed||$hasPlayer==false&&$playerStatus==stopped] +$if[$checkContains[$loadTrackType[$getContext[song;all]];track;search;playlist]==true] +$description[$getEmoji[queue] Added to queue **[$songInfo[title]]($songInfo[url])** $replaceText[$replaceText[$checkCondition[$sub[$queueLength;1]>$get[QUEUE]];true;and $sub[$sub[$queueLength;1];$get[QUEUE]] other song(s)];false;]] +$color[#4367FE] +$footer[$songInfo[artist] | $songInfo[duration];$songInfo[artworkUrl]] +$playTrack[$getContext[song;all]] +$let[QUEUE;$queueLength] +$joinvc +$else +$description[$getEmoji[no] No results found] +$color[Red] +$deleteIn[10s] +$endif +$else +$if[$checkContains[$loadTrackType[$getContext[song;all]];track;search;playlist]==true] +$description[$getEmoji[queue] Added to queue **[$songInfo[title;$sum[$get[QUEUE];1]]]($songInfo[url;$sum[$get[QUEUE];1]])** $replaceText[$replaceText[$checkCondition[$sub[$queueLength;1]>$get[QUEUE]];true;and $sub[$sub[$queueLength;1];$get[QUEUE]] other song(s)];false;]] +$color[#4367FE] +$footer[$songInfo[artist;$sum[$get[QUEUE];1]] | $songInfo[duration;$sum[$get[QUEUE];1]];$songInfo[artworkUrl;$sum[$get[QUEUE];1]]] +$playTrack[$getContext[song;all]] +$let[QUEUE;$textTrim[$replaceText[$replaceText[$checkCondition[$isCurrentExist==false];false;$queueLength];true;-1]]] +$else +$description[$getEmoji[no] No results found] +$color[Red] +$deleteIn[10s] +$endif +$endif +$onlyIf[$lavalinkInfo[Node 1;status]!=offline;{newEmbed:{description:$nonEscape[$getEmoji[no]] There is no available nodes to connect on!}{color:Red}}{ephemeral}{deleteIn:5s}] +$checkVoice +$checkPermsPlayer +$checkPerms +`, +}; diff --git a/src/commands/client/music/previous.js b/src/commands/client/music/previous.js new file mode 100644 index 0000000..35f3772 --- /dev/null +++ b/src/commands/client/music/previous.js @@ -0,0 +1,29 @@ +module.exports = { + name: 'previous', + description: 'Play the previous track in the queue', + aliases: 'prev', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$isPreviousExist!=true] +$description[$getEmoji[no] There are no previous track!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Playing the previous track] +$color[#4367FE] +$previousTrack +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/queue.js b/src/commands/client/music/queue.js new file mode 100644 index 0000000..04593b3 --- /dev/null +++ b/src/commands/client/music/queue.js @@ -0,0 +1,60 @@ +module.exports = [ + { + name: 'queue', + description: 'Shows the current guild queue', + aliases: 'q', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$queueLength==0] +$description[$getEmoji[no] The queue is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$title[QUEUE LIST] +$description[>>> $queue[1;10;{position}. [{title}]({url}) - <@{requester.id}>]] +$color[#4367FE] +$if[$queueLength>10] +$addButton[1;X;danger;delete_$authorId] +$addButton[1;Next;primary;queueNext_2_$authorId] +$addButton[1;$queueLength Songs;primary;length;true] +$addButton[1;Previous;primary;queuePrevious_0_$authorId;true] +$endif +$endif +$checkPerms +`, + }, + { + type: 'interaction', + prototype: 'button', + $if: 'old', + code: ` +$timeoutComponent +$queueNext +$interactionDeferUpdate +$checkPerms +$onlyIf[$authorId==$splitText[3];$getEmoji[no] Nuh uh uh... you can't use this button!{intetaction}{ephemeral}] +$onlyIf[$splitText[1]==queueNext;] +$textSplit[$interactionData[customId];_] +`, + }, + { + type: 'interaction', + prototype: 'button', + $if: 'old', + code: ` +$timeoutComponent +$queuePrevious +$interactionDeferUpdate +$checkPerms +$onlyIf[$authorId==$splitText[3];$getEmoji[no] Nuh uh uh... you can't use this button!{intetaction}{ephemeral}] +$onlyIf[$splitText[1]==queuePrevious;] +$textSplit[$interactionData[customId];_] +`, + }, +]; diff --git a/src/commands/client/music/remove.js b/src/commands/client/music/remove.js new file mode 100644 index 0000000..8495a05 --- /dev/null +++ b/src/commands/client/music/remove.js @@ -0,0 +1,37 @@ +module.exports = { + name: 'remove', + description: 'Remove a specific track from the queue', + options: [ + { + name: 'song', + description: 'Song position in the queue you want to remove', + type: 10, + required: true, + }, + ], + aliases: 'rm', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$isNumber[$getContext[song;1]]!=true||$getContext[song;1]<0] +$description[$getEmoji[no] Please provide a valid number!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$getContext[song;1]>$queueLength] +$description[$getEmoji[no] The queue is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$removeSong[$getContext[song;1]] +$description[$getEmoji[yes] Removed [$songInfo[title;$getContext[song;1]]]($songInfo[url;$getContext[song;1]]) from the queue] +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/replay.js b/src/commands/client/music/replay.js new file mode 100644 index 0000000..84e6f17 --- /dev/null +++ b/src/commands/client/music/replay.js @@ -0,0 +1,27 @@ +module.exports = { + name: 'replay', + description: 'Replay the current track', + aliases: 'rp', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Replaying **[$songInfo[title]]($songInfo[url])**] +$color[#4367FE] +$replayTrack +$if[$playerStatus==paused] +$resumeTrack +$endif +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/resume.js b/src/commands/client/music/resume.js new file mode 100644 index 0000000..54afb70 --- /dev/null +++ b/src/commands/client/music/resume.js @@ -0,0 +1,29 @@ +module.exports = { + name: 'resume', + description: 'Resume the currently paused track', + aliases: 'rs', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$playerStatus==playing] +$description[$getEmoji[no] The track already playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] The track has been resumed] +$color[#4367FE] +$resumeTrack +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/search.js b/src/commands/client/music/search.js new file mode 100644 index 0000000..132701d --- /dev/null +++ b/src/commands/client/music/search.js @@ -0,0 +1,82 @@ +module.exports = [ + { + name: 'search', + description: 'Search for multiple tracks', + options: [ + { + name: 'song', + description: 'Song title you want to search', + type: 3, + required: true, + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$checkContains[$loadTrackType[$getContext[song;all]];search]==true] +$title[πŸ”Ž Results for "$getContext[song;all]"] +$description[$search[$getContext[song;all];$searchEngine;{position}. [{title}]({url}) by {artist};9]] +$color[#4367FE] +$footer[Requested by $username;$authorAvatar] +$addButton[2;X;danger;delete_$authorId] +$addButton[2;9;primary;search___$authorId___$splitText[9]] +$addButton[2;8;primary;search___$authorId___$splitText[8]] +$addButton[2;7;primary;search___$authorId___$splitText[7]] +$addButton[2;6;primary;search___$authorId___$splitText[6]] +$addButton[1;5;primary;search___$authorId___$splitText[5]] +$addButton[1;4;primary;search___$authorId___$splitText[4]] +$addButton[1;3;primary;search___$authorId___$splitText[3]] +$addButton[1;2;primary;search___$authorId___$splitText[2]] +$addButton[1;1;primary;search___$authorId___$splitText[1]] +$textSplit[$search[$getContext[song;all];$searchEngine;{url};9;#SPACEURL#];#SPACEURL#] +$else +$description[$getEmoji[no] Hmm... no results found] +$color[Red] +$deleteIn[10s] +$endif +$onlyIf[$message!=;{newEmbed:{description:$nonEscape[$getEmoji[no]] Nu uh uh... please provide a song title!}{color:Red}}{deleteIn:5s}{ephemeral}] +$onlyIf[$lavalinkInfo[Node 1;status]!=offline;{newEmbed:{description:$nonEscape[$getEmoji[no]] There is no available nodes to connect on!}{color:Red}}{ephemeral}{deleteIn:5s}] +$checkVoice +$checkPermsPlayer +$checkPerms +`, + }, + { + type: 'interaction', + prototype: 'button', + $if: 'old', + code: ` +$timeoutComponent +$if[$hasPlayer==false&&$playerStatus==destroyed||$hasPlayer==false&&$playerStatus==stopped] +$interactionEdit[{newEmbed:{description:$nonEscape[$getEmoji[queue]] Added to queue **[$songInfo[title]]($songInfo[url])**}{color:#4367FE}{footer:$songInfo[artist] | $songInfo[duration]:$songInfo[artworkUrl]}}] +$playTrack[$splitText[3]] +$joinvc +$textSplit[$interactionData[customId];___] +$else +$interactionEdit[{newEmbed:{description:$nonEscape[$getEmoji[queue]] Added to queue **[$songInfo[title;$sum[$get[QUEUE];1]]]($songInfo[url;$sum[$get[QUEUE];1]])**}{color:#4367FE}{footer:$songInfo[artist;$sum[$get[QUEUE];1]] | $songInfo[duration;$sum[$get[QUEUE];1]]:$songInfo[artworkUrl;$sum[$get[QUEUE];1]]}}] +$playTrack[$splitText[3]] +$let[QUEUE;$textTrim[$replaceText[$replaceText[$checkCondition[$isCurrentExist==false];false;$queueLength];true;-1]]] +$textSplit[$interactionData[customId];___] +$endif +$editButton[$interactionData[customId];βœ“;1;true;;$messageId] +$interactionDefer +$onlyIf[$lavalinkInfo[Node 1;status]!=offline;{newEmbed:{description:$nonEscape[$getEmoji[no]] There is no available nodes to connect on!}{color:Red}}{ephemeral}] +$checkVoice +$checkPermsPlayer +$checkPerms +$onlyIf[$authorId==$splitText[2];$getEmoji[no] Nuh uh uh... you can't use this button!{intetaction}{ephemeral}] +$onlyIf[$splitText[1]==search;] +$textSplit[$interactionData[customId];___]`, + }, + { + type: 'interaction', + prototype: 'button', + $if: 'old', + code: ` +$removeComponents[$channelId;$messageId;all] +$onlyIf[$authorId==$splitText[2];$getEmoji[no] Nuh uh uh... you can't use this button!{intetaction}{ephemeral}] +$onlyIf[$splitText[1]==delete;] +$textSplit[$interactionData[customId];_] +`, + }, +]; diff --git a/src/commands/client/music/seek.js b/src/commands/client/music/seek.js new file mode 100644 index 0000000..a6f7840 --- /dev/null +++ b/src/commands/client/music/seek.js @@ -0,0 +1,47 @@ +module.exports = { + name: 'seek', + description: 'Move to the desired position on the track', + options: [ + { + name: 'duration', + description: 'Time can be specified. example: 1m 5s', + type: 3, + required: true, + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$isSeekable!=true] +$description[$getEmoji[no] Current track is not seekable!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$parseTime[$getContext[duration;all]]==-1||$parseTime[$message]<1000] +$description[$getEmoji[no] Please provide a valid format duration! +Example: 1m 5s] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$parseTime[$getContext[duration;all]]>$songInfo[durationMs]] +$description[$getEmoji[no] The duration should not exceed \`$songinfo[duration]\`!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Fast-forwarding to \`$getContext[duration;all]\`] +$color[#4367FE] +$seek[$getContext[duration;all]] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/shuffle.js b/src/commands/client/music/shuffle.js new file mode 100644 index 0000000..079322f --- /dev/null +++ b/src/commands/client/music/shuffle.js @@ -0,0 +1,24 @@ +module.exports = { + name: 'shuffle', + description: 'Shuffle the queue', + aliases: 'sf', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$queuelength==0] +$description[$getEmoji[no] The queue is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$shuffleQueue +$description[$getEmoji[yes] Shuffle the queue] +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/skip.js b/src/commands/client/music/skip.js new file mode 100644 index 0000000..1b37ae7 --- /dev/null +++ b/src/commands/client/music/skip.js @@ -0,0 +1,24 @@ +module.exports = { + name: 'skip', + description: 'Skip the current playing track', + aliases: 's', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Skipped to the next song] +$color[#4367FE] +$skipTrack +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/skipTo.js b/src/commands/client/music/skipTo.js new file mode 100644 index 0000000..756ead3 --- /dev/null +++ b/src/commands/client/music/skipTo.js @@ -0,0 +1,42 @@ +module.exports = { + name: 'skipto', + description: 'Skip to specific track in the queue', + options: [ + { + name: 'song', + description: 'Track position in the queue', + type: 4, + required: true, + }, + ], + aliases: 'st', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$isNumber[$getContext[song;1]]!=true||$getContext[song;1]<0] +$description[$getEmoji[no] Please provide a valid number!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$getContext[song;1]>$queueLength] +$description[$getEmoji[no] The queue is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$skipto[$getContext[song;1]] +$description[$getEmoji[yes] Skipped to [$songInfo[title;$getContext[song;1]]]($songInfo[url;$getContext[song;1]])] +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/stop.js b/src/commands/client/music/stop.js new file mode 100644 index 0000000..7ab0891 --- /dev/null +++ b/src/commands/client/music/stop.js @@ -0,0 +1,25 @@ +module.exports = { + name: 'stop', + description: 'Stop the player and cleared the queue', + aliases: 'sp', + $if: 'old', + code: ` +$isInteraction +$if[$playerStatus==stopped] +$description[$getEmoji[no] The music player already stopped!] +$color[Red] +$deleteIn[5s] +$elseif[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Stopped the player and cleared the queue] +$color[#4367FE] +$stopTrack +$clearQueue +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/unShuffle.js b/src/commands/client/music/unShuffle.js new file mode 100644 index 0000000..1a8bddb --- /dev/null +++ b/src/commands/client/music/unShuffle.js @@ -0,0 +1,24 @@ +module.exports = { + name: 'unshuffle', + description: 'Unshuffle the queue', + aliases: 'unsf', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$queuelength==0] +$description[$getEmoji[no] The queue is empty!] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$unshuffleQueue +$description[$getEmoji[yes] Unshuffle the queue] +$color[#4367FE] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/music/volume.js b/src/commands/client/music/volume.js new file mode 100644 index 0000000..445c0b5 --- /dev/null +++ b/src/commands/client/music/volume.js @@ -0,0 +1,46 @@ +module.exports = { + name: 'volume', + description: 'Change the current track volume', + aliases: 'v', + options: [ + { + name: 'volume', + description: 'Track volume, should not exceed 100%', + type: 10, + required: true, + }, + ], + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==false] +$description[$getEmoji[no] There are no players for this guild!] +$color[Red] +$deleteIn[5s] +$elseif[$playerStatus==stopped||$playerStatus==destroyed] +$description[$getEmoji[no] There are no track currently playing!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$getContext[volume;1]==] +$description[Current track volume is \`$volume%\`] +$color[#4367FE] +$endelseif +$elseif[$isNumber[$getContext[volume;1]]!=true||$getContext[volume;1]<0] +$description[$getEmoji[no] Please provide a valid number!] +$color[Red] +$deleteIn[5s] +$endelseif +$elseif[$getContext[volume;1]>100] +$description[$getEmoji[no] The volume should not exceed \`100%\`] +$color[Red] +$deleteIn[5s] +$endelseif +$else +$description[$getEmoji[yes] Set the current track volume to \`$getContext[volume;1]%\`] +$color[#4367FE] +$volume[$getContext[volume;1]] +$endif +$checkVoice +$checkPerms`, +}; diff --git a/src/commands/client/owner/eval.js b/src/commands/client/owner/eval.js new file mode 100644 index 0000000..3d67548 --- /dev/null +++ b/src/commands/client/owner/eval.js @@ -0,0 +1,30 @@ +module.exports = [ + { + name: 'eval', + code: ` +$description[\`\`\`js +$textSlice[$replaceText[$if[$get[EVALED]==;null;$get[EVALED]];#SEMI#;];0;3992]\`\`\`] +$color[Orange] +$let[EVALED;$eval[$message;true;true;true;true]] +$onlyIf[$checkClientOwnerIds==true;]`, + }, + { + name: 'djseval', + aliases: 'djs', + code: ` +$description[\`\`\`js +$textSlice[$replaceText[$if[$get[EVALED]==;null;$get[EVALED]];#SEMI#;];0;3992]\`\`\`] +$color[Orange] +$let[EVALED;$djseval[$message;true]] +$onlyIf[$checkClientOwnerIds==true;]`, + }, + { + name: 'exec', + code: ` +$description[\`\`\`js +$textSlice[$replaceText[$if[$get[EVALED]==;null;$get[EVALED]];#SEMI#;];0;3992]\`\`\`] +$color[Orange] +$let[EVALED;$exec[$message]] +$onlyIf[$checkClientOwnerIds==true;]`, + }, +]; diff --git a/src/commands/client/utilities/247.js b/src/commands/client/utilities/247.js new file mode 100644 index 0000000..7cedc1f --- /dev/null +++ b/src/commands/client/utilities/247.js @@ -0,0 +1,12 @@ +module.exports = { + name: '247', + description: 'Toggle 247 mode, the bot will not leave by itself', + $if: 'old', + code: ` +$isInteraction +$description[Sorry but, this feature is not available now.] +$title[Coming Soon!] +$color[#4367FE] +$onlyIf[$hasPerms[$guildid;$authorId;manageguild]==true;{newEmbed:{description:$nonEscape[<:no:1314836229593759806>] You don't have \`ManageGuild\` permission!}{color:Red}}{deleteIn:5s}{ephemeral}] +$checkPerms`, +}; diff --git a/src/commands/client/utilities/help.js b/src/commands/client/utilities/help.js new file mode 100644 index 0000000..9454f59 --- /dev/null +++ b/src/commands/client/utilities/help.js @@ -0,0 +1,27 @@ +module.exports = { + name: 'help', + aliases: 'h', + description: 'See all my available commands', + $if: 'old', + code: ` +$isInteraction +$description[**:wave: Hello! I'm Rax!** +I'm a discord music bot, here to bring music to your server! My prefix is **\`nou\`**. + +**Need Help?** +Join our [Support Server](https://discord.gg/hyQYXcVnmZ) for assistance, feedback, or suggestions. + +**Important:** +By using and interacting with me, you agree to our **Terms of Service**. Type **\`/terms\`** to learn more. + +**Let’s enjoy great music together!**] +$addField[UTILITIES;\`help\` \`info\` \`invite\` \`node\` \`ping\` \`prefix\` \`privacy\` \`support\` \`terms\` \`247\`] +$addField[FILTERS;\`8d\` \`bass\` \`chimpunk\` \`china\` \`clear\` \`darthvader\` \`daycore\` \`doubletime\` \`earrape\` \`electronic\` \`equalizer\` \`karaoke\` \`nightcore\` \`party\` \`pitch\` \`pop\` \`radio\` \`rate\` \`slow\` \`soft\` \`speed\` \`treblebass\` \`tremolo\` \`vaporwave\` \`vibrato\`] +$addField[MUSIC;\`autoplay\` \`clearqueue\` \`connect\` \`disconnect\` \`grab\` \`loop\` \`lyrics\` \`nowplaying\` \`pause\` \`play\` \`previous\` \`queue\` \`remove\` \`replay\` \`resume\` \`search\` \`seek\` \`shuffle\` \`skip\` \`skipto\` \`stop\` \`unshuffle\` \`volume\`] +$footer[Requested by $username;$authorAvatar] +$color[#4367FE] +$addButton[1;Support Server;link;https://discord.gg/hyQYXcVnmZ] +$addButton[1;Invite Me!;link;https://discord.com/oauth2/authorize?client_id=1297801416848441386&permissions=34949376&scope=bot%20applications.commands] +$checkPerms +`, +}; diff --git a/src/commands/client/utilities/info.js b/src/commands/client/utilities/info.js new file mode 100644 index 0000000..663f5e3 --- /dev/null +++ b/src/commands/client/utilities/info.js @@ -0,0 +1,33 @@ +module.exports = { + name: 'info', + description: 'Displays information about the bot', + $if: 'old', + code: ` +$isInteraction +$addField[Library Information;>>> - Programming Language with **[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)** +- Node.js module with **[aoi.js](https://aoi.js.org)** +- Music player with **[Lavalink](https://lavalink.dev)** + **([aoijs.lavalink](https://github.com/tyowk/aoijs.lavalink))**] +$addField[System Information;>>> - \`Platform ::\` ➜ **$toLocaleUpperCase[$djseval[client.os.platform();true]]** +- \`Processor ::\` ➜ **$djseval[client.os.cpus()[0].model;true]** +- \`Cores ::\` ➜ **$djseval[client.os.cpus().length;true] Core(s)** +- \`CPU Usage ::\` ➜ **$djseval[client.os.loadavg()[0];true]%** +- \`RAM Usage ::\` ➜ **$prettyBytes[$djseval[client.os.totalmem() - client.os.freemem();true]]** +- \`Total RAM ::\` ➜ **$prettyBytes[$djseval[client.os.totalmem();true]]**] +$addField[Client Statistics;>>> - \`Cluster(s) ::\` ➜ **$numberSeparator[$djseval[client.cluster?.count;true]]** +- \`Shard(s) ::\` ➜ **$numberSeparator[$djseval[client.cluster?.shardList?.length;true]]** +- \`Player(s) ::\` ➜ **$numberSeparator[$djseval[client.shoukaku.players.size;true]]** +- \`Server(s) ::\` ➜ **$guildCount** +- \`Channel(s) ::\` ➜ **$numberSeparator[$allChannelsCount]** +- \`User(s) ::\` ➜ **$numberSeparator[$allMembersCount]**] +$addField[Client Information;>>> - \`Username ::\` ➜ **$username[$clientId]** +- \`User ID ::\` ➜ **$clientId** +- \`Version ::\` ➜ **v1.0.0** +- \`Uptime ::\` ➜ **$uptime** +- \`API Latency ::\` ➜ **$pingms** +- \`Bot Latency ::\` ➜ **$replaceText[$messageping$interactionPing;NaN;]ms** +- \`Database ::\` ➜ **unknown**] +$footer[Β© 2024 NouJS Development] +$color[#4367FE] +$checkPerms +`, +}; diff --git a/src/commands/client/utilities/invite.js b/src/commands/client/utilities/invite.js new file mode 100644 index 0000000..585e8ca --- /dev/null +++ b/src/commands/client/utilities/invite.js @@ -0,0 +1,14 @@ +module.exports = { + name: 'invite', + description: 'Provides a link to invite me to your server.', + $if: 'old', + code: ` +$isInteraction +$title[Invite Me to Your server!] +$description[Press the button bellow to add me to your server. +Need help? then join to my [support server](https://discord.gg/hyQYXcVnmZ)!] +$color[#4367FE] +$addButton[1;Support Server;link;https://discord.gg/hyQYXcVnmZ] +$addButton[1;Invite Me!;link;https://discord.com/oauth2/authorize?client_id=1297801416848441386&permissions=34949376&scope=bot%20applications.commands] +$checkPerms`, +}; diff --git a/src/commands/client/utilities/node.js b/src/commands/client/utilities/node.js new file mode 100644 index 0000000..21d3312 --- /dev/null +++ b/src/commands/client/utilities/node.js @@ -0,0 +1,28 @@ +module.exports = { + name: 'node', + description: 'Display current lavalink node status', + $if: 'old', + code: ` +$isInteraction +$if[$lavalinkInfo[Node 2;status]==online] +$addField[Node 2;>>> - \`Status ::\` ➜ **$replaceText[$replaceText[$lavalinkInfo[Node 2;status];online;Connected {$getEmoji[online]}];offline;Disconnected {$getEmoji[offline]}]** +- \`Uptime ::\` ➜ **$lavalinkInfo[Node 2;uptime]** +- \`Players ::\` ➜ **$numberSeparator[$lavalinkInfo[Node 2;player.used]]/$numberSeparator[$lavalinkInfo[Node 2;player.total]]** +- \`Cores ::\` ➜ **$lavalinkInfo[Node 2;cpu.cores] Core(s)** +- \`Memory Usage ::\` ➜ **$prettyBytes[$lavalinkInfo[Node 2;memory.used]]/$prettyBytes[$math[$lavalinkInfo[Node 2;memory.used]+$lavalinkInfo[Node 2;memory.free]+$lavalinkInfo[Node 2;memory.reservable]+$lavalinkInfo[Node 2;memory.allocated]]]** +- \`System Load ::\` ➜ **$roundTenth[$lavalinkInfo[Node 2;cpu.system];2]%** +- \`Lavalink Load ::\` ➜ **$roundTenth[$lavalinkInfo[Node 2;cpu.lavalink];2]%**] +$endif +$if[$lavalinkInfo[Node 1;status]==online] +$addField[Node 1;>>> - \`Status ::\` ➜ **$replaceText[$replaceText[$lavalinkInfo[Node 1;status];online;Connected {$getEmoji[online]}];offline;Disconnected {$getEmoji[offline]}]** +- \`Uptime ::\` ➜ **$lavalinkInfo[Node 1;uptime]** +- \`Players ::\` ➜ **$numberSeparator[$lavalinkInfo[Node 1;player.used]]/$numberSeparator[$lavalinkInfo[Node 1;player.total]]** +- \`Cores ::\` ➜ **$lavalinkInfo[Node 1;cpu.cores] Core(s)** +- \`Memory Usage ::\` ➜ **$prettyBytes[$lavalinkInfo[Node 1;memory.used]]/$prettyBytes[$math[$lavalinkInfo[Node 1;memory.used]+$lavalinkInfo[Node 1;memory.free]+$lavalinkInfo[Node 1;memory.reservable]+$lavalinkInfo[Node 1;memory.allocated]]]** +- \`System Load ::\` ➜ **$roundTenth[$lavalinkInfo[Node 1;cpu.system];2]%** +- \`Lavalink Load ::\` ➜ **$roundTenth[$lavalinkInfo[Node 1;cpu.lavalink];2]%**] +$endif +$color[#4367FE] +$checkPerms +`, +}; diff --git a/src/commands/client/utilities/ping.js b/src/commands/client/utilities/ping.js new file mode 100644 index 0000000..de4518b --- /dev/null +++ b/src/commands/client/utilities/ping.js @@ -0,0 +1,24 @@ +module.exports = { + name: 'ping', + description: 'Pong! check if the bot is online', + aliases: 'pong', + $if: 'old', + code: ` +$isInteraction +$if[$hasPlayer==true] +$addField[Player;\`\`\`js +$playerPingms +\`\`\`;true] +$endif +$addField[Database;\`\`\`js +unknown +\`\`\`;true] +$addField[Bot Latency;\`\`\`js +$replaceText[$messageping$interactionPing;NaN;]ms +\`\`\`;true] +$addField[API Latency;\`\`\`js +$pingms +\`\`\`;true] +$color[#4367FE] +$checkPerms`, +}; diff --git a/src/commands/client/utilities/prefix.js b/src/commands/client/utilities/prefix.js new file mode 100644 index 0000000..4d59c9f --- /dev/null +++ b/src/commands/client/utilities/prefix.js @@ -0,0 +1,20 @@ +module.exports = { + name: 'prefix', + description: 'Set custom prefix for this server', + options: [ + { + name: 'prefix', + description: 'The new prefix you want to change', + type: 3, + required: true, + }, + ], + $if: 'old', + code: ` +$isInteraction +$description[Sorry but, this feature is not available now.] +$title[Coming Soon!] +$color[#4367FE] +$onlyIf[$hasPerms[$guildid;$authorId;manageguild]==true;{newEmbed:{description:$nonEscape[<:no:1314836229593759806>] You don't have \`ManageGuild\` permission!}{color:Red}}{deleteIn:5s}{ephemeral}] +$checkPerms`, +}; diff --git a/src/commands/client/utilities/privacy.js b/src/commands/client/utilities/privacy.js new file mode 100644 index 0000000..2be9e18 --- /dev/null +++ b/src/commands/client/utilities/privacy.js @@ -0,0 +1,31 @@ +module.exports = { + name: 'privacy', + description: "NouRax's Privacy Policy", + $if: 'old', + code: ` +$isInteraction +$addField[➜ Contact Us;If you have any questions or concerns about this Privacy Policy, please contact us at **tyowk@outlook.com**. We are here to help and will respond to your inquiries as soon as possible.] +$addField[➜ Changes to This Privacy Policy;We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on our website, Discord server, or through the bot. Your continued use of the bot after any changes constitutes your acceptance of the new Privacy Policy.] +$addField[➜ Third-Party Services;NouRax may contain links to third-party websites or services. We are not responsible for the privacy practices of these third parties. We encourage you to review the privacy policies of any third-party services you use, as their practices may differ from ours.] +$addField[➜ User Rights;**You have the right to:** +- Request a copy of your personal information we hold. +- Request correction of any inaccurate or incomplete information. +- Request deletion of your personal information, subject to certain exceptions. +- Object to or restrict the processing of your personal information. +- Wthdraw consent at any time where we rely on your consent to process your personal information.] +$addField[➜ Data Security;We take the security of your personal information seriously. We implement reasonable security measures to protect your information from unauthorized access, use, or disclosure. However, no method of transmission over the internet or method of electronic storage is 100% secure, and we cannot guarantee its absolute security.] +$addField[➜ How We Use Your Information;**We use the information we collect to:** +- Deliver and maintain the NouRax service. +- Enhance, personalize, and expand our offerings based on user feedback and usage patterns. +- Send updates, notifications, and respond to inquiries. +- Monitor usage and analyze trends to improve user experience and service quality.] +$addField[➜ Information We Collect;**We may collect the following types of information when you use NouRax:** +- User ID, User Avatar, username, Guild ID, and Guild Name for identification purposes. +- Commands used, music played, and other interactions to improve our services.] +$description[By inviting, using, and interacting with NouRax on your Discord server, you acknowledge that you have read, understood, and agree to be bound by this Privacy Policy.] +$title[NOURAX'S PRIVACY POLICY] +$color[#4367FE] +$footer[Β© NouJS Development | Last Updated Dec 15, 2024] +$checkPerms +`, +}; diff --git a/src/commands/client/utilities/support.js b/src/commands/client/utilities/support.js new file mode 100644 index 0000000..bb73247 --- /dev/null +++ b/src/commands/client/utilities/support.js @@ -0,0 +1,11 @@ +module.exports = { + name: 'support', + description: 'Need help? Join to my support server!', + $if: 'old', + code: ` +$isInteraction[https://discord.com/invite/hyQYXcVnmZ] +https://discord.com/invite/hyQYXcVnmZ +$addButton[1;Support Server;link;https://discord.gg/hyQYXcVnmZ] +$addButton[1;Invite Me!;link;https://discord.com/oauth2/authorize?client_id=1297801416848441386&permissions=34949376&scope=bot%20applications.commands] +$checkPerms`, +}; diff --git a/src/commands/client/utilities/terms.js b/src/commands/client/utilities/terms.js new file mode 100644 index 0000000..a176772 --- /dev/null +++ b/src/commands/client/utilities/terms.js @@ -0,0 +1,29 @@ +module.exports = { + name: 'terms', + description: "NouRax's Terms of Service", + $if: 'old', + code: ` +$isInteraction +$addField[➜ Questions;If you have any questions about these Terms of Service, please contact us at **tyowk@outlook.com**. We are here to help and will respond to your inquiries as soon as possible.] +$addField[➜ Governing Law;NouRax is hosted in Indonesia, and these Terms of Service shall be governed by and construed in accordance with the laws of Indonesia, without regard to its conflict of law principles.] +$addField[➜ Changes to Terms;We may update these Terms of Service from time to time. We will notify users of any changes by posting the new terms on our website, discord server or through the bot. Your continued use of the bot after any changes constitutes your acceptance of the new terms.] +$addField[➜ Limitation of Liabilities;To the fullest extent permitted by law, NouJS Development shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising from your use of NouRax.] +$addField[➜ Disclaimer of Warranties;NouRax is provided on an "as-is" and "as-available" basis. We do not warrant that the bot will be uninterrupted, secure, or error-free. Your use of the bot is at your own risk.] +$addField[➜ Termination;We reserve the right to suspend or terminate your access to NouRax at any time, without notice, for conduct that we believe violates these Terms of Service or is harmful to other users or the bot.] +$addField[➜ User Conduct;**You agree not to:** +- Use the bot in a manner that disrupts or interferes with Discord or other users. +- Harass, threaten, or abuse other users. +- Use the bot to promote spam, malware, or any other harmful content.] +$addField[➜ Copyright and Intellectual Property;- NouRax does not host any music files. The bot streams music from third-party sources, and you are responsible for ensuring that your use of the bot complies with the terms of those sources. +- All intellectual property rights in the bot and its features are owned by NouJS Development. You may not copy, modify, or distribute any part of the bot without our express written permission.] +$addField[➜ User Responsibilities;- You must be at least 13 years old to use NouRax. +- You are responsible for any content you play through the bot and must ensure that you have the necessary rights to use that content. +- You agree not to use the bot for any illegal or unauthorized purposes, including but not limited to copyright infringement.] +$addField[➜ About the Service;NouRax provides music playback services within Discord servers, allowing users to play, pause, skip, and manage music tracks from various sources. The bot may also offer additional features such as filters, volume control, and more.] +$description[By inviting, using and interact with NouRax on your Discord server, you acknowledge that you have read, understood, and agree to be bound by these Terms of Service.] +$title[NOURAX'S TERMS OF SERVICE] +$color[#4367FE] +$footer[Β© NouJS Development | Last Updated Dec 15, 2024] +$checkPerms +`, +}; diff --git a/src/commands/player/nodeConnect.js b/src/commands/player/nodeConnect.js new file mode 100644 index 0000000..a70fcb1 --- /dev/null +++ b/src/commands/player/nodeConnect.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'nodeConnect', + type: 'nodeConnect', + channel: '$getConfig[logs.nodes]', + code: ` +$title[$getEmoji[online] | Lavalink] +$description[**$nodeName** connected and ready to rechieve requests!] +$addTimestamp +$color[Green]`, + }, +]; diff --git a/src/commands/player/nodeDestroy.js b/src/commands/player/nodeDestroy.js new file mode 100644 index 0000000..a993ebb --- /dev/null +++ b/src/commands/player/nodeDestroy.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'nodeDestroy', + type: 'nodeDestroy', + channel: '$getConfig[logs.nodes]', + code: ` +$title[$getEmoji[offline] | Lavalink] +$description[**$nodeName** destroyed $if[$errorReason==;;with reason: $errorReason]] +$addTimestamp +$color[Red]`, + }, +]; diff --git a/src/commands/player/nodeDisconnect.js b/src/commands/player/nodeDisconnect.js new file mode 100644 index 0000000..e65b7ef --- /dev/null +++ b/src/commands/player/nodeDisconnect.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'nodeDisconnect', + type: 'nodeDisconnect', + channel: '$getConfig[logs.nodes]', + code: ` +$title[$getEmoji[offline] | Lavalink] +$description[**$nodeName** disconnected $if[$errorReason==;;with reason: $errorReason]] +$addTimestamp +$color[Red]`, + }, +]; diff --git a/src/commands/player/nodeError.js b/src/commands/player/nodeError.js new file mode 100644 index 0000000..38c2216 --- /dev/null +++ b/src/commands/player/nodeError.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'nodeError', + type: 'nodeError', + channel: '$getConfig[logs.nodes]', + code: ` +$title[$getEmoji[offline] | Lavalink] +$description[**$nodeName** error $if[$errorReason==;;with reason: $errorReason]] +$addTimestamp +$color[Red]`, + }, +]; diff --git a/src/commands/player/nodeReconnect.js b/src/commands/player/nodeReconnect.js new file mode 100644 index 0000000..515e05d --- /dev/null +++ b/src/commands/player/nodeReconnect.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'nodeReconnect', + type: 'nodeReconnect', + channel: '$getConfig[logs.nodes]', + code: ` +$title[$getEmoji[idle] | Lavalink] +$description[**$nodeName** Reconnected and ready to rechieve requests!] +$addTimestamp +$color[Yellow]`, + }, +]; diff --git a/src/commands/player/queueEnd.js b/src/commands/player/queueEnd.js new file mode 100644 index 0000000..79d72ef --- /dev/null +++ b/src/commands/player/queueEnd.js @@ -0,0 +1,22 @@ +module.exports = [ + { + name: 'queueEnd', + channel: '$channelId', + type: 'queueEnd', + $if: 'old', + code: ` +$deleteNowPlaying +$if[$playerStatus!=stopped] +$description[ +Rax leaving the voice channel +Add more songs by using \`/play\`] +$title[$getEmoji[queue] Queue is over!] +$color[#4367FE] +$deleteIn[20s] +$onlyIf[$hasPermsInChannel[$channelId;$clientId;viewchannel;sendmessages;embedlinks]==true;] +$onlyIf[$channelExists[$channelId]==true;] +$endif +$leavevc +`, + }, +]; diff --git a/src/commands/player/trackEnd.js b/src/commands/player/trackEnd.js new file mode 100644 index 0000000..08bd33f --- /dev/null +++ b/src/commands/player/trackEnd.js @@ -0,0 +1,9 @@ +module.exports = [ + { + name: 'trackEnd', + type: 'trackEnd', + code: ` +$deleteNowPlaying +$onlyIf[$channelExists[$channelId]==true;]`, + }, +]; diff --git a/src/commands/player/trackStart.js b/src/commands/player/trackStart.js new file mode 100644 index 0000000..efdfd49 --- /dev/null +++ b/src/commands/player/trackStart.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'trackStart', + channel: '$channelId', + type: 'trackStart', + code: ` +$setNowPlaying[$get[ID]] +$let[ID;$sendMessage[{newEmbed:{description:$nonEscape[$replaceNowPlaying[$songInfo[sourceName]] **Now playing [$nonEscape[$replaceText[$songInfo[title];#SEMI#;]]]($songInfo[url])**]}{color:#4367FE}};true]] +$onlyIf[$hasPermsInChannel[$channelId;$clientId;sendmessages;embedlinks]==true;] +$onlyIf[$channelExists[$channelId]==true;]`, + }, +]; diff --git a/src/config/emojis.js b/src/config/emojis.js new file mode 100644 index 0000000..0106bee --- /dev/null +++ b/src/config/emojis.js @@ -0,0 +1,13 @@ +module.exports = { + spotify: '<:spotify:1314833612348067951>', + soundcloud: '<:soundcloud:1314833656241459280>', + applemusic: '<:applemusic:1314833587106873374>', + deezer: '<:deezer:1314833561953767477>', + queue: '<:queue:1314833537932722186>', + yes: '<:yes:1314833511357743104>', + no: '<:no:1314836229593759806>', + online: '<:online:1238662924407410688>', + offline: '<:offline:1318504606426333315>', + idle: '<:idle:1318498782731698197>', + topgg: '<:topgg:1322153742581104660>', +}; diff --git a/src/config/index.js b/src/config/index.js new file mode 100644 index 0000000..b8f55fc --- /dev/null +++ b/src/config/index.js @@ -0,0 +1,23 @@ +require('dotenv').config(); + +module.exports = { + token: process.env.TOKEN, + clientId: process.env.CLIENT_ID, + prefix: process.env.PREFIX, + database: process.env.DATABASE, + debug: process.env.DEBUG === 'true' ? true : false, + port: Number(process.env.PORT), + nodes: require('./nodes.js'), + emojis: require('./emojis.js'), + topgg: { + token: process.env.TOPGG_TOKEN, + auth: process.env.TOPGG_AUTH, + }, + logs: { + ready: '1238488401729163454', + nodes: '1318500565290057738', + join: '1311333193768763464', + leave: '1311333221333729310', + vote: '1301780094540451860', + }, +}; diff --git a/src/config/nodes.example.js b/src/config/nodes.example.js new file mode 100644 index 0000000..076c16e --- /dev/null +++ b/src/config/nodes.example.js @@ -0,0 +1,12 @@ +module.exports = [ + { + name: 'Cat', + host: 'example.meow.com', + port: 8080, + secure: false, + auth: 'youshallnotpass', + }, + { + // Add more + }, +]; diff --git a/src/handlers/functions.js b/src/handlers/functions.js new file mode 100644 index 0000000..be8b4b9 --- /dev/null +++ b/src/handlers/functions.js @@ -0,0 +1,632 @@ +module.exports = [ + { + name: '$getEmoji', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.client.returnCode(d, data); + + const [value] = data.inside.splits; + const config = d.client.config?.emojis; + + try { + let evaled = await eval(`config.${value}`); + data.result = evaled; + } catch {} + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$checkClientOwnerIds', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + const owner = (await d.client.application.fetch())?.owner; + + if (owner instanceof require('discord.js').Team) { + data.result = owner?.members?.get(d.author.id) ? true : false; + } else { + data.result = owner?.id === d.author.id; + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$checkPermsPlayer', + type: 'aoi.js', + params: [], + code: ` +$if[$hasPlayer==true] +$onlyIf[$maxQueueSize>=$queueLength;{newEmbed:{description:$nonEscape[$getEmoji[no]] Maximum queue size reaches $maxQueueSize!}{color:Red}}{deleteIn:5s}{ephemeral}] +$endif +$onlyIf[$message!=;{newEmbed:{description:$nonEscape[$getEmoji[no]] Nu uh uh... please provide a valid url or song title!}{color:Red}}{deleteIn:5s}{ephemeral}] +$onlyIf[$hasPermsInChannel[$voiceId;$clientid;speak]==true;{newEmbed:{description:$nonEscape[$getEmoji[no]] Umm, this is awkward. I don't have \`Speak\` permission!}{color:Red}}{deleteIn:5s}{ephemeral}] +$onlyIf[$hasPermsInChannel[$voiceId;$clientid;connect]==true;{newEmbed:{description:$nonEscape[$getEmoji[no]] Umm, this is awkward. I don't have \`Connect\` permission!}{color:Red}}{deleteIn:5s}{ephemeral}] +$onlyIf[$voiceId[$authorId]!=;{newEmbed:{description:$nonEscape[$getEmoji[no]] You need to connect to a voice channel!}{color:Red}}{deleteIn:5s}{ephemeral}] +$onlyIf[$hasPermsInChannel[$channelId;$clientid;embedlinks]==true;$nonEscape[$getEmoji[no]] Umm, this is awkward. I don't have \`EmbedLinks\` permission!{deleteIn:5s}{ephemeral}] +$onlyIf[$hasPermsInChannel[$channelId;$clientid;viewchannel;sendmessages]==true;]`, + }, + { + name: '$checkPerms', + type: 'aoi.js', + params: [], + code: ` +$onlyIf[$hasPermsInChannel[$channelId;$clientid;embedlinks]==true;$nonEscape[$getEmoji[no]] Umm, this is awkward. I don't have \`EmbedLinks\` permission!{deleteIn:5s}{ephemeral}] +$onlyIf[$hasPermsInChannel[$channelId;$clientid;viewchannel;sendmessages]==true;]`, + }, + { + name: '$checkVoice', + type: 'aoi.js', + params: [], + code: ` +$if[$hasPlayer==true] +$onlyIf[$voiceId[$clientId]==$voiceId[$authorId];{newEmbed:{description:$nonEscape[$getEmoji[no]] You are not in the same voice channel!}{color:Red}}{deleteIn:5s}{ephemeral}] +$endif +$onlyIf[$voiceId[$authorId]!=;{newEmbed:{description:$nonEscape[$getEmoji[no]] You need to connect to a voice channel!}{color:Red}}{deleteIn:5s}{ephemeral}]`, + }, + { + name: '$getConfig', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.client.returnCode(d, data); + + const [value] = data.inside.splits; + const config = d.client.config; + + try { + let evaled = await eval(`config.${value}`); + if (typeof evaled === 'object') evaled = JSON.stringify(evaled); + data.result = evaled; + } catch {} + + return { + code: d.util.setCode(data), + }; + }, + }, + /*{ + name: '$getDefaultVar', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + let [varname, table = d.client.db.tables[0]] = data.inside.splits; + varname = varname?.addBrackets(); + table = table?.addBrackets(); + + if (!varname) return d.client.returnCode(d, data); + if (!d.client?.variableManager?.has(varname, table)) + return d.aoiError.fnError(d, 'custom', {}, `Variable "${varname}" not found`); + + data.result = d.client?.variableManager?.get(varname, table)?.default; + return { + code: d.util.setCode(data), + }; + }, + },*/ + { + name: '$isInteraction', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + let content = data.inside.splits; + + let send = { + embeds: d.embeds, + files: d.files, + components: d.components, + }; + + if (!d.data.interaction) return d.client.returnCode(d, data); + if (content && content?.length) send.content = content?.join(';')?.addBrackets(); + if (d.data.dm === true) { + await d.data.interaction?.member?.send(send).catch(() => {}); + send = { + embeds: [ + { + description: `Please check your DM's!`, + color: 0x4367fe, + }, + ], + }; + } + + const msg = await d.data.interaction?.editReply(send).catch(() => {}); + if (d.data.deleteIn) setTimeout(() => msg?.delete()?.catch(() => {}), d.data.deleteIn); + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$getContext', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.client.returnCode(d, data); + const [option, msg = 'all'] = data.inside.splits; + + const extractUrl = str => { + const matched = str.match(/<(https?:\/\/[^>]+)>/); + return matched ? matched[1] : null; + }; + + if (d.data.interaction) { + if (option == 'false') return d.client.returnCode(d, data); + data.result = d.data.interaction.options.get(option.addBrackets())?.value; + } else { + if (msg == 'false') return d.client.returnCode(d, data); + data.result = msg === 'all' ? d.args.join(' ') : d.args[Number(msg) - 1]; + } + + if (typeof data.result === 'string') { + const url = extractUrl(data.result); + if (url) { + data.result = url; + } + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$onlyIf', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + let error = false; + + let [condition, err = ''] = data.inside.splits; + + if (!eval(d.helpers.checkCondition.solve(d.helpers.mustEscape(condition)))) { + error = true; + if (err?.trim() === '') { + } else { + if (!err.includes('{interaction}') && d.data.interaction) err = err + '{interaction}'; + if ( + (d.data.interaction && d.data.interaction?.isChatInputCommand()) || + d.data.interaction?.deferred + ) { + d.data.interaction.reply = d.data.interaction?.editReply?.bind(d.data.interaction); + } + const errorMsg = await d.util.errorParser(err, d); + d.aoiError.makeMessageError(d.client, d.channel, errorMsg.data ?? errorMsg, errorMsg.options, d); + } + } + + return { + code: d.util.setCode(data), + error, + }; + }, + }, + { + name: '$deleteIn', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.client.returnCode(d, data); + let [deleteIn] = data.inside.splits; + + deleteIn = await d.helpers.time.parse(deleteIn).ms; + d.data.deleteIn = deleteIn; + + if (d.data.interaction) return d.client.returnCode(d, data); + + return { + code: d.util.setCode(data), + deleteIn, + }; + }, + }, + { + name: '$dm', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + const [id = d.author.id] = data.inside.splits; + + let dm = await d.util.getUser(d, id); + if (!dm) return d.aoiError.fnError(d, 'user', { inside: data.inside }); + d.data.dm = true; + + if (d.data.interaction) return d.client.returnCode(d, data); + + return { + code: d.util.setCode(data), + useChannel: dm, + }; + }, + }, + { + name: '$queueNext', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + try { + const player = d.client.queue.get(d.guild.id); + if (!player || !player?.queue?.length || player?.queue?.length / 10 <= 1) { + d.message.edit({ components: [] }); + return d.client.returnCode(d, data); + } + + let components = d.message.components[0].components; + let embeds = d.message.embeds[0]; + if (player?.queue?.length / 10 <= components[2].data.custom_id.split('_')[1]) { + components[2].data.disabled = true; + } + + const interpreted = ( + await d.interpreter( + d.client, + d.data.interaction, + [], + { + code: `$nonEscape[$queue[${components[2].data.custom_id.split('_')[1]};10;{position}. [{title}]({url}) - {requester.mention}]]`, + name: 'NameParser', + }, + undefined, + true, + ) + )?.code; + + components[1].data.label = `${player?.queue?.length} Songs`; + components[0].data.disabled = false; + components[2].data.custom_id = + 'queueNext_' + + (Number(components[2].data.custom_id.split('_')[1]) + 1) + + `_${d.data.interaction?.author?.id}`; + components[0].data.custom_id = + 'queuePrevious_' + + (Number(components[0].data.custom_id.split('_')[1]) + 1) + + `_${d.data.interaction?.author?.id}`; + embeds.data.description = `>>> ${interpreted}`; + d.message.edit({ + components: d.message.components, + embeds: d.message.embeds, + }); + } catch (err) { + d.message.edit({ + components: [], + embeds: [ + { + description: 'An error occurred: ' + err.message, + color: 0xff0000, + }, + ], + }); + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$queuePrevious', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + try { + const player = d.client.queue.get(d.guild.id); + if (!player || !player?.queue?.length || player?.queue?.length / 10 <= 1) { + d.message.edit({ components: [] }); + return d.client.returnCode(d, data); + } + + let components = d.message.components[0].components; + let embeds = d.message.embeds[0]; + if (Number(components[0].data.custom_id.split('_')[1]) <= 1) { + components[0].data.disabled = true; + } + + const interpreted = ( + await d.interpreter( + d.client, + d.data.interaction, + [], + { + code: `$nonEscape[$queue[${components[0].data.custom_id.split('_')[1]};10;{position}. [{title}]({url}) - {requester.mention}]]`, + name: 'NameParser', + }, + undefined, + true, + ) + )?.code; + + components[1].data.label = `${player?.queue?.length} Songs`; + components[2].data.disabled = false; + components[0].data.custom_id = + 'queuePrevious_' + + (Number(components[0].data.custom_id.split('_')[1]) - 1) + + `_${d.data.interaction?.author?.id}`; + components[2].data.custom_id = + 'queueNext_' + + (Number(components[2].data.custom_id.split('_')[1]) - 1) + + `_${d.data.interaction?.author?.id}`; + embeds.data.description = `>>> ${interpreted}`; + await d.message.edit({ + components: d.message.components, + embeds: d.message.embeds, + }); + } catch (err) { + d.message.edit({ + components: [], + embeds: [ + { + description: 'An error occurred: ' + err.message, + color: 0xff0000, + }, + ], + }); + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$thumbnail', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + + let fields = data.inside.splits; + let i = 0; + + if (isNaN(fields[0]) || fields[0] < 1 || fields[0] > 10) i = -1; + + const index = Number(fields[i] ?? 1) - 1; + const url = fields[i + 1].addBrackets(); + + if (!d.embeds[index]) d.embeds[index] = new d.embed(); + + if (!url) return d.client.returnCode(d, data); + d.embeds[index].setThumbnail(url); + + return { + code: d.util.setCode(data), + embeds: d.embeds, + }; + }, + }, + { + name: '$image', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + + let fields = data.inside.splits; + let i = 0; + + if (isNaN(fields[0]) || fields[0] < 1 || fields[0] > 10) i = -1; + + const index = Number(fields[i] ?? 1) - 1; + const url = fields[i + 1].addBrackets(); + + if (!d.embeds[index]) d.embeds[index] = new d.embed(); + + if (!url) return d.client.returnCode(d, data); + d.embeds[index].setImage(url); + + return { + code: d.util.setCode(data), + embeds: d.embeds, + }; + }, + }, + { + name: '$footer', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + + let fields = data.inside.splits; + let i = 0; + + if (isNaN(fields[0]) || fields[0] < 1 || fields[0] > 10) i = -1; + + const index = Number(fields[i] ?? 1) - 1; + const text = fields[i + 1].addBrackets(); + const iconURL = fields[i + 2]?.addBrackets(); + + if (!d.embeds[index]) d.embeds[index] = new d.embed(); + + if (iconURL) { + d.embeds[index].setFooter({ + text, + iconURL, + }); + } else { + d.embeds[index].setFooter({ + text, + }); + } + + return { + code: d.util.setCode(data), + embeds: d.embeds, + }; + }, + }, + { + name: '$replaceNowPlaying', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + const [type] = data.inside.splits; + const emojis = d.client.config?.emojis; + + switch (type) { + case 'spotify': + data.result = emojis?.spotify; + break; + case 'applemusic': + data.result = emojis?.applemusic; + break; + case 'soundcloud': + data.result = emojis?.soundcloud; + break; + case 'deezer': + data.result = emojis?.deezer; + break; + default: + data.result = emojis?.queue; + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$playerEmpty', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + const [status] = data.inside.splits; + + const player = d.client.queue?.get(d.guild.id); + if (status && player) { + player.emptyPlayer = status == 'true' ? true : false; + } else { + data.result = player?.emptyPlayer || false; + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$lyrics', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.error(data.err); + const title = data.inside.splits; + if (!title?.length) return d.client.returnCode(d, data); + + data.result = await d.client.lyrics?.songs?.search(title?.join(';')).then(x => x[0]?.lyrics()); + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$chunkedLength', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + + if (d.data.chunked && d.data.chunked?.length) { + data.result = d.data.chunked?.length; + } else { + data.result = 0; + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$chunkedText', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + let [index = 1] = data.inside.splits; + index = Number(index) - 1; + if (d.data.chunked && d.data.chunked?.length >= index) { + data.result = d.data.chunked[index]; + } + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$textChunk', + type: 'djs', + code: d => { + const data = d.util.aoiFunc(d); + if (data.err) return d.client.returnCode(d, data); + + let text = data.inside.splits; + let chunkSize = Number(text.pop()); + text = text?.join(';')?.addBrackets(); + + if (!text) return d.client.returnCode(d, data); + + if (isNaN(chunkSize) || chunkSize < 1) return d.client.returnCode(d, data); + + d.data.chunked = textChunks(text, chunkSize); + + return { + code: d.util.setCode(data), + }; + }, + }, + { + name: '$timeoutComponent', + type: 'djs', + code: async d => { + const data = d.util.aoiFunc(d); + if (!d.data.interaction && !d.data.interaction.isButton()) return d.client.returnCode(d, data); + + const key = d.data.interaction?.message?.id; + if (!key) return d.client.returnCode(d, data); + const timeout = d.client.timeout.get(key); + if (timeout) clearTimeout(timeout); + const x = setTimeout(async () => { + d.client.timeout.delete(key); + await d.data.interaction?.message + ?.edit({ + components: [], + }) + .catch(() => {}); + }, 20000); + d.client.timeout.set(key, x); + return { + code: d.util.setCode(data), + }; + }, + }, +]; + +function textChunks(text, maxLength = 1024) { + maxLength = Number(maxLength); + const chunks = []; + let start = 0; + + while (start < text.length) { + let end = start + maxLength; + if (end < text.length) { + while (end > start && text[end] !== ' ' && text[end] !== '\n') { + end--; + } + if (end === start) { + end = start + maxLength; + } + } + chunks.push(text.slice(start, end).trim()); + start = end; + } + + return chunks; +} diff --git a/src/handlers/index.js b/src/handlers/index.js new file mode 100644 index 0000000..9c8931c --- /dev/null +++ b/src/handlers/index.js @@ -0,0 +1,52 @@ +//const variables = require('./variables.js'); +const functions = require('./functions.js'); +const statuses = require('./statuses.js'); +const Topgg = require('./topgg.js'); +const { REST, Routes, Collection } = require('discord.js'); +const { Client } = require('genius-lyrics'); +const fs = require('node:fs'); +const path = require('node:path'); + +exports.Handlers = (client, config) => { + client.config = config; + client.os = require('os'); + //client.variables(variables); + client.lyrics = new Client(process.env.GENIUS_API); + client.timeout = new Collection(); + statuses.forEach(x => client.status(x)); + functions.forEach(x => client.functionManager.createFunction(x)); + client.on('interactionCreate', interaction => require('./interaction.js')(interaction, client)); + Topgg(client, config); + client.body = []; + loadCommands(client); + registerCommands(client); +}; + +function loadCommands(client, basePath = path.join(process.cwd(), 'src/commands/client')) { + const files = fs.readdirSync(basePath); + for (const file of files) { + if (file === 'owner' || file === 'events') continue; + const filePath = path.join(basePath, file); + const cmdPath = fs.readdirSyc; + if (fs.statSync(filePath).isDirectory()) { + loadCommands(client, filePath); + } else { + let cmd = require(filePath); + if (Array.isArray(cmd)) cmd = cmd[0]; + if (cmd.type || !cmd.name || !cmd.description) continue; + client.body.push({ + name: cmd.name, + description: cmd.description || 'No description provide', + type: 1, + options: cmd.options || [], + }); + } + } +} + +function registerCommands(client) { + const rest = new REST({ version: '10' }).setToken(process.env.TOKEN); + rest.put(Routes.applicationCommands(process.env.CLIENT_ID), { + body: client.body, + }); +} diff --git a/src/handlers/interaction.js b/src/handlers/interaction.js new file mode 100644 index 0000000..fb15805 --- /dev/null +++ b/src/handlers/interaction.js @@ -0,0 +1,57 @@ +module.exports = async (interaction, client) => { + if (!interaction.inGuild() || !interaction.isChatInputCommand()) return; + client.interactionManager.resolve(interaction); + const cmds = client.cmd.default.filter(x => x.name?.toLowerCase() === interaction.commandName?.toLowerCase()).V(); + if (!cmds.length) return; + const data = { + client: client, + guild: interaction.guild, + message: interaction?.message, + channel: interaction.channel, + author: interaction.author, + member: interaction.member, + isAutocomplete: interaction.isAutocomplete(), + }; + + for (const cmd of cmds) { + if ( + (!!cmd.sub_command && interaction.options._subcommand !== cmd.sub_command) || + (!!cmd.sub_command_group && interaction.options._group !== cmd.sub_command_group) + ) + continue; + await interaction.deferReply().catch(() => {}); + + if (cmd.name?.includes('$')) { + cmd.name = ( + await client.functionManager.interpreter( + client, + data, + [], + { code: cmd.name, name: 'NameParser' }, + client.db, + true, + undefined, + { interaction }, + ) + )?.code; + } + + await client.functionManager.interpreter( + client, + data, + interaction.values || + interaction.options?._hoistedOptions?.map(x => x.value) || [interaction.customId] || + [], + cmd, + client.db, + true, + undefined, + { interaction }, + undefined, + undefined, + undefined, + undefined, + false, + ); + } +}; diff --git a/src/handlers/statuses.js b/src/handlers/statuses.js new file mode 100644 index 0000000..e8e195b --- /dev/null +++ b/src/handlers/statuses.js @@ -0,0 +1,14 @@ +module.exports = [ + { + name: 'Get started with /help', + type: 'Custom', + status: 'online', + time: 20, + }, + { + name: 'NouJS Development', + type: 'Custom', + status: 'online', + time: 20, + }, +]; diff --git a/src/handlers/topgg.js b/src/handlers/topgg.js new file mode 100644 index 0000000..80be1d9 --- /dev/null +++ b/src/handlers/topgg.js @@ -0,0 +1,46 @@ +const { Manager } = require('topgg.utils'); +const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require('discord.js'); + +module.exports = (client, config) => { + client.topgg = new Manager({ + token: config.topgg.token, + webhook: { + endpoint: '/webhook', + port: config.port, + authorization: config.topgg.auth, + }, + }); + + client.topgg.on('botVote', async vote => { + const user = await client.users.fetch(vote.userId); + if (!user) return; + + const channel = await client.channels.fetch(config.logs.vote); + if (!channel) return; + + const embed = new EmbedBuilder() + .setDescription( + `Thanks for voting for me, <@${user.id}>! Your support keeps this bot running and improving every day. We're working hard to bring you even better features.\n\nYou can [vote](https://top.gg/bot/${client.user.id}/vote) again `, + ) + .setColor('#4367FE') + .setTimestamp() + .setThumbnail(user.displayAvatarURL()) + .setTitle(`${user.globalName || user.username} Just Voted Me!`); + + const row = new ActionRowBuilder().addComponents( + new ButtonBuilder() + .setStyle(ButtonStyle.Link) + .setLabel('Vote me on Top.gg!') + .setURL(`https://top.gg/bot/${client.user.id}/vote`) + .setEmoji(config.emojis.topgg), + ); + + await channel + .send({ + embeds: [embed], + content: `<@${user.id}>`, + components: [row], + }) + .catch(() => {}); + }); +}; diff --git a/src/handlers/variables.js b/src/handlers/variables.js new file mode 100644 index 0000000..3bd7f98 --- /dev/null +++ b/src/handlers/variables.js @@ -0,0 +1,7 @@ +/*const config = require('../config'); + +module.exports = { + maintenance: false, + prefix: config.prefix, + 247: '{ "status": false, "channel": null }', +};*/ diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..4e9ec87 --- /dev/null +++ b/src/index.js @@ -0,0 +1,17 @@ +const { ClusterManager } = require('discord-hybrid-sharding'); +const config = require('./config'); +const chalk = require('chalk'); + +const manager = new ClusterManager(`${__dirname}/client.js`, { + totalShards: 'auto', + shardsPerClusters: 2, + mode: 'process', + token: config.token, +}); + +manager.on('clusterCreate', cluster => { + if (!config.debug) return; + console.log(`[${chalk.blue('DEBUG')}] :: Launched Cluster ${chalk.cyan(cluster.id)}`); +}); + +manager.spawn({ timeout: -1 });