├── .eslintignore ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── codeql-analysis.yml │ └── node.yml ├── .gitignore ├── .jsdoc.json ├── .npmignore ├── .theia └── settings.json ├── BREAKING_CHANGES.md ├── CHANGELOG.md ├── LICENSE ├── README.md ├── assets ├── messageAsyncQuestion.gif ├── messageQuestion.gif ├── reactMenu.gif ├── reactPaginator.gif ├── reactQuestion.gif ├── reactYesNoQuestion.gif └── reactionRoles.gif ├── docs ├── Constants.html ├── Controller.html ├── MessageCollector.html ├── ReactionCollector.html ├── ReactionRole.html ├── ReactionRoleManager.html ├── collectors_messageCollector.js.html ├── collectors_reactionCollector.js.html ├── discord.js-collector │ ├── 1.7.9 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ ├── OpenSans-Regular-webfont.woff │ │ │ ├── OpenSans-Semibold-webfont.eot │ │ │ ├── OpenSans-Semibold-webfont.svg │ │ │ ├── OpenSans-Semibold-webfont.ttf │ │ │ ├── OpenSans-Semibold-webfont.woff │ │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ ├── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html │ ├── 1.8.0 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ ├── OpenSans-Regular-webfont.woff │ │ │ ├── OpenSans-Semibold-webfont.eot │ │ │ ├── OpenSans-Semibold-webfont.svg │ │ │ ├── OpenSans-Semibold-webfont.ttf │ │ │ ├── OpenSans-Semibold-webfont.woff │ │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ ├── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html │ ├── 1.8.1 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ ├── OpenSans-Regular-webfont.woff │ │ │ ├── OpenSans-Semibold-webfont.eot │ │ │ ├── OpenSans-Semibold-webfont.svg │ │ │ ├── OpenSans-Semibold-webfont.ttf │ │ │ ├── OpenSans-Semibold-webfont.woff │ │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ ├── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html │ ├── 1.8.2 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ ├── OpenSans-Regular-webfont.woff │ │ │ ├── OpenSans-Semibold-webfont.eot │ │ │ ├── OpenSans-Semibold-webfont.svg │ │ │ ├── OpenSans-Semibold-webfont.ttf │ │ │ ├── OpenSans-Semibold-webfont.woff │ │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ ├── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html │ ├── 1.8.3 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ │ ├── OpenSans-Bold-webfont.eot │ │ │ ├── OpenSans-Bold-webfont.svg │ │ │ ├── OpenSans-Bold-webfont.woff │ │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ │ ├── OpenSans-Italic-webfont.eot │ │ │ ├── OpenSans-Italic-webfont.svg │ │ │ ├── OpenSans-Italic-webfont.woff │ │ │ ├── OpenSans-Light-webfont.eot │ │ │ ├── OpenSans-Light-webfont.svg │ │ │ ├── OpenSans-Light-webfont.woff │ │ │ ├── OpenSans-LightItalic-webfont.eot │ │ │ ├── OpenSans-LightItalic-webfont.svg │ │ │ ├── OpenSans-LightItalic-webfont.woff │ │ │ ├── OpenSans-Regular-webfont.eot │ │ │ ├── OpenSans-Regular-webfont.svg │ │ │ ├── OpenSans-Regular-webfont.woff │ │ │ ├── OpenSans-Semibold-webfont.eot │ │ │ ├── OpenSans-Semibold-webfont.svg │ │ │ ├── OpenSans-Semibold-webfont.ttf │ │ │ ├── OpenSans-Semibold-webfont.woff │ │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ │ ├── linenumber.js │ │ │ └── prettify │ │ │ │ ├── Apache-License-2.0.txt │ │ │ │ ├── lang-css.js │ │ │ │ └── prettify.js │ │ ├── styles │ │ │ ├── jsdoc-default.css │ │ │ ├── prettify-jsdoc.css │ │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html │ └── 1.8.4 │ │ ├── Constants.html │ │ ├── Controller.html │ │ ├── MessageCollector.html │ │ ├── ReactionCollector.html │ │ ├── ReactionRole.html │ │ ├── ReactionRoleManager.html │ │ ├── collectors_messageCollector.js.html │ │ ├── collectors_reactionCollector.js.html │ │ ├── fonts │ │ ├── OpenSans-Bold-webfont.eot │ │ ├── OpenSans-Bold-webfont.svg │ │ ├── OpenSans-Bold-webfont.woff │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ ├── OpenSans-Italic-webfont.eot │ │ ├── OpenSans-Italic-webfont.svg │ │ ├── OpenSans-Italic-webfont.woff │ │ ├── OpenSans-Light-webfont.eot │ │ ├── OpenSans-Light-webfont.svg │ │ ├── OpenSans-Light-webfont.woff │ │ ├── OpenSans-LightItalic-webfont.eot │ │ ├── OpenSans-LightItalic-webfont.svg │ │ ├── OpenSans-LightItalic-webfont.woff │ │ ├── OpenSans-Regular-webfont.eot │ │ ├── OpenSans-Regular-webfont.svg │ │ ├── OpenSans-Regular-webfont.woff │ │ ├── OpenSans-Semibold-webfont.eot │ │ ├── OpenSans-Semibold-webfont.svg │ │ ├── OpenSans-Semibold-webfont.ttf │ │ ├── OpenSans-Semibold-webfont.woff │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ └── OpenSans-SemiboldItalic-webfont.woff │ │ ├── global.html │ │ ├── index.html │ │ ├── reaction-role_constants.js.html │ │ ├── reaction-role_manager.js.html │ │ ├── reaction-role_reactionRole.js.html │ │ ├── scripts │ │ ├── linenumber.js │ │ └── prettify │ │ │ ├── Apache-License-2.0.txt │ │ │ ├── lang-css.js │ │ │ └── prettify.js │ │ ├── styles │ │ ├── jsdoc-default.css │ │ ├── prettify-jsdoc.css │ │ └── prettify-tomorrow.css │ │ ├── util_constants.js.html │ │ └── util_find.js.html ├── fonts │ ├── OpenSans-Bold-webfont.eot │ ├── OpenSans-Bold-webfont.svg │ ├── OpenSans-Bold-webfont.woff │ ├── OpenSans-BoldItalic-webfont.eot │ ├── OpenSans-BoldItalic-webfont.svg │ ├── OpenSans-BoldItalic-webfont.woff │ ├── OpenSans-Italic-webfont.eot │ ├── OpenSans-Italic-webfont.svg │ ├── OpenSans-Italic-webfont.woff │ ├── OpenSans-Light-webfont.eot │ ├── OpenSans-Light-webfont.svg │ ├── OpenSans-Light-webfont.woff │ ├── OpenSans-LightItalic-webfont.eot │ ├── OpenSans-LightItalic-webfont.svg │ ├── OpenSans-LightItalic-webfont.woff │ ├── OpenSans-Regular-webfont.eot │ ├── OpenSans-Regular-webfont.svg │ ├── OpenSans-Regular-webfont.woff │ ├── OpenSans-Semibold-webfont.eot │ ├── OpenSans-Semibold-webfont.svg │ ├── OpenSans-Semibold-webfont.ttf │ ├── OpenSans-Semibold-webfont.woff │ ├── OpenSans-SemiboldItalic-webfont.eot │ ├── OpenSans-SemiboldItalic-webfont.svg │ ├── OpenSans-SemiboldItalic-webfont.ttf │ └── OpenSans-SemiboldItalic-webfont.woff ├── global.html ├── index.html ├── reaction-role_constants.js.html ├── reaction-role_manager.js.html ├── reaction-role_reactionRole.js.html ├── scripts │ ├── linenumber.js │ └── prettify │ │ ├── Apache-License-2.0.txt │ │ ├── lang-css.js │ │ └── prettify.js ├── styles │ ├── jsdoc-default.css │ ├── prettify-jsdoc.css │ └── prettify-tomorrow.css ├── util_constants.js.html └── util_find.js.html ├── examples ├── message-collector │ └── question.js ├── reaction-collector │ ├── menu.js │ ├── paginator.js │ ├── question.js │ └── yesNoQuestion.js └── reaction-role-manager │ ├── Note.md │ └── basic.js ├── package-lock.json ├── package.json ├── src ├── collectors │ ├── collectorManager.js │ ├── messageCollector.js │ └── reactionCollector.js ├── index.js ├── reaction-role │ ├── constants.js │ ├── manager.js │ └── reactionRole.js └── util │ ├── constants.js │ ├── find.js │ └── validate.js ├── tests ├── roles.json └── rr.js ├── tsconfig.json └── typings └── index.d.ts /.eslintignore: -------------------------------------------------------------------------------- 1 | # Ignore assets 2 | examples/* 3 | assets/* 4 | 5 | # Ignore built-in files 6 | node_modules/* 7 | .github/* 8 | tests/* 9 | test/* 10 | examples/* 11 | assets/* 12 | .jsdoc.json 13 | tsconfig.json 14 | .eslint.json 15 | 16 | # Ignore output files 17 | build/* 18 | out/* 19 | docs/* 20 | 21 | # Ignore unsefull files 22 | yarn-error.log 23 | package-lock.json 24 | yarn.lock 25 | .vscode/* 26 | 27 | # Ignore settings files 28 | **/*.env 29 | .npmrc 30 | 31 | 32 | **/constants.js -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es2021: true, 6 | }, 7 | extends: [ 8 | 'airbnb-base', 9 | 'eslint:recommended', 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 12, 13 | }, 14 | rules: { 15 | 'linebreak-style': 'off', 16 | 'no-unused-vars': 'off', 17 | indent: ['error', 4], 18 | 'max-classes-per-file': 'off', 19 | 'no-underscore-dangle': 'off', 20 | 'max-len': ['error', 160], 21 | 'consistent-return': 'off', 22 | 'no-async-promise-executor': 'off', 23 | 'global-require': 'off', 24 | 'no-continue': 'off', 25 | 'no-await-in-loop': 'off', 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[Bug]: " 5 | labels: bug, unverified 6 | assignees: IDjinn 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Please insert here your code if possible** 14 | ```js 15 | // Insert here your code 16 | ``` 17 | 18 | **Screenshots** 19 | If applicable, add screenshots to help explain your problem. 20 | 21 | **Desktop (please complete the following information):** 22 | - Discord.js Version: 23 | - Discord.js-collector Version: 24 | - Operating system: 25 | - What priority this should have? Please describe: 26 | 27 | 28 | - [ ] I've tested in last discord.js-collector version 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[Feat]: " 5 | labels: enhancement 6 | assignees: IDjinn 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | paths: 18 | - src 19 | - typings 20 | pull_request: 21 | # The branches below must be a subset of the branches above 22 | branches: [ master ] 23 | paths: 24 | - src 25 | - typings 26 | schedule: 27 | - cron: '18 9 * * 1' 28 | 29 | jobs: 30 | analyze: 31 | name: Analyze 32 | runs-on: ubuntu-latest 33 | 34 | strategy: 35 | fail-fast: false 36 | matrix: 37 | language: [ 'javascript' ] 38 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 39 | # Learn more: 40 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 41 | 42 | steps: 43 | - name: Checkout repository 44 | uses: actions/checkout@v2 45 | 46 | # Initializes the CodeQL tools for scanning. 47 | - name: Initialize CodeQL 48 | uses: github/codeql-action/init@v1 49 | with: 50 | languages: ${{ matrix.language }} 51 | # If you wish to specify custom queries, you can do so here or in a config file. 52 | # By default, queries listed here will override any specified in a config file. 53 | # Prefix the list here with "+" to use these queries and those in the config file. 54 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v1 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 https://git.io/JvXDl 63 | 64 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 65 | # and modify them (or add more) to build your code if your project 66 | # uses a compiled language 67 | 68 | #- run: | 69 | # make bootstrap 70 | # make release 71 | 72 | - name: Perform CodeQL Analysis 73 | uses: github/codeql-action/analyze@v1 74 | -------------------------------------------------------------------------------- /.github/workflows/node.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x, 14.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - run: npm ci 28 | - run: npm run build --if-present 29 | - run: npm run docs --if-present 30 | - run: npm test 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore node modules 2 | node_modules/* 3 | 4 | # Ignore output files 5 | build/* 6 | out/* 7 | tests/roles.json 8 | 9 | # Ignore unsefull files 10 | yarn-error.log 11 | yarn.lock 12 | .vscode/* 13 | 14 | # Ignore settings files 15 | **/process.env 16 | .npmrc 17 | -------------------------------------------------------------------------------- /.jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "allowUnknownTags": true, 4 | "dictionaries": [ 5 | "jsdoc" 6 | ] 7 | }, 8 | "source": { 9 | "include": [ 10 | "src", 11 | "package.json", 12 | "README.md" 13 | ], 14 | "includePattern": ".js$", 15 | "excludePattern": "(node_modules/|docs)" 16 | }, 17 | "plugins": [ 18 | "plugins/markdown" 19 | ], 20 | "templates": { 21 | "cleverLinks": false, 22 | "monospaceLinks": true, 23 | "useLongnameInNav": false, 24 | "showInheritedInNav": true 25 | }, 26 | "opts": { 27 | "destination": "./docs/", 28 | "encoding": "utf8", 29 | "recurse": true, 30 | "template": "./node_modules/minami" 31 | } 32 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Ignore assets 2 | examples/* 3 | assets/* 4 | 5 | # Ignore built-in files 6 | node_modules/* 7 | .github/* 8 | tests/* 9 | test/* 10 | examples/* 11 | docs/* 12 | assets/* 13 | .jsdoc.json 14 | tsconfig.json 15 | .eslint.json 16 | 17 | # Ignore output files 18 | build/* 19 | out/* 20 | docs/* 21 | 22 | # Ignore unsefull files 23 | yarn-error.log 24 | package-lock.json 25 | yarn.lock 26 | .vscode/* 27 | 28 | # Ignore settings files 29 | **/*.env 30 | .npmrc 31 | -------------------------------------------------------------------------------- /.theia/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.autoSave": "on" 3 | } -------------------------------------------------------------------------------- /BREAKING_CHANGES.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | --- 4 | # V1.8.3 -> V1.8.4 5 | 6 | Reaction Role Manager: \ 7 | - `RequirementType` now is enum check [here](https://idjinn.github.io/Discord.js-Collector/global.html#RequirementType) new values.\ 8 | - `IRequirementType` now was improved, check [here](https://idjinn.github.io/Discord.js-Collector/global.html#IRequirementType) new fields.\ 9 | 10 | 11 | --- 12 | # V1.8.1 -> V1.8.3 13 | 14 | Reaction Role Manager: \ 15 | - `debug` property was removed, please use event debug instead. 16 | 17 | --- 18 | # V1.8.1 -> V1.8.3 19 | 20 | Reaction Role Manager: \ 21 | - `debug` property was removed, please use event debug instead. 22 | 23 | --- 24 | # V1.8.0 -> V1.8.1 25 | 26 | Reaction Role Manager: \ 27 | - Event `ReactionRoleManager#allReactionsRemove` param `rolesAffected` now it's a `Collection`\ 28 | - `ReactionRole#role` property was flaged as deprecated, please use `ReactionRole#roles` instead\ 29 | - `static ReactionRole#fromJSON(json)` method was flaged as deprecated, use `new ReactionRole(json)` instead\ 30 | - `ReactionRoleManager#createReactionRole(options)` param `role` is removed, it was replaced by `roles`, and now it's array of roles. 31 | 32 | --- 33 | # V1.7.0 -> V1.8.0 34 | 35 | Reaction Role Manager: \ 36 | - `ReactionRole#type` property will define if it's normal, toggle or other reaction role types, the system have auto deprecation handler, if it's not toggle role system set it as normal, if is toggle role set it as toggle role type. Other types will not be affected. 37 | - `ReactionRole#toggle` property was marked with deprecated, please use `isToggle` instead. All toggle roles will be updated to type `2` (until v1.8.0), `toJSON()` method and default value in mongoDB schema will not longer show it.\ 38 | - `ReactionRole#max` property was changed behavior, now 0 is infinity (and default) roles to give, and max limit is 1B roles.\ 39 | - `ReactionRole#createReactionRole()` option `toggle` is replaced by `type` of reaction role. 40 | 41 | --- 42 | # V1.6.9 -> V1.7.0 43 | 44 | - Reaction Collector:\ 45 | - On React triggers:\ 46 | Now, first param given is `collector` (`controller` if you're using menu), then all other args\ 47 | Example:\ 48 | 49 | ```js 50 | // Before 51 | ReactionCollector.question({ 52 | botMessage, 53 | user: message.author, 54 | reactions: { 55 | '✅': async (reaction, ...args) => await message.channel.delete(), 56 | '❌': async (reaction, ...args) => await message.reply('Ok, operation cancelled!'), 57 | } 58 | }, 59 | 'you', 'args', 'here'); 60 | 61 | // After 62 | ReactionCollector.question({ 63 | botMessage, 64 | user: message.author, 65 | reactions: { 66 | '✅': async (reaction, collector, ...args) => await message.channel.delete(), 67 | '❌': async (reaction, collector, ...args) => { 68 | collector.stop(); // Stop reaction collector please! 69 | await message.reply('Ok, operation cancelled!'); 70 | } 71 | } 72 | } 73 | 'you', 'args', 'here'); 74 | ``` 75 | 76 | - Reaction Role Manager:\ 77 | - Now all roles will not deleted by default. If you want delete reaction roles when message was deleted or something like that, you need enable Reaction Roles delete property.\ 78 | Example:\ 79 | 80 | ```js 81 | const reactionRoleManager = new ReactionRoleManager(client, { 82 | storage: true, 83 | mongoDbLink: 'url mongo db', 84 | disableProperty: false // Now, all roles will not just 'disabled', it will be deleted. 85 | }); 86 | ``` 87 | 88 | 89 | # V1.7.0 -> V1.8.0 90 | 91 | - Reaction Role Manager:\ 92 | - Now `deleteReactionRole(reactionRole, [deleted])` method will use object in first param to delete with only message and emoji of this reaction role.\ 93 | E.g:\ 94 | 95 | ```js 96 | // Before 97 | await rrManager.deleteReactionRole(reactionRole); 98 | // Now 99 | await rrManager.deleteReactionRole({reactionRole}); 100 | // Or just delete if you have message and emoji 101 | await rrManager.deleteReactionRole({rrMessage, emoji}); 102 | ``` -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | # CHANGELOG - V1.8.8 4 | 5 | Fix reaction paginator bug. 6 | 7 | --- 8 | # CHANGELOG - V1.8.7 9 | 10 | Reaction Role Manager: fix rr not deleted properly. 11 | 12 | --- 13 | # CHANGELOG - V1.8.6 14 | 15 | Reaction Role Manager: fix Unknown message error. 16 | 17 | --- 18 | # CHANGELOG - V1.8.5 19 | 20 | Reaction Collector: Fix custom emojis not working 21 | 22 | --- 23 | # CHANGELOG - V1.8.4 24 | 25 | Reaction Role Manager feature: new Requirements types! Now you can limit roles/users/permissions needed or denied to win some role. 26 | 27 | --- 28 | # CHANGELOG - V1.8.3 29 | 30 | Reaction Role Manager:\ 31 | - Created debug event.\ 32 | - Make the bot remove/not remove it's reaction when a reaction role is deleted. 33 | 34 | --- 35 | # CHANGELOG - V1.8.2 36 | 37 | Reaction Role Manager: fixed allReactionsRemove triggered whenever message with reactions was deleted 38 | 39 | --- 40 | # CHANGELOG - V1.8.0 41 | 42 | Reaction Role Manager: new role types.\ 43 | - Normal: a normal reaction role.\ 44 | - Toggle: toggle roles, like used in color system.\ 45 | - Just Win: member will only win this role, not lose it.\ 46 | - Just Lose: member will only lose this role, not win it.\ 47 | - Reversed: when react on it, will lose the role, when take off reaction will win the role. 48 | 49 | --- 50 | # CHANGELOG - V1.7.9 51 | 52 | Reaction Role Manager: new feature: hooks! 53 | 54 | --- 55 | # CHANGELOG - V1.7.8 56 | 57 | Reaction Role Manager: partial support and fixed toggled roles take off non first reaction. 58 | 59 | --- 60 | # CHANGELOG - V1.7.7 61 | 62 | Reaction Role Manager:\ 63 | - fix override timeout in toggled roles\ 64 | - fix check requirements 65 | 66 | Collectors: multiple configuration fixes 67 | 68 | --- 69 | # CHANGELOG - V1.7.6 70 | 71 | • Reaction Role Manager: delete reaction roles by message and emoji 72 | 73 | --- 74 | # CHANGELOG - V1.7.5 75 | 76 | • Reaction Role Manager: 77 | - Fix reaction roles toggle 78 | - Added ready event and property 79 | - Fix roles setup 80 | 81 | --- 82 | # CHANGELOG - V1.7.3 83 | 84 | • Reaction Role Manager: fix roles.has is not a funcion 85 | 86 | --- 87 | # CHANGELOG - V1.7.2 88 | 89 | • Reaction Role Manager: fix toggled roles wasn't working 90 | 91 | --- 92 | # CHANGELOG - V1.7.1 93 | 94 | • Reaction Role Manager: fix error on setup 95 | 96 | --- 97 | # CHANGELOG - V1.7.0 98 | 99 | • Reaction Role Manager: disable property instead delete reaction role\ 100 | • Reaction Collector: now the collector will be passed with args 101 | 102 | See [Breaking Changes](./BREAKING_CHANGES.md) 103 | 104 | --- 105 | # CHANGELOG - V1.6.9 106 | 107 | • Reaction Role Manager: Fix roles to give/take verification on turn on bot. 108 | 109 | --- 110 | # CHANGELOG - V1.6.8 111 | 112 | • Reaction Role Manager:\ 113 | - Fix json storage\ 114 | - Removed unecessary debug logs\ 115 | - Conflict if not have rr, don't remove user reaction 116 | 117 | --- 118 | # CHANGELOG - V1.6.7 119 | 120 | • Fix Reaction Role Manager: Bad input: I canno't find emoji {identifier} 121 | 122 | --- 123 | # CHANGELOG - V1.6.6 124 | 125 | • Fix Reaction Collector TypeError: Cannot read property 'map' of undefined\ 126 | • Reaction Role Manager: wrong typo in createReactionRole() 127 | 128 | --- 129 | # CHANGELOG - V1.6.5 130 | 131 | • Fix Reaction Role Manager: Problems with animated emojis and auto deleting rr 132 | 133 | --- 134 | # CHANGELOG - V1.6.3-4 135 | 136 | • Types: fix types imported (MessageCollector and ReactionCollector, CollectorOptions) from Discord.js 137 | 138 | --- 139 | # CHANGELOG - V1.6.2 140 | 141 | • Reaction Role Manager: Fix TypeError: messageReactionsRoles.map is not a function 142 | 143 | --- 144 | # CHANGELOG - V1.6.1 145 | 146 | • Reaction Role Manager: Fix error if client param is class extends client 147 | 148 | --- 149 | # CHANGELOG - V1.6.0 150 | 151 | • Reaction Paginator is working now, with more emojis (Soon it will be possible use custom emojis!) 152 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![downloads-npm-total](https://img.shields.io/npm/dt/discord.js-collector) ![downloads-npm-week](https://img.shields.io/npm/dw/discord.js-collector?color=%234c00ff) ![dependencies-deprecated-status](https://img.shields.io/david/IDjinn/Discord.js-Collector) ![npm-version](https://img.shields.io/npm/v/discord.js-collector) 2 | # Discord.js-collector 3 | 4 | Library to easily create message collector, reactions collector and reactions role on discord.js v12, with customization ways. 5 | 6 | Author Note: This library has no longer support, i will not maintenance this anymore, sorry for who use and like this project. I recommend each you re-do with your own code or migrate to another library who will keep supporting discord.js updates 7 | 8 | Thank you for using discord.js-collector! ❤ 9 | 10 | --- 11 | 12 | ## Sumary 13 | ◘ Reactions Collectors:\ 14 | | [Reaction Role](#reaction-role)\ 15 | | [Menu](#reaction-menu)\ 16 | | [Question](#simple-reaction-collector)\ 17 | | [Yes/No Question](#simple-boolean-reaction-collector)\ 18 | | [Embeds Paginator](#embeds-pagination)\ 19 | ◘ Messages Collectors:\ 20 | | [Question](#simple-messages-collector)\ 21 | | [Async Question](#async-message-collector)\ 22 | ◘ Examples\ 23 | | [Reaction Role Manager](./examples/reaction-role-manager/basic.js)\ 24 | | [Reaction Menu](./examples/reaction-collector/menu.js)\ 25 | ◘ Others\ 26 | | [Changelog](CHANGELOG.md)\ 27 | | [Breaking Changes](./BREAKING_CHANGES.md) 28 | 29 | ## Discord Server 30 | 31 | Sorry, but support server was closed for no longer support of this lib 32 | 33 | ## Documentation 34 | 35 | See all documentation of last version [here](https://idjinn.github.io/Discord.js-Collector/) 36 | 37 | --- 38 | 39 | ## Reaction role 40 | 41 | You can create reactions roles, with amazing functions:\ 42 | | • If you bot turns off, when it turns on all users reacted in messages will win the role.\ 43 | | • If you bot turns off, if any user remove reaction, when the bot turns on will remove the role from him.\ 44 | | • You can store the roles in a JSON file and migrate the reaction role data.\ 45 | | • You can limit max roles given by bot, like 10 roles.\ 46 | | • Toggled roles: Limit one of these roles to use (Util for colors reaction roles, only get one of roles)\ 47 | | • Requirements: Limit roles to only boosters or discord developers win roles!\ 48 | | • Just Win: you can configure a role to just give to member if him react on it!\ 49 | | • Just Lose: you can configure a role to just take from member if him react on it!\ 50 | | • Reversed: When react on it, member will lose the role. When take off reaction of it, member will win the role. 51 | 52 | 53 | ![Reaction Role Gif](./assets/reactionRoles.gif) 54 | 55 | You can find this code example [here](./examples/reaction-role-manager/basic.js) 56 | 57 | --- 58 | 59 | ## Reaction menu 60 | 61 | To create a reaction menu with multiple pages. 62 | 63 | ![Menu Gif](./assets/reactMenu.gif) 64 | 65 | You can find this code example [here](./examples/reaction-collector/menu.js) 66 | 67 | 68 | ## Simple reaction collector 69 | 70 | To use in multiple actions, react and then trigger one function to do things. 71 | 72 | ![Question Gif](./assets/reactQuestion.gif) 73 | 74 | ## Simple boolean reaction collector 75 | 76 | To use in `if` statements, the asynchronous reaction collector returning Promise is more practical 77 | 78 | ![Question Gif](./assets/reactYesNoQuestion.gif) 79 | 80 | ## Embeds pagination 81 | Example [here](./examples/reaction-collector/paginator.js) 82 | 83 | Easier paginator embeds, with back/skip reaction to change current page. 84 | 85 | ![Question Gif](./assets/reactPaginator.gif) 86 | 87 | You can find this code example [here](./examples/reaction-collector/paginator.js) 88 | 89 | ## Simple messages collector 90 | 91 | Await for messages from user, and when it's send will fire a trigger to do things. See exemple [here] 92 | 93 | You can find this code example [here](./examples/message-collector/question.js) 94 | 95 | ![Question Gif](./assets/messageQuestion.gif) 96 | 97 | ## Async message collector 98 | 99 | Await for message from user, and when user send, will return user message as Promise. 100 | 101 | ![Question Gif](./assets/messageAsyncQuestion.gif) 102 | 103 | ```js 104 | const { MessageCollector } = require("discord.js-collector"); 105 | 106 | const botMessage = await message.channel.send("Awaiting a message"); 107 | const userMessage = await MessageCollector.asyncQuestion({ 108 | botMessage, 109 | user: message.author.id, 110 | }); 111 | if (userMessage.content === "ping") { 112 | await message.channel.send("pong!"); 113 | } 114 | ``` 115 | -------------------------------------------------------------------------------- /assets/messageAsyncQuestion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/messageAsyncQuestion.gif -------------------------------------------------------------------------------- /assets/messageQuestion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/messageQuestion.gif -------------------------------------------------------------------------------- /assets/reactMenu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/reactMenu.gif -------------------------------------------------------------------------------- /assets/reactPaginator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/reactPaginator.gif -------------------------------------------------------------------------------- /assets/reactQuestion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/reactQuestion.gif -------------------------------------------------------------------------------- /assets/reactYesNoQuestion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/reactYesNoQuestion.gif -------------------------------------------------------------------------------- /assets/reactionRoles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/assets/reactionRoles.gif -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.7.9/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/reaction-role_constants.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | reaction-role/constants.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

