zumito-framework 1.1.52 → 1.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +8 -1
  2. package/plopfile.js +113 -86
  3. package/readme.md +228 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.1.52",
3
+ "version": "1.1.54",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,6 +16,7 @@
16
16
  "scripts": {
17
17
  "test": "echo \"Error: no test specified\" && exit 1",
18
18
  "build": "tsc",
19
+ "lint": "eslint .",
19
20
  "publish-npm": "npm publish",
20
21
  "docs": "typedoc --out docs src"
21
22
  },
@@ -39,6 +40,12 @@
39
40
  },
40
41
  "devDependencies": {
41
42
  "@types/node": "^18.7.16",
43
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
44
+ "@typescript-eslint/parser": "^5.48.2",
45
+ "eslint": "^8.32.0",
46
+ "eslint-config-prettier": "^8.6.0",
47
+ "eslint-plugin-prettier": "^4.2.1",
48
+ "prettier": "^2.8.3",
42
49
  "typedoc": "^0.23.14",
43
50
  "typescript": "^4.8.3"
44
51
  },
package/plopfile.js CHANGED
@@ -1,89 +1,116 @@
1
1
  module.exports = function (plop) {
2
- plop.setHelper('capitalize', function (text) {
2
+ plop.setHelper('capitalize', function (text) {
3
3
  return text.charAt(0).toUpperCase() + text.slice(1);
4
4
  });
5
- // create your generators here
6
- plop.setGenerator('command', {
7
- description: 'this is a skeleton command file',
8
- prompts: [{
9
- type: 'input',
10
- name: 'module',
11
- message: 'Name of the module',
12
- }, {
13
- type: 'input',
14
- name: 'command',
15
- message: 'Name of the command',
16
- }],
17
- actions: [{
18
- type: 'add',
19
- path: 'src/modules/{{module}}/commands/{{command}}.js',
20
- templateFile: 'plop-templates/command.js.hbs',
21
- }],
22
- });
23
- plop.setGenerator('translation', {
24
- description: 'This generate translation file for a module',
25
- prompts: [{
26
- type: 'input',
27
- name: 'module',
28
- message: 'Name of the module',
29
- }, {
30
- type: 'choice',
31
- name: 'language',
32
- message: 'Language of the translations',
33
- choices: [{
34
- name: 'English',
35
- value: 'en',
36
- }, {
37
- name: 'Spanish',
38
- value: 'es',
39
- }, {
40
- name: 'French',
41
- value: 'fr',
42
- }, {
43
- name: 'German',
44
- value: 'de',
45
- }, {
46
- name: 'Italian',
47
- value: 'it',
48
- }, {
49
- name: 'Portuguese',
50
- value: 'pt',
51
- }, {
52
- name: 'Russian',
53
- value: 'ru',
54
- }, {
55
- name: 'Turkish',
56
- value: 'tr',
57
- }, {
58
- name: 'Chinese',
59
- value: 'zh',
60
- }, {
61
- name: 'Japanese',
62
- value: 'ja',
63
- }, {
64
- name: 'Korean',
65
- value: 'ko',
66
- }, {
67
- name: 'Polish',
68
- value: 'pl',
69
- }, {
70
- name: 'Romanian',
71
- value: 'ro',
72
- }, {
73
- name: 'Russian',
74
- value: 'ru',
75
- }, {
76
- name: 'Ukrainian',
77
- value: 'uk',
78
- }, {
79
- name: 'Vietnamese',
80
- value: 'vi',
81
- }],
82
- }],
83
- actions: [{
84
- type: 'add',
85
- path: 'src/modules/{{module}}/translations/{{language}}.json',
86
- templateFile: 'plop-templates/translation.json.hbs',
87
- }],
88
- });
89
- };
5
+ // create your generators here
6
+ plop.setGenerator('command', {
7
+ description: 'this is a skeleton command file',
8
+ prompts: [
9
+ {
10
+ type: 'input',
11
+ name: 'module',
12
+ message: 'Name of the module',
13
+ },
14
+ {
15
+ type: 'input',
16
+ name: 'command',
17
+ message: 'Name of the command',
18
+ },
19
+ ],
20
+ actions: [
21
+ {
22
+ type: 'add',
23
+ path: 'src/modules/{{module}}/commands/{{command}}.js',
24
+ templateFile: 'plop-templates/command.js.hbs',
25
+ },
26
+ ],
27
+ });
28
+ plop.setGenerator('translation', {
29
+ description: 'This generate translation file for a module',
30
+ prompts: [
31
+ {
32
+ type: 'input',
33
+ name: 'module',
34
+ message: 'Name of the module',
35
+ },
36
+ {
37
+ type: 'choice',
38
+ name: 'language',
39
+ message: 'Language of the translations',
40
+ choices: [
41
+ {
42
+ name: 'English',
43
+ value: 'en',
44
+ },
45
+ {
46
+ name: 'Spanish',
47
+ value: 'es',
48
+ },
49
+ {
50
+ name: 'French',
51
+ value: 'fr',
52
+ },
53
+ {
54
+ name: 'German',
55
+ value: 'de',
56
+ },
57
+ {
58
+ name: 'Italian',
59
+ value: 'it',
60
+ },
61
+ {
62
+ name: 'Portuguese',
63
+ value: 'pt',
64
+ },
65
+ {
66
+ name: 'Russian',
67
+ value: 'ru',
68
+ },
69
+ {
70
+ name: 'Turkish',
71
+ value: 'tr',
72
+ },
73
+ {
74
+ name: 'Chinese',
75
+ value: 'zh',
76
+ },
77
+ {
78
+ name: 'Japanese',
79
+ value: 'ja',
80
+ },
81
+ {
82
+ name: 'Korean',
83
+ value: 'ko',
84
+ },
85
+ {
86
+ name: 'Polish',
87
+ value: 'pl',
88
+ },
89
+ {
90
+ name: 'Romanian',
91
+ value: 'ro',
92
+ },
93
+ {
94
+ name: 'Russian',
95
+ value: 'ru',
96
+ },
97
+ {
98
+ name: 'Ukrainian',
99
+ value: 'uk',
100
+ },
101
+ {
102
+ name: 'Vietnamese',
103
+ value: 'vi',
104
+ },
105
+ ],
106
+ },
107
+ ],
108
+ actions: [
109
+ {
110
+ type: 'add',
111
+ path: 'src/modules/{{module}}/translations/{{language}}.json',
112
+ templateFile: 'plop-templates/translation.json.hbs',
113
+ },
114
+ ],
115
+ });
116
+ };
package/readme.md ADDED
@@ -0,0 +1,228 @@
1
+ <a name="readme-top"></a>
2
+
3
+
4
+ <!-- PROJECT SHIELDS -->
5
+ [![Contributors][contributors-shield]][contributors-url]
6
+ [![Forks][forks-shield]][forks-url]
7
+ [![Stargazers][stars-shield]][stars-url]
8
+ [![Issues][issues-shield]][issues-url]
9
+ [![MIT License][license-shield]][license-url]
10
+
11
+
12
+
13
+ <!-- PROJECT LOGO -->
14
+ <br />
15
+ <div align="center">
16
+ <a href="https://github.com/ZumitoTeam/zumito-framework">
17
+ <img src="https://media.discordapp.net/attachments/964297459327184906/1066399583896342649/d05ce5c0de25fd9afb4f5492f31f21fe.png" alt="Logo" width="80" height="80">
18
+ </a>
19
+
20
+ <h3 align="center">Zumito framework</h3>
21
+
22
+ <p align="center">
23
+ Fast and scalable discord bot framework to jumpstart your projects!
24
+ <br />
25
+ <a href="https://docs.zumito.ga/"><strong>Explore the docs »</strong></a>
26
+ <br />
27
+ <br />
28
+ <a href="https://zumito.ga">View Demo</a>
29
+ ·
30
+ <a href="https://github.com/ZumitoTeam/zumito-framework/issues">Report Bug</a>
31
+ ·
32
+ <a href="https://github.com/ZumitoTeam/zumito-framework/issues">Request Feature</a>
33
+ </p>
34
+ </div>
35
+
36
+
37
+
38
+ <!-- TABLE OF CONTENTS -->
39
+ <details>
40
+ <summary>Table of Contents</summary>
41
+ <ol>
42
+ <li>
43
+ <a href="#about-the-project">About The Project</a>
44
+ <ul>
45
+ <li><a href="#built-with">Built With</a></li>
46
+ </ul>
47
+ </li>
48
+ <li>
49
+ <a href="#getting-started">Getting Started</a>
50
+ <ul>
51
+ <li><a href="#prerequisites">Prerequisites</a></li>
52
+ <li><a href="#installation">Installation</a></li>
53
+ </ul>
54
+ </li>
55
+ <li><a href="#usage">Usage</a></li>
56
+ <li><a href="#roadmap">Roadmap</a></li>
57
+ <li><a href="#contributing">Contributing</a></li>
58
+ <li><a href="#license">License</a></li>
59
+ <li><a href="#contact">Contact</a></li>
60
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
61
+ </ol>
62
+ </details>
63
+
64
+
65
+
66
+ <!-- ABOUT THE PROJECT -->
67
+ ## About The Project
68
+
69
+ Introducing the ultimate framework for building high-quality Discord bots quickly and efficiently. Say goodbye to the tedious task of building a bot from scratch and focus on creating something truly amazing. This framework is designed to implement DRY (Don't Repeat Yourself) principles (like command handler, event handler, etc), allowing you to spend more time creating and less time doing repetitive tasks.
70
+
71
+ With this framework, you can easily create a feature-rich bot that solves a problem and helps others. Whether you're an experienced developer or just getting started, this framework is perfect for anyone looking to build a bot with minimal effort and maximum results.
72
+
73
+ The framework is constantly evolving, with new features and updates being added on a regular basis. You can also suggest changes and contribute to the development of the framework by forking the repo and creating a pull request or opening an issue. Thanks to all the contributors who have helped expand this framework!
74
+
75
+ To get started, simply visit the quickstart guide at [docs.zumito.ga/docs/custom/quickstart](https://docs.zumito.ga/docs/custom/quickstart) and start building your bot today!
76
+
77
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
78
+
79
+
80
+
81
+ ### Built With
82
+
83
+ This section lists the major frameworks and libraries that the framework is built with.
84
+
85
+ * [Node.js](https://nodejs.org/en/)
86
+ * [TypeScript](https://www.typescriptlang.org/)
87
+ * [Discord.js](https://discord.js.org/#/)
88
+ * [MongoDB](https://www.mongodb.com/)
89
+ * [Express](https://expressjs.com/)
90
+ * [Mongoose](https://mongoosejs.com/)
91
+
92
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
93
+
94
+
95
+
96
+ <!-- GETTING STARTED -->
97
+ ## Getting Started
98
+
99
+ This is a guide of how you can set up the project locally to start contributing to the framework.
100
+
101
+ :warning: If you're here to create your own bot, refer to the quickstart guide at [docs.zumito.ga/docs/custom/quickstart](https://docs.zumito.ga/docs/custom/quickstart).
102
+
103
+ ### Prerequisites
104
+
105
+ This is a list of things you need in order to set up the project locally.
106
+ * node 17.0^ and npm
107
+
108
+ ### Installation
109
+
110
+ To set up the project locally, follow these steps:
111
+
112
+ 1. Clone the repo
113
+ ```sh
114
+ git clone https://github.com/ZumitoTeam/zumito-framework.git
115
+ ```
116
+ 2. cd into the project directory
117
+ ```sh
118
+ cd zumito-framework
119
+ ```
120
+ 3. Install NPM packages
121
+ ```sh
122
+ npm install
123
+ ```
124
+
125
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
126
+
127
+
128
+
129
+ <!-- USAGE EXAMPLES -->
130
+ ## Usage
131
+
132
+ For build the source code, run the following command:
133
+
134
+ ```sh
135
+ npm run build
136
+ ```
137
+
138
+ Then for test it, you will need to create a bot, you can find a guide [here](https://docs.zumito.ga/docs/custom/quickstart).
139
+
140
+ for link the framework to your bot, you will need to run these commands
141
+ 1. In the root of framework:
142
+ ```sh
143
+ npm link
144
+ ```
145
+
146
+ 2. Then in the root of your bot:
147
+ ```sh
148
+ npm link zumito-framework
149
+ ```
150
+
151
+ _For more info of the framework, please refer to the [Documentation](https://docs.zumito.ga/docs/category/zumito-framework)_
152
+
153
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
154
+
155
+
156
+
157
+ <!-- ROADMAP -->
158
+ ## Roadmap
159
+
160
+ - [X] Add Quick start template
161
+ - [ ] Add more documentation, examples, and guides
162
+ - [ ] Add cli for easy command, events, etc boilerplate generation.
163
+
164
+ See the [open issues](https://github.com/ZumitoTeam/zumito-framework/issues) for a full list of proposed features (and known issues).
165
+
166
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
167
+
168
+
169
+
170
+ <!-- CONTRIBUTING -->
171
+ ## Contributing
172
+
173
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
174
+
175
+ If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
176
+ Don't forget to give the project a star! Thanks again!
177
+
178
+ 1. Fork the Project
179
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
180
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
181
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
182
+ 5. Open a Pull Request
183
+
184
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
185
+
186
+
187
+
188
+ <!-- LICENSE -->
189
+ ## License
190
+
191
+ Distributed under the MIT License. See `LICENSE.txt` for more information.
192
+
193
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
194
+
195
+
196
+
197
+ <!-- SUPORT -->
198
+ ## Support
199
+
200
+ Any questions or suggestions? Come to our [Discord server](https://discord.gg/rFywZxgsyF) and chat with us!
201
+
202
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
203
+
204
+
205
+
206
+ <!-- ACKNOWLEDGMENTS -->
207
+ ## Acknowledgments
208
+
209
+ We would like to thank the following projects for their inspiration and/or help:
210
+
211
+ * [Discord.js](https://discord.js.org)
212
+
213
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
214
+
215
+
216
+
217
+ <!-- MARKDOWN LINKS & IMAGES -->
218
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
219
+ [contributors-shield]: https://img.shields.io/github/contributors/ZumitoTeam/zumito-framework.svg?style=for-the-badge
220
+ [contributors-url]: https://github.com/ZumitoTeam/zumito-framework/graphs/contributors
221
+ [forks-shield]: https://img.shields.io/github/forks/ZumitoTeam/zumito-framework.svg?style=for-the-badge
222
+ [forks-url]: https://github.com/ZumitoTeam/zumito-framework/network/members
223
+ [stars-shield]: https://img.shields.io/github/stars/ZumitoTeam/zumito-framework.svg?style=for-the-badge
224
+ [stars-url]: https://github.com/ZumitoTeam/zumito-framework/stargazers
225
+ [issues-shield]: https://img.shields.io/github/issues/ZumitoTeam/zumito-framework.svg?style=for-the-badge
226
+ [issues-url]: https://github.com/ZumitoTeam/zumito-framework/issues
227
+ [license-shield]: https://img.shields.io/github/license/ZumitoTeam/zumito-framework.svg?style=for-the-badge
228
+ [license-url]: https://github.com/ZumitoTeam/zumito-framework/blob/master/LICENSE.txt