reaction-role/constants.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
/**
43 |  * Reaction role manager events.
44 |  * @typedef {Object} REACTIONROLE_EVENT
45 |  * @property {string} REACTION_ROLE_ADD='reactionRoleAdd' - Triggered when a member won some role.
46 |  * @property {string} REACTION_ROLE_REMOVE='reactionRoleRemove' - Triggered when a member lost some role.
47 |  * @property {string} ALL_REACTIONS_REMOVE='allReactionsRemove' - Triggered when all reactions from message was removed.
48 |  * @property {string} MISSING_REQUIREMENTS='missingRequirements' - Triggered when a member hasn't all requirements to win some role.
49 |  * @property {string} READY='ready' - Triggered when reation role manager is ready.
50 |  * @readonly
51 |  */
52 | const REACTIONROLE_EVENT = Object.freeze({
53 |     REACTION_ROLE_ADD: 'reactionRoleAdd',
54 |     REACTION_ROLE_REMOVE: 'reactionRoleRemove',
55 |     ALL_REACTIONS_REMOVE: 'allReactionsRemove',
56 |     MISSING_REQUIREMENTS: 'missingRequirements',
57 |     READY: 'ready'
58 | });
59 | 
60 | /**
61 |  * Requirement type to win some role.
62 |  * @typedef {Object} REQUIREMENT_TYPE
63 |  * @property {string} BOOST - Need be a booster to win this role.
64 |  * @property {string} VERIFIED_DEVELOPER - Need be a verified developer to win this role.
65 |  * @readonly
66 |  */
67 | const REQUIREMENT_TYPE = Object.freeze({
68 |     BOOST: 'BOOST',
69 |     VERIFIED_DEVELOPER: 'VERIFIED_DEVELOPER',
70 | });
71 | 
72 | 
73 | module.exports = {
74 |     REQUIREMENT_TYPE,
75 |     REACTIONROLE_EVENT,
76 | };
77 | 
78 |
79 |
80 | 81 | 82 | 83 | 84 |
85 | 86 |
87 | 88 |
89 | Generated by JSDoc 3.6.6 on Thu Nov 26 2020 22:27:08 GMT-0200 (GMT-02:00) using the Minami theme. 90 |
91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/util_constants.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/constants.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/constants.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |

 43 | /**
 44 |  * Constants values
 45 |  */
 46 | class Constants {
 47 |     /**
 48 |      * @constant {string[]}
 49 |      * @default ['✅', '❌']
 50 |      */
 51 |     static DEFAULT_YES_NO_REACTIONS = ['✅', '❌'];
 52 |     /**
 53 |      * @constant {number}
 54 |      * @default 30000
 55 |      */
 56 |     static DEFAULT_COLLECTOR_TIME = 30000;
 57 |     /**
 58 |      * @constant {number}
 59 |      * @default 1
 60 |      */
 61 |     static DEFAULT_COLLECTOR_MAX_REACT = 1;
 62 |     /**
 63 |      * @constant {number}
 64 |      * @default Infinity
 65 |      */
 66 |     static DEFAULT_PAGINATOR_MAX_REACT = Infinity;
 67 |     /**
 68 |      * @constant {object}
 69 |      */
 70 |     static DEFAULT_PAGINATOR_REACTIONS_MAP = {
 71 |         '⏮️': async (_reaction, _collector, botMessage, pages) => {
 72 |             pages.index = 0;
 73 |             await botMessage.edit({ embed: pages[pages.index] });
 74 |         },
 75 |         '⏪': async (_reaction, _collector, botMessage, pages) => {
 76 |             pages.index--;
 77 |             if (pages.index <= 0) pages.index = 0;
 78 |             await botMessage.edit({ embed: pages[pages.index] });
 79 |         },
 80 |         '⏹️': async (_reaction, collector, _botMessage, _pages) => {
 81 |             collector.stop();
 82 |         },
 83 |         '⏩': async (_reaction, _collector, botMessage, pages) => {
 84 |             pages.index++;
 85 |             if (pages.index >= pages.length) pages.index = pages.length - 1;
 86 |             await botMessage.edit({ embed: pages[pages.index] });
 87 |         },
 88 |         '⏭️': async (_reaction, _collector, botMessage, pages) => {
 89 |             pages.index = pages.length - 1;
 90 |             await botMessage.edit({ embed: pages[pages.index] });
 91 |         },
 92 |     };
 93 |     /**
 94 |      * @constant {Funcion}
 95 |      * @default true
 96 |      */
 97 |     static DEFAULT_RETURN_FUNCTION = () => {
 98 |         return true;
 99 |     };
100 |     /**
101 |      * @constant {object}
102 |      */
103 |     static DEFAULT_YES_NO_MAP = {
104 |         '✅': () => {
105 |             return true;
106 |         },
107 |         '❌': () => {
108 |             return true;
109 |         },
110 |     };
111 |     /**
112 |      * @constant {number}
113 |      * @default 1500
114 |      */
115 |     static DEFAULT_TIMEOUT_TOGGLED_ROLES = 1500;
116 | }
117 | 
118 | module.exports = Constants;
119 | 
120 |
121 |
122 | 123 | 124 | 125 | 126 |
127 | 128 |
129 | 130 |
131 | Generated by JSDoc 3.6.6 on Thu Nov 26 2020 22:27:08 GMT-0200 (GMT-02:00) using the Minami theme. 132 |
133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.7.9/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Thu Nov 26 2020 22:27:08 GMT-0200 (GMT-02:00) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.0/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.0/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Tue Dec 08 2020 11:29:49 GMT-0300 (Horário Padrão de Brasília) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.1/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.1/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Tue Dec 08 2020 15:05:25 GMT-0300 (Horário Padrão de Brasília) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.2/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.2/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Fri Dec 11 2020 14:01:59 GMT-0300 (Horário Padrão de Brasília) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.3/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.3/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Thu Dec 17 2020 11:27:31 GMT-0300 (Horário Padrão de Brasília) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/discord.js-collector/1.8.4/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/discord.js-collector/1.8.4/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Thu Dec 24 2020 16:03:21 GMT-0200 (GMT-02:00) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IDjinn/Discord.js-Collector/e12bf707049128f48a14cc04de544d09e5149990/docs/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /docs/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/styles/prettify-jsdoc.css: -------------------------------------------------------------------------------- 1 | /* JSDoc prettify.js theme */ 2 | 3 | /* plain text */ 4 | .pln { 5 | color: #000000; 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | 17 | /* a keyword */ 18 | .kwd { 19 | color: #000000; 20 | font-weight: bold; 21 | font-style: normal; 22 | } 23 | 24 | /* a comment */ 25 | .com { 26 | font-weight: normal; 27 | font-style: italic; 28 | } 29 | 30 | /* a type name */ 31 | .typ { 32 | color: #000000; 33 | font-weight: normal; 34 | font-style: normal; 35 | } 36 | 37 | /* a literal value */ 38 | .lit { 39 | color: #006400; 40 | font-weight: normal; 41 | font-style: normal; 42 | } 43 | 44 | /* punctuation */ 45 | .pun { 46 | color: #000000; 47 | font-weight: bold; 48 | font-style: normal; 49 | } 50 | 51 | /* lisp open bracket */ 52 | .opn { 53 | color: #000000; 54 | font-weight: bold; 55 | font-style: normal; 56 | } 57 | 58 | /* lisp close bracket */ 59 | .clo { 60 | color: #000000; 61 | font-weight: bold; 62 | font-style: normal; 63 | } 64 | 65 | /* a markup tag name */ 66 | .tag { 67 | color: #006400; 68 | font-weight: normal; 69 | font-style: normal; 70 | } 71 | 72 | /* a markup attribute name */ 73 | .atn { 74 | color: #006400; 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | 79 | /* a markup attribute value */ 80 | .atv { 81 | color: #006400; 82 | font-weight: normal; 83 | font-style: normal; 84 | } 85 | 86 | /* a declaration */ 87 | .dec { 88 | color: #000000; 89 | font-weight: bold; 90 | font-style: normal; 91 | } 92 | 93 | /* a variable name */ 94 | .var { 95 | color: #000000; 96 | font-weight: normal; 97 | font-style: normal; 98 | } 99 | 100 | /* a function name */ 101 | .fun { 102 | color: #000000; 103 | font-weight: bold; 104 | font-style: normal; 105 | } 106 | 107 | /* Specify class=linenums on a pre to get line numbering */ 108 | ol.linenums { 109 | margin-top: 0; 110 | margin-bottom: 0; 111 | } 112 | -------------------------------------------------------------------------------- /docs/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: hsl(104, 100%, 24%); } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: hsl(240, 100%, 50%); } 17 | 18 | /* a comment */ 19 | .com { 20 | color: hsl(0, 0%, 60%); } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: hsl(240, 100%, 32%); } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: hsl(240, 100%, 40%); } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #000000; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #000000; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #000000; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Consolas, Monaco, 'Andale Mono', monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/util_find.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | util/find.js - Documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 29 | 30 |
31 | 32 |

util/find.js

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
42 |
const { isArray } = require('util');
 43 | /**
 44 |  * Find recursively something inside a object
 45 |  * @param {options} options
 46 |  * @param {object} options.obj - Object to search a item inside it.
 47 |  * @param {object} options.key - Item key name to find.
 48 |  * @param {string|number} [options.value=null] - Value item to find.
 49 |  * @param {string} [options.type='array'] - Type of value to find.
 50 |  * @param {any[]} [options.result=[]] - Array with all results founded.
 51 |  * @return {any[]} All results founded.
 52 |  */
 53 | function findRecursively({
 54 |     obj,
 55 |     key,
 56 |     value = null,
 57 |     // eslint-disable-next-line no-bitwise
 58 |     type = 'array' | 'value' | 'object',
 59 |     result = [],
 60 | }) {
 61 |     // eslint-disable-next-line no-restricted-syntax
 62 |     for (const k in obj) {
 63 |         if (obj[k] instanceof Object) {
 64 |             findRecursively({
 65 |                 obj: obj[k],
 66 |                 key,
 67 |                 type,
 68 |                 result,
 69 |                 value,
 70 |             });
 71 |         }
 72 |     }
 73 |     if (obj && obj[key]) {
 74 |         if (type === 'array' && isArray(obj[key])) result.push(...obj[key]);
 75 |         else if (type === 'object') {
 76 |             if (!value || obj[key] === value) result.push(obj);
 77 |         } else result.push(obj[key]);
 78 |     }
 79 |     return result;
 80 | }
 81 | 
 82 | module.exports = {
 83 |     findRecursively,
 84 | };
 85 | 
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 | 94 |
95 | 96 |
97 | Generated by JSDoc 3.6.6 on Thu Dec 24 2020 16:02:59 GMT-0200 (GMT-02:00) using the Minami theme. 98 |
99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /examples/message-collector/question.js: -------------------------------------------------------------------------------- 1 | 2 | const { MessageCollector } = require("discord.js-collector"); 3 | 4 | const { Client } = require("discord.js"); 5 | const client = new Client(); 6 | client.on("ready", () => { 7 | console.log("ready"); 8 | }); 9 | 10 | client.on("message", async (message) => { 11 | if (message.content.startsWith('>question')) { 12 | const botMessage = await message.channel.send("Awaiting a message"); 13 | MessageCollector.question({ 14 | botMessage, 15 | user: message.author.id, 16 | onMessage: async (botMessage, message) => { // Every message sent by user will trigger this function. 17 | await message.delete(); 18 | await botMessage.channel.send(`Your message: '${message.content}'`); 19 | } 20 | }); 21 | } 22 | }); 23 | 24 | client.login("Token"); -------------------------------------------------------------------------------- /examples/reaction-collector/menu.js: -------------------------------------------------------------------------------- 1 | const { ReactionCollector } = require('discord.js-collector') 2 | const { Client, MessageEmbed } = require("discord.js"); 3 | const client = new Client(); 4 | client.on("ready", () => { 5 | console.log("ready"); 6 | }); 7 | 8 | const pages = { 9 | '📥': { 10 | embed: { 11 | title: 'Welcome Join Config', 12 | description: `React below embed to configure channel or message of welcome settings.\n\n📜 Channel settings\n📢 Message settings`, 13 | }, 14 | reactions: ['📜', '📢'], 15 | pages: { 16 | '📜': { 17 | backEmoji: '🔙', 18 | embed: { 19 | description: 'Please mention or use channel id to set as welcome channel.' 20 | }, 21 | onMessage: async (controller, message) => { 22 | const channel = message.mentions.channels.first() || message.guild.channels.cache.get(message.content); 23 | if (!channel) 24 | return message.reply('🚫 | You\'ve forgot mention a channel or use their id.').then((m) => m.delete({ timeout: 3000 })); 25 | 26 | // Do what you want here, like set it on database... 27 | return await message.reply(`✅ | Success! You've settled welcome channel as ${channel}.`).then(m => m.delete({ timeout: 3000 })); 28 | } 29 | }, 30 | '📢': { 31 | backEmoji: '🔙', 32 | embed: { 33 | description: 'Make the message used when a member join in the server.', 34 | }, 35 | onMessage: async (controller, message) => { 36 | // Do what you want here, like set it on database.. 37 | return await message.reply('✅ | Success!').then(m => m.delete({ timeout: 3000 })); 38 | } 39 | } 40 | } 41 | }, 42 | }; 43 | 44 | client.on("message", async (message) => { 45 | if (message.content.startsWith('>config')) { 46 | const embed = new MessageEmbed() 47 | .setTitle('Server Settings') 48 | .setDescription('React below to configure modules in this server.\n\n📥 Welcome module') 49 | const botMessage = await message.reply(embed); 50 | ReactionCollector.menu({ botMessage, user: message.author, pages }); 51 | } 52 | }); 53 | 54 | client.login("Token"); -------------------------------------------------------------------------------- /examples/reaction-collector/paginator.js: -------------------------------------------------------------------------------- 1 | const { ReactionCollector } = require('discord.js-collector') 2 | const { Client, MessageEmbed } = require("discord.js"); 3 | const client = new Client(); 4 | client.on("ready", () => { 5 | console.log("ready"); 6 | }); 7 | 8 | // Paginate embeds, util for music queue list, simple lists like warn-list and etc. 9 | client.on("message", async (message) => { 10 | if (message.content.startsWith('>help')) { 11 | const botMessage = await message.reply('Need help? Here list with all my commands!'); 12 | ReactionCollector.paginator({ 13 | botMessage, 14 | user: message.author, 15 | pages: [ 16 | new MessageEmbed() 17 | .setTitle('Moderation') 18 | .addField('Kick', 'Kick one member from the server') 19 | .addField('Ban', 'Ban one member from server') 20 | .addField('Mute', 'Remove permissions from member to talk in chats while is muted') 21 | .addField('Clear', 'Clear messages from text channel'), 22 | new MessageEmbed() 23 | .setTitle('Util') 24 | .addField('Ping', 'Bot ping latency') 25 | .addField('Botinfo', 'Ban one member from server') 26 | .addField('Avatar', 'Show a user avatar'), 27 | new MessageEmbed() 28 | .setTitle('Economy') 29 | .addField('Daily', 'Pick up daily reward') 30 | .addField('Pay', 'Pay some amount to other user'), 31 | new MessageEmbed() 32 | .setTitle('Administration') 33 | .addField('Autorole', 'Configure autorole in this server') 34 | .addField('Prefix', 'Change bot prefix') 35 | ], 36 | collectorOptions: { 37 | time: 60000 38 | } 39 | }); 40 | } 41 | }); 42 | 43 | client.login('Token'); -------------------------------------------------------------------------------- /examples/reaction-collector/question.js: -------------------------------------------------------------------------------- 1 | const { ReactionCollector } = require('discord.js-collector') 2 | const { Client } = require("discord.js"); 3 | const client = new Client(); 4 | client.on("ready", () => { 5 | console.log("ready"); 6 | }); 7 | 8 | // You can create easily yes/no questions to run funcions 9 | client.on("message", async (message) => { 10 | if (message.content.startsWith('>delete-channel')) { 11 | const botMessage = await message.reply('Are you sure? This action canno\'t be undo!'); 12 | ReactionCollector.question({ 13 | botMessage, 14 | user: message.author, 15 | reactions: { 16 | '✅': async () => await message.channel.delete(), 17 | '❌': async () => await message.reply('Ok, operation cancelled!'), 18 | } 19 | }); 20 | } 21 | }); 22 | 23 | // Or you can create choises to execute when user pick his choise 24 | client.on("message", async (message) => { 25 | if (message.content.startsWith('>poll')) { 26 | const botMessage = await message.reply('Some question to create poll here'); 27 | ReactionCollector.question({ 28 | botMessage, 29 | user: message.author, 30 | reactions: { 31 | '👍': async (reaction) => await message.react(reaction.emoji.name), // Your custom function here. 32 | '👎': async (reaction) => await message.react(reaction.emoji.name), 33 | '🕒': async (reaction) => await message.react(reaction.emoji.name) 34 | } 35 | }); 36 | } 37 | }); 38 | 39 | client.login("Token"); -------------------------------------------------------------------------------- /examples/reaction-collector/yesNoQuestion.js: -------------------------------------------------------------------------------- 1 | const { ReactionCollector } = require('discord.js-collector'); 2 | const { Client } = require("discord.js"); 3 | const client = new Client(); 4 | client.on("ready", () => { 5 | console.log("ready"); 6 | }); 7 | 8 | // You can create easily yes/no questions to run funcions 9 | client.on("message", async (message) => { 10 | if (message.content.startsWith('>delete-channel')) { 11 | const botMessage = await message.reply('Are you sure? This action canno\'t be undo!'); 12 | if (await ReactionCollector.yesNoQuestion({ botMessage, user: message.author })) { 13 | await message.channel.delete(); 14 | await message.reply('Done!'); 15 | } 16 | else { 17 | await message.reply('Ok, operation cancelled!'); 18 | } 19 | } 20 | }); 21 | 22 | client.login("Token"); -------------------------------------------------------------------------------- /examples/reaction-role-manager/Note.md: -------------------------------------------------------------------------------- 1 | # Reaction Roles 2 | 3 | If you want use mongo db to storage reaction roles, you need do some steps. 4 | 5 | ## Configure mongoose 6 | 7 | You will need only mongo database link to connect. The link is something like that: 8 | 9 | `mongodb+srv://:@cluster0.hzu4f.gcp.mongodb.net/` 10 | 11 | ## Setup Reaction Role with mongoose 12 | 13 | ```js 14 | const reactionRoleManager = new ReactionRoleManager(client, { 15 | storage: true, 16 | mongoDbLink: 'your mongoose url here' 17 | }); 18 | ``` 19 | 20 | Check basic example [here](./basic.js) -------------------------------------------------------------------------------- /examples/reaction-role-manager/basic.js: -------------------------------------------------------------------------------- 1 | const { ReactionRoleManager } = require('discord.js-collector') 2 | const { Client } = require("discord.js"); 3 | const client = new Client(); 4 | 5 | const reactionRoleManager = new ReactionRoleManager(client, { 6 | storage: true, // Enable reaction role store in a Json file 7 | path: __dirname + '/roles.json', // Where will save the roles if store is enabled 8 | mongoDbLink: 'url mongoose link' // See here to see how setup mongoose: https://github.com/IDjinn/Discord.js-Collector/blob/master/examples/reaction-role-manager/Note.md 9 | }); 10 | 11 | client.on("ready", () => { 12 | console.log("ready") 13 | }); 14 | 15 | // When is ready, reation role manager will emit this event 16 | reactionRoleManager.on('ready', () => { 17 | console.log('Reaction Role Manager is ready!'); 18 | }); 19 | 20 | // When user react and win role, will trigger this event 21 | reactionRoleManager.on('reactionRoleAdd', (member, role) => { 22 | console.log(member.displayName + ' won the role' + role.name) 23 | }); 24 | 25 | // When user remove reaction and lose role, will trigger this event 26 | reactionRoleManager.on('reactionRoleRemove', (member, role) => { 27 | console.log(member.displayName + ' lose the role' + role.name) 28 | }); 29 | 30 | // When someone removed all reactions from message 31 | reactionRoleManager.on('allReactionsRemove', (message) => { 32 | console.log(`All reactions from message ${message.id} was removed, all roles was taken and reactions roles deleted.`) 33 | }); 34 | 35 | // If member doesn't have all requirements, this event is triggered. 36 | reactionRoleManager.on('missingRequirements', (type, member, reactionRole) => { 37 | console.log(`Member '${member.id}' will not win role '${reactionRole.role}', because him hasn't requirement ${type}`); 38 | }); 39 | 40 | // Triggered when the bot doesn't have permissions to manage this role. 41 | reactionRoleManager.on('missingPermissions', (action, member, roles, reactionRole) => { 42 | console.log(`Some roles cannot be ${action === 1 ? 'given' : 'taken'} to member \`${member.displayName}\`, because i don't have permissions to manage these roles: ${roles.map(role => `\`${role.name}\``).join(',')}`); 43 | }); 44 | 45 | client.on("message", async (message) => { 46 | const client = message.client; 47 | const args = message.content.split(' ').slice(1); 48 | // Example 49 | // >createReactionRole @role :emoji: MessageId 50 | if (message.content.startsWith('>createReactionRole')) { 51 | const role = message.mentions.roles.first(); 52 | if (!role) 53 | return message.reply('You need mention a role').then(m => m.delete({ timeout: 1000 })); 54 | 55 | const emoji = args[1]; 56 | if (!emoji) 57 | return message.reply('You need use a valid emoji.').then(m => m.delete({ timeout: 1000 })); 58 | 59 | const msg = await message.channel.messages.fetch(args[2] || message.id); 60 | if (!role) 61 | return message.reply('Message not found! Wtf...').then(m => m.delete({ timeout: 1000 })); 62 | 63 | reactionRoleManager.createReactionRole({ 64 | message: msg, 65 | roles: [role], 66 | emoji, 67 | type:1 68 | }); 69 | /** 70 | * Reaction Role Type 71 | * NORMAL [1] - This role works like basic reaction role. 72 | * TOGGLE [2] - You can win only one role of all toggle roles in this message (like colors system) 73 | * JUST_WIN [3] - This role you'll only win, not lose. 74 | * JUST_LOSE [4] - This role you'll only lose, not win. 75 | * REVERSED [5] - This is reversed role. When react, you'll lose it, when you take off reaction you'll win it. 76 | */ 77 | 78 | 79 | message.reply('Done').then(m => m.delete({ timeout: 500 })); 80 | } 81 | else if (message.content.startsWith('>deleteReactionRole')){ 82 | const emoji = args[0]; 83 | if (!emoji) 84 | return message.reply('You need use a valid emoji.').then(m => m.delete({ timeout: 1000 })); 85 | 86 | const msg = await message.channel.messages.fetch(args[1]); 87 | if (!msg) 88 | return message.reply('Message not found! Wtf...').then(m => m.delete({ timeout: 1000 })); 89 | 90 | await reactionRoleManager.deleteReactionRole({message: msg, emoji}); 91 | } 92 | }); 93 | 94 | client.login("Token"); 95 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "discord.js-collector", 3 | "description": "Library to easily create message collector and reactions on discord, with customization ways", 4 | "version": "1.8.7", 5 | "main": "src/index.js", 6 | "license": "GPL-3.0", 7 | "types": "./typings/index.d.ts", 8 | "scripts": { 9 | "start": "nodemon --ignore **/*.json tests/rr.js", 10 | "test": "npm run lint", 11 | "test:typescript": "tsc", 12 | "docs": "jsdoc --configure .jsdoc.json --verbose", 13 | "lint": "eslint src", 14 | "lint:fix": "eslint src --fix" 15 | }, 16 | "dependencies": { 17 | "async-lock": "^1.2.4", 18 | "discord.js": "^12.3.1", 19 | "mongoose": "^5.10.7", 20 | "mquery": ">=3.2.3" 21 | }, 22 | "devDependencies": { 23 | "@types/axios": "^0.14.0", 24 | "@types/node": "^14.14.10", 25 | "axios": "^0.21.0", 26 | "chai": "^4.2.0", 27 | "dotenv": "^8.2.0", 28 | "eslint": "^7.10.0", 29 | "eslint-config-airbnb-base": "^14.2.0", 30 | "eslint-plugin-import": "^2.22.1", 31 | "express": "^4.17.1", 32 | "jsdoc": "^3.6.6", 33 | "jsdoc-baseline": "^0.1.5", 34 | "minami": "^1.2.3", 35 | "nodemon": "^2.0.6" 36 | }, 37 | "homepage": "https://github.com/IDjinn/Discord.js-Collector", 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/IDjinn/Discord.js-Collector" 41 | }, 42 | "keywords": [ 43 | "discord", 44 | "discord.js", 45 | "discordjs", 46 | "message collector", 47 | "message-collector", 48 | "messages-collector", 49 | "messages collector", 50 | "reaction role", 51 | "reaction roles", 52 | "color roles", 53 | "captcha roles", 54 | "reaction collector", 55 | "reaction-collector", 56 | "reaction menu", 57 | "embed menu", 58 | "discord paginator", 59 | "reaction role toggle", 60 | "reaction roles" 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /src/collectors/collectorManager.js: -------------------------------------------------------------------------------- 1 | const { Collection,Client } = require("discord.js") 2 | 3 | module.exports = class CollectorManager { 4 | constructor(client) { 5 | /** 6 | * @type {Collection} 7 | */ 8 | __collectors = new Collection(); 9 | /** 10 | * @type {Client} 11 | */ 12 | this.client = client; 13 | 14 | client.on('message',message => {}); 15 | client.on('messageReactionAdd',handleMessageEvent.bind(this)); 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/collectors/messageCollector.js: -------------------------------------------------------------------------------- 1 | const { 2 | Message, 3 | MessageCollectorOptions, 4 | UserResolvable, 5 | } = require('discord.js'); 6 | const { validateOptions } = require('../util/validate'); 7 | 8 | /** 9 | * Message Collector class 10 | */ 11 | class MessageCollector { 12 | /** 13 | * @description This method create easier message collector, then collected, will execute your custom function. 14 | * @param {Object} options 15 | * @param {Message} options.botMessage - Message sent from bot. 16 | * @param {UserResolvable} options.user - UserResolvable who will react. 17 | * @param {MessageCollectorOptions} [options.collectorOptions=null] - Message collector options 18 | * @param {Funciton} [options.onMessage] - Triggered when user sent a message 19 | * @param {boolean} [options.deleteMessage=true] - Message sent from bot. 20 | * @note Trigger when user sent a message must be like onMessage(botMessage, message) => {}; 21 | * @returns {void} 22 | */ 23 | static question(options) { 24 | return this.__createMessageCollector( 25 | validateOptions(options, 'messageQuestion'), 26 | ); 27 | } 28 | 29 | /** 30 | * @description This method create easier message collector returning Promise when collected. 31 | * @param {Object} options 32 | * @param {Message} options.botMessage - Message sent from bot. 33 | * @param {UserResolvable} options.user - UserResolvable who will react. 34 | * @param {MessageCollectorOptions} [options.collectorOptions=null] - Message collector options 35 | * @param {boolean} [options.deleteMessage=true] - Delete user message. 36 | * @returns {Promise} 37 | */ 38 | static asyncQuestion(options) { 39 | return this.__createAsyncMessageCollector( 40 | validateOptions(options, 'messageAsyncQuestion'), 41 | ); 42 | } 43 | 44 | /** 45 | * Internal method, do not use. 46 | * @private 47 | */ 48 | static __createMessageCollector(_options) { 49 | const { 50 | botMessage, 51 | user, 52 | collectorOptions, 53 | onMessage, 54 | deleteMessage, 55 | } = _options; 56 | const filter = (message) => message.author.id === user.id && !message.author.bot; 57 | const collector = botMessage.channel.createMessageCollector( 58 | filter, 59 | collectorOptions, 60 | ); 61 | collector.on('collect', async (message) => { 62 | if (deleteMessage) await message.delete(); 63 | await onMessage(botMessage, message); 64 | }); 65 | return collector; 66 | } 67 | 68 | /** 69 | * Internal method, do not use. 70 | * @private 71 | */ 72 | static async __createAsyncMessageCollector(_options) { 73 | return new Promise(async (resolve, reject) => { 74 | const { 75 | botMessage, 76 | user, 77 | collectorOptions, 78 | deleteMessage, 79 | } = _options; 80 | const filter = (message) => message.author.id === user.id && !message.author.bot; 81 | const caughtMessages = await botMessage.channel.awaitMessages( 82 | filter, 83 | collectorOptions, 84 | ); 85 | if (caughtMessages.size > 0) { 86 | const message = caughtMessages.first(); 87 | if (deleteMessage) await message.delete(); 88 | return resolve(message); 89 | } 90 | // eslint-disable-next-line prefer-promise-reject-errors 91 | return reject(false); 92 | }); 93 | } 94 | } 95 | 96 | module.exports = { 97 | MessageCollector, 98 | }; 99 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ReactionCollector: require('./collectors/reactionCollector.js').ReactionCollector, 3 | ReactionController: require('./collectors/reactionCollector.js').Controller, 4 | MessageCollector: require('./collectors/messageCollector.js').MessageCollector, 5 | ReactionRoleManager: require('./reaction-role/manager.js').ReactionRoleManager, 6 | ReactionRole: require('./reaction-role/reactionRole.js').ReactionRole, 7 | ReactionRoleEvent: require('./reaction-role/constants.js').ReactionRoleEvent, 8 | ReactionRoleType: require('./reaction-role/constants.js').ReactionRoleType, 9 | RequirementType: require('./reaction-role/constants.js').RequirementType, 10 | ActionType: require('./reaction-role/constants.js').ActionType, 11 | findRecursively: require('./util/find').findRecursively, 12 | }; 13 | -------------------------------------------------------------------------------- /src/reaction-role/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Reaction role manager events. 3 | * @typedef {Object} ReactionRoleEvent 4 | * @property {string} REACTION_ROLE_ADD='reactionRoleAdd' - Triggered when a member won some role. 5 | * @property {string} REACTION_ROLE_REMOVE='reactionRoleRemove' - Triggered when a member lost some role. 6 | * @property {string} ALL_REACTIONS_REMOVE='allReactionsRemove' - Triggered when all reactions from message was removed. 7 | * @property {string} MISSING_REQUIREMENTS='missingRequirements' - Triggered when a member hasn't all requirements to win some role. 8 | * @property {string} MISSING_PERMISSIONS='missingPermissions' - Triggered when the bot doesn't have permissions to manage this role. 9 | * @property {string} DEBUG='debug' - Triggered for debug messages. 10 | * @property {string} READY='ready' - Triggered when reation role manager is ready. 11 | * @readonly 12 | */ 13 | const ReactionRoleEvent = Object.freeze({ 14 | REACTION_ROLE_ADD: 'reactionRoleAdd', 15 | REACTION_ROLE_REMOVE: 'reactionRoleRemove', 16 | ALL_REACTIONS_REMOVE: 'allReactionsRemove', 17 | MISSING_REQUIREMENTS: 'missingRequirements', 18 | MISSING_PERMISSIONS: 'missingPermissions', 19 | DEBUG: 'debug', 20 | READY: 'ready' 21 | }); 22 | 23 | /** 24 | * Requirement type to win some role. 25 | * @typedef {Object} RequirementType 26 | * @property {number} [UNKNOWN=0] 27 | * @property {number} [BOOST=1] - Need be a booster to win this role. 28 | * @property {number} [VERIFIED_DEVELOPER=2] - Need be a verified developer to win this role. 29 | * @property {number} [PERMISSION=3] - Need has some permissions to win this role. 30 | * @property {number} [ROLES=4] - Need has all allow listed roles and hasn't all denied listed roles. 31 | * @property {number} [USERS=5] - Need be inluded in allow list and not included in deny list to win this role. 32 | * @readonly 33 | */ 34 | const RequirementType = Object.freeze({ 35 | UNKNOWN: 0, 36 | BOOST: 1, 37 | VERIFIED_DEVELOPER: 2, 38 | PERMISSION: 3, 39 | ROLES: 4, 40 | USERS: 5, 41 | }); 42 | 43 | /** 44 | * Reaction Role Type 45 | * @typedef {object} ReactionRoleType 46 | * @property {number} NORMAL - This role works like basic reaction role. 47 | * @property {number} TOGGLE - You can win only one role of all toggle roles in this message (like colors system) 48 | * @property {number} JUST_WIN - This role you'll only win, not lose. 49 | * @property {number} JUST_LOSE - This role you'll only lose, not win. 50 | * @property {number} REVERSED - This is reversed role. When react, you'll lose it, when you take off reaction you'll win it. 51 | * @readonly 52 | */ 53 | const ReactionRoleType = Object.freeze({ 54 | UNKNOWN: 0, 55 | NORMAL: 1, 56 | TOGGLE: 2, 57 | JUST_WIN: 3, 58 | JUST_LOSE: 4, 59 | REVERSED: 5 60 | }); 61 | 62 | /** 63 | * Reaction action Type 64 | * @typedef {object} ActionType 65 | * @property {number} UNKNOWN - Unknown type of this reaction action. 66 | * @property {number} GIVE - The member will win some reaction role. 67 | * @property {number} TAKE - The member will lose some reaction role. 68 | * @readonly 69 | */ 70 | const ActionType = Object.freeze({ 71 | UNKNOWN: 0, 72 | GIVE: 1, 73 | TAKE: 2 74 | }); 75 | 76 | /** 77 | * Check if a number is valid reaction role type. 78 | * @param {ReactionRoleType} number - Type of reaction role to check if it's valid. 79 | * @return {boolean} 80 | */ 81 | const isValidReactionRoleType = (number) => !isNaN(number) && (number >= ReactionRoleType.NORMAL && number <= ReactionRoleType.REVERSED); 82 | 83 | module.exports = { 84 | RequirementType, 85 | ReactionRoleEvent, 86 | ReactionRoleType, 87 | ActionType, 88 | isValidReactionRoleType, 89 | }; 90 | -------------------------------------------------------------------------------- /src/util/constants.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Constants values 4 | */ 5 | class Constants { 6 | /** 7 | * @constant {string[]} 8 | * @default ['✅', '❌'] 9 | */ 10 | static DEFAULT_YES_NO_REACTIONS = ['✅', '❌']; 11 | /** 12 | * @constant {number} 13 | * @default 30000 14 | */ 15 | static DEFAULT_COLLECTOR_TIME = 30000; 16 | /** 17 | * @constant {number} 18 | * @default 1 19 | */ 20 | static DEFAULT_COLLECTOR_MAX_REACT = 1; 21 | /** 22 | * @constant {number} 23 | * @default Infinity 24 | */ 25 | static DEFAULT_PAGINATOR_MAX_REACT = Infinity; 26 | /** 27 | * @constant {object} 28 | */ 29 | static DEFAULT_PAGINATOR_REACTIONS_MAP = { 30 | '⏮️': async (_reaction, _collector, botMessage, pages) => { 31 | pages.index = 0; 32 | await botMessage.edit({ embed: pages[pages.index] }); 33 | }, 34 | '⏪': async (_reaction, _collector, botMessage, pages) => { 35 | pages.index--; 36 | if (pages.index <= 0) pages.index = 0; 37 | await botMessage.edit({ embed: pages[pages.index] }); 38 | }, 39 | '⏹️': async (_reaction, collector, _botMessage, _pages) => { 40 | collector.stop(); 41 | }, 42 | '⏩': async (_reaction, _collector, botMessage, pages) => { 43 | pages.index++; 44 | if (pages.index >= pages.length) pages.index = pages.length - 1; 45 | await botMessage.edit({ embed: pages[pages.index] }); 46 | }, 47 | '⏭️': async (_reaction, _collector, botMessage, pages) => { 48 | pages.index = pages.length - 1; 49 | await botMessage.edit({ embed: pages[pages.index] }); 50 | }, 51 | }; 52 | /** 53 | * @constant {Funcion} 54 | * @default true 55 | */ 56 | static DEFAULT_RETURN_FUNCTION = () => { 57 | return true; 58 | }; 59 | /** 60 | * @constant {object} 61 | */ 62 | static DEFAULT_YES_NO_MAP = { 63 | '✅': () => { 64 | return true; 65 | }, 66 | '❌': () => { 67 | return true; 68 | }, 69 | }; 70 | /** 71 | * @constant {number} 72 | * @default 1500 73 | */ 74 | static DEFAULT_TIMEOUT_TOGGLED_ROLES = 1500; 75 | } 76 | 77 | module.exports = Constants; 78 | -------------------------------------------------------------------------------- /src/util/find.js: -------------------------------------------------------------------------------- 1 | const { isArray } = require('util'); 2 | /** 3 | * Find recursively something inside a object 4 | * @param {options} options 5 | * @param {object} options.obj - Object to search a item inside it. 6 | * @param {object} options.key - Item key name to find. 7 | * @param {string|number} [options.value=null] - Value item to find. 8 | * @param {string} [options.type='array'] - Type of value to find. 9 | * @param {any[]} [options.result=[]] - Array with all results founded. 10 | * @return {any[]} All results founded. 11 | */ 12 | function findRecursively({ 13 | obj, 14 | key, 15 | value = null, 16 | // eslint-disable-next-line no-bitwise 17 | type = 'array' | 'value' | 'object', 18 | result = [], 19 | }) { 20 | // eslint-disable-next-line no-restricted-syntax 21 | for (const k in obj) { 22 | if (obj[k] instanceof Object) { 23 | findRecursively({ 24 | obj: obj[k], 25 | key, 26 | type, 27 | result, 28 | value, 29 | }); 30 | } 31 | } 32 | if (obj && obj[key]) { 33 | if (type === 'array' && isArray(obj[key])) result.push(...obj[key]); 34 | else if (type === 'object') { 35 | if (!value || obj[key] === value) result.push(obj); 36 | } else result.push(obj[key]); 37 | } 38 | return result; 39 | } 40 | 41 | module.exports = { 42 | findRecursively, 43 | }; 44 | -------------------------------------------------------------------------------- /tests/roles.json: -------------------------------------------------------------------------------- 1 | [{"id":"785880455332364329-%E2%9A%AB","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%E2%9A%AB","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948444228222999"]},{"id":"785880455332364329-%E2%9A%AA","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%E2%9A%AA","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948450377072650"]},{"id":"785880455332364329-%F0%9F%9F%A2","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%9F%A2","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948442810941482"]},{"id":"785880455332364329-%F0%9F%9F%A1","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%9F%A1","winners":["348078250079158274","705580144936484915"],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948453648629761"]},{"id":"785880455332364329-%F0%9F%9F%A0","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%9F%A0","winners":["376460601909706773"],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":["776938900769734656"],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":["ADMINISTRATOR"]},"disabled":false,"type":2,"roles":["776948450939240468"]},{"id":"785880455332364329-%F0%9F%94%B4","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%94%B4","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948449164918784"]},{"id":"785880455332364329-%F0%9F%9F%A3","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%9F%A3","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948447243927563"]},{"id":"785880455332364329-%F0%9F%94%B5","message":"785880455332364329","channel":"785880342690922527","guild":"515688359373438978","emoji":"%F0%9F%94%B5","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":2,"roles":["776948452944773120"]},{"id":"776942288424796170-%E2%98%91%EF%B8%8F","message":"776942288424796170","channel":"776939424591642645","guild":"515688359373438978","emoji":"%E2%98%91%EF%B8%8F","winners":["376460601909706773"],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":3,"roles":["776940603907899393"]},{"id":"556908119406673960-%F0%9F%94%B4","message":"556908119406673960","channel":"529295239106527291","guild":"515688359373438978","emoji":"%F0%9F%94%B4","winners":[],"max":0,"requirements":{"boost":false,"verifiedDeveloper":false,"roles":{"allowList":[],"denyList":[]},"users":{"allowList":[],"denyList":[]},"permissionsNeed":[]},"disabled":false,"type":1,"roles":["776952342964338759"]}] -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ 5 | "strict": true, /* Enable all strict type-checking options. */ 6 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 7 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 8 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 9 | } 10 | } 11 | --------------------------------------------------------------------------------