create-reciple 8.4.3 → 8.4.4

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/README.md +46 -46
  2. package/assets/README.md +190 -190
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,46 +1,46 @@
1
- <h1 align="center">
2
- <img src="https://i.imgur.com/DWM0tJL.png" width="50%">
3
- <br>
4
- </h1>
5
-
6
- <h3 align="center">
7
- <a href="https://discord.gg/kajdev-1032785824686817291">
8
- <img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
9
- </a>
10
- <a href="https://npmjs.org/package/create-reciple">
11
- <img src="https://img.shields.io/npm/v/create-reciple?label=npm">
12
- </a>
13
- <a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/create-reciple">
14
- <img src="https://img.shields.io/npm/dt/create-reciple?maxAge=3600">
15
- </a>
16
- <a href="https://www.codefactor.io/repository/github/falloutstudios/reciple/overview/main">
17
- <img src="https://www.codefactor.io/repository/github/falloutstudios/reciple/badge/main">
18
- </a>
19
- <br>
20
- <div style="padding-top: 1rem">
21
- <a href="https://discord.gg/kajdev-1032785824686817291">
22
- <img src="https://discord.com/api/guilds/1032785824686817291/embed.png?style=banner2">
23
- </a>
24
- </div>
25
- </h3>
26
-
27
- ---
28
-
29
- ## About
30
-
31
- `create-reciple` is a tool used to easily create Reciple projects.
32
-
33
- ## Installation
34
-
35
- ```bash
36
- npm create reciple@latest
37
- yarn create reciple@latest
38
- pnpm create reciple@latest
39
- ```
40
-
41
- ## Templates
42
- - Javascript (CommonJS)
43
- - Javascript (ES Modules)
44
- - Typescript (CommonJS)
45
- - Typescript (ES Modules)
46
-
1
+ <h1 align="center">
2
+ <img src="https://i.imgur.com/DWM0tJL.png" width="50%">
3
+ <br>
4
+ </h1>
5
+
6
+ <h3 align="center">
7
+ <a href="https://discord.gg/kajdev-1032785824686817291">
8
+ <img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
9
+ </a>
10
+ <a href="https://npmjs.org/package/create-reciple">
11
+ <img src="https://img.shields.io/npm/v/create-reciple?label=npm">
12
+ </a>
13
+ <a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/create-reciple">
14
+ <img src="https://img.shields.io/npm/dt/create-reciple?maxAge=3600">
15
+ </a>
16
+ <a href="https://www.codefactor.io/repository/github/falloutstudios/reciple/overview/main">
17
+ <img src="https://www.codefactor.io/repository/github/falloutstudios/reciple/badge/main">
18
+ </a>
19
+ <br>
20
+ <div style="padding-top: 1rem">
21
+ <a href="https://discord.gg/kajdev-1032785824686817291">
22
+ <img src="https://discord.com/api/guilds/1032785824686817291/embed.png?style=banner2">
23
+ </a>
24
+ </div>
25
+ </h3>
26
+
27
+ ---
28
+
29
+ ## About
30
+
31
+ `create-reciple` is a tool used to easily create Reciple projects.
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ npm create reciple@latest
37
+ yarn create reciple@latest
38
+ pnpm create reciple@latest
39
+ ```
40
+
41
+ ## Templates
42
+ - Javascript (CommonJS)
43
+ - Javascript (ES Modules)
44
+ - Typescript (CommonJS)
45
+ - Typescript (ES Modules)
46
+
package/assets/README.md CHANGED
@@ -1,190 +1,190 @@
1
- # Reciple App
2
-
3
- Reciple is a Discord.js command handler framework that just works :3
4
-
5
- > This application is generated by [`create-reciple`](https://npm.im/create-reciple).
6
-
7
- ## Configuration
8
-
9
- Configuration file is set to `./reciple.mjs` or `./reciple.cjs` by default on the CLI.
10
-
11
- > To change the config path, simply add the `-c, --config <path>` flag
12
-
13
- ## Module System
14
-
15
- With Reciple a module can be a command, event, or anything. Reciple scans the dirs given from the config and loads every valid javascript files in that folder.
16
-
17
- ### File Structure
18
-
19
- ```js
20
- // Module config (reciple.mjs)
21
- export const config = {
22
- // other things
23
- modules: {
24
- dirs: ['./modules'], // scans the modules folder
25
- exclude: [],
26
- filter: file => true,
27
- disableModuleVersionCheck: false
28
- },
29
- // other things
30
- };
31
- ```
32
-
33
- ```
34
- > Folder structure
35
-
36
- reciple.mjs
37
- package.json
38
- node_modules/
39
- modules/
40
- ├─ module1.js
41
- ├─ module2.js
42
- ```
43
-
44
- You can also use a glob pattern for your dir config.
45
-
46
- ```js
47
- // Module config (reciple.mjs)
48
- export const config = {
49
- // other things
50
- modules: {
51
- dirs: ['./modules/**/*'], // scans the modules folder and every folders in it recursively
52
- exclude: [],
53
- filter: file => true,
54
- disableModuleVersionCheck: false
55
- },
56
- // other things
57
- };
58
- ```
59
-
60
- ```
61
- > Folder structure
62
-
63
- reciple.mjs
64
- package.json
65
- node_modules/
66
- modules/
67
- ├─ module1.js
68
- ├─ module2.js
69
- ├─anotherFolder/
70
- ├─ module1.js
71
- ├─ module2.js
72
- ```
73
-
74
- ### Module Structure
75
-
76
- Reciple can load CommonJs and ESM modules at the same time.
77
-
78
- #### Valid File Types
79
- - `.js`
80
- - `.cjs`
81
- - `.mjs`
82
-
83
- #### Module Files
84
-
85
- ```js
86
- // ESM
87
- export default {
88
- versions: ['^8'],
89
- onStart: async ({ client }) => true, // Always return true if the module is loaded
90
- onLoad: async ({ client }) => {},
91
- onUnload: async ({ client }) => {}
92
- };
93
-
94
- // CJS
95
- module.exports = {
96
- versions: ['^8'],
97
- onStart: async ({ client }) => true, // Always return true if the module is loaded
98
- onLoad: async ({ client }) => {},
99
- onUnload: async ({ client }) => {}
100
- };
101
- ```
102
-
103
- **Modules Using Classes**
104
- ```js
105
-
106
- // ESM
107
- export class MyModule {
108
- versions = ['^8'];
109
-
110
- async onStart({ client }) {
111
- return true; // Always return true if the module is loaded
112
- }
113
-
114
- async onLoad({ client }) {}
115
- async onUnload({ client }) {}
116
- };
117
-
118
- export default new MyModule();
119
-
120
- // CJS
121
- class MyModule {
122
- versions = ['^8'];
123
-
124
- async onStart({ client }) {
125
- return true; // Always return true if the module is loaded
126
- }
127
-
128
- async onLoad({ client }) {}
129
- async onUnload({ client }) {}
130
- };
131
-
132
- module.exports = new MyModule();
133
- ```
134
-
135
- ## Adding Commands
136
-
137
- To add commands to your module, simply add `commands` propery to your module.
138
-
139
- ```js
140
- export default {
141
- versions: ['^8'],
142
- commands: [], // Commands goes here
143
- onStart: async ({ client }) => true, // Always return true if the module is loaded
144
- onLoad: async ({ client }) => {},
145
- onUnload: async ({ client }) => {}
146
- };
147
- ```
148
-
149
- Instead of importing command builders from Discord.js, use the command builders provided by Reciple.
150
-
151
- ```diff
152
- // ESM
153
- - import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'discord.js';
154
- + import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'reciple';
155
- ```
156
-
157
- ```diff
158
- // CJS
159
- - const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('discord.js');
160
- + const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('reciple');
161
- ```
162
-
163
- Just create a new instance of a command builder in the commands array to add commands to a module.
164
-
165
- ```js
166
- import { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } from 'reciple';
167
-
168
- export default {
169
- versions: ['^8'],
170
- commands: [
171
- new ContextMenuCommandBuilder()
172
- .setName('To Lowercase')
173
- .setType('Message')
174
- .setExecute(async ({ interaction }) => interaction.reply(interaction.targetMessage.content.toLowercase())),
175
- new MessageCommandBuilder()
176
- .setName('hi')
177
- .setDescript('Say hello')
178
- .setExecute(async ({ message }) => message.reply('hello')),
179
- new SlashCommandBuilder()
180
- .setName('hello')
181
- .setDescript('Say hi')
182
- .setExecute(async ({ interaction }) => interaction.reply('hi'))
183
- ],
184
- onStart: async ({ client }) => true, // Always return true if the module is loaded
185
- onLoad: async ({ client }) => {},
186
- onUnload: async ({ client }) => {}
187
- };
188
- ```
189
-
190
- [**Read The Docs**](https://reciple.js.org/docs)
1
+ # Reciple App
2
+
3
+ Reciple is a Discord.js command handler framework that just works :3
4
+
5
+ > This application is generated by [`create-reciple`](https://npm.im/create-reciple).
6
+
7
+ ## Configuration
8
+
9
+ Configuration file is set to `./reciple.mjs` or `./reciple.cjs` by default on the CLI.
10
+
11
+ > To change the config path, simply add the `-c, --config <path>` flag
12
+
13
+ ## Module System
14
+
15
+ With Reciple a module can be a command, event, or anything. Reciple scans the dirs given from the config and loads every valid javascript files in that folder.
16
+
17
+ ### File Structure
18
+
19
+ ```js
20
+ // Module config (reciple.mjs)
21
+ export const config = {
22
+ // other things
23
+ modules: {
24
+ dirs: ['./modules'], // scans the modules folder
25
+ exclude: [],
26
+ filter: file => true,
27
+ disableModuleVersionCheck: false
28
+ },
29
+ // other things
30
+ };
31
+ ```
32
+
33
+ ```
34
+ > Folder structure
35
+
36
+ reciple.mjs
37
+ package.json
38
+ node_modules/
39
+ modules/
40
+ ├─ module1.js
41
+ ├─ module2.js
42
+ ```
43
+
44
+ You can also use a glob pattern for your dir config.
45
+
46
+ ```js
47
+ // Module config (reciple.mjs)
48
+ export const config = {
49
+ // other things
50
+ modules: {
51
+ dirs: ['./modules/**/*'], // scans the modules folder and every folders in it recursively
52
+ exclude: [],
53
+ filter: file => true,
54
+ disableModuleVersionCheck: false
55
+ },
56
+ // other things
57
+ };
58
+ ```
59
+
60
+ ```
61
+ > Folder structure
62
+
63
+ reciple.mjs
64
+ package.json
65
+ node_modules/
66
+ modules/
67
+ ├─ module1.js
68
+ ├─ module2.js
69
+ ├─anotherFolder/
70
+ ├─ module1.js
71
+ ├─ module2.js
72
+ ```
73
+
74
+ ### Module Structure
75
+
76
+ Reciple can load CommonJs and ESM modules at the same time.
77
+
78
+ #### Valid File Types
79
+ - `.js`
80
+ - `.cjs`
81
+ - `.mjs`
82
+
83
+ #### Module Files
84
+
85
+ ```js
86
+ // ESM
87
+ export default {
88
+ versions: ['^8'],
89
+ onStart: async ({ client }) => true, // Always return true if the module is loaded
90
+ onLoad: async ({ client }) => {},
91
+ onUnload: async ({ client }) => {}
92
+ };
93
+
94
+ // CJS
95
+ module.exports = {
96
+ versions: ['^8'],
97
+ onStart: async ({ client }) => true, // Always return true if the module is loaded
98
+ onLoad: async ({ client }) => {},
99
+ onUnload: async ({ client }) => {}
100
+ };
101
+ ```
102
+
103
+ **Modules Using Classes**
104
+ ```js
105
+
106
+ // ESM
107
+ export class MyModule {
108
+ versions = ['^8'];
109
+
110
+ async onStart({ client }) {
111
+ return true; // Always return true if the module is loaded
112
+ }
113
+
114
+ async onLoad({ client }) {}
115
+ async onUnload({ client }) {}
116
+ };
117
+
118
+ export default new MyModule();
119
+
120
+ // CJS
121
+ class MyModule {
122
+ versions = ['^8'];
123
+
124
+ async onStart({ client }) {
125
+ return true; // Always return true if the module is loaded
126
+ }
127
+
128
+ async onLoad({ client }) {}
129
+ async onUnload({ client }) {}
130
+ };
131
+
132
+ module.exports = new MyModule();
133
+ ```
134
+
135
+ ## Adding Commands
136
+
137
+ To add commands to your module, simply add `commands` propery to your module.
138
+
139
+ ```js
140
+ export default {
141
+ versions: ['^8'],
142
+ commands: [], // Commands goes here
143
+ onStart: async ({ client }) => true, // Always return true if the module is loaded
144
+ onLoad: async ({ client }) => {},
145
+ onUnload: async ({ client }) => {}
146
+ };
147
+ ```
148
+
149
+ Instead of importing command builders from Discord.js, use the command builders provided by Reciple.
150
+
151
+ ```diff
152
+ // ESM
153
+ - import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'discord.js';
154
+ + import { ContextMenuCommandBuilder, SlashCommandBuilder } from 'reciple';
155
+ ```
156
+
157
+ ```diff
158
+ // CJS
159
+ - const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('discord.js');
160
+ + const { ContextMenuCommandBuilder, SlashCommandBuilder } = require('reciple');
161
+ ```
162
+
163
+ Just create a new instance of a command builder in the commands array to add commands to a module.
164
+
165
+ ```js
166
+ import { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } from 'reciple';
167
+
168
+ export default {
169
+ versions: ['^8'],
170
+ commands: [
171
+ new ContextMenuCommandBuilder()
172
+ .setName('To Lowercase')
173
+ .setType('Message')
174
+ .setExecute(async ({ interaction }) => interaction.reply(interaction.targetMessage.content.toLowercase())),
175
+ new MessageCommandBuilder()
176
+ .setName('hi')
177
+ .setDescript('Say hello')
178
+ .setExecute(async ({ message }) => message.reply('hello')),
179
+ new SlashCommandBuilder()
180
+ .setName('hello')
181
+ .setDescript('Say hi')
182
+ .setExecute(async ({ interaction }) => interaction.reply('hi'))
183
+ ],
184
+ onStart: async ({ client }) => true, // Always return true if the module is loaded
185
+ onLoad: async ({ client }) => {},
186
+ onUnload: async ({ client }) => {}
187
+ };
188
+ ```
189
+
190
+ [**Read The Docs**](https://reciple.js.org/docs)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "create-reciple",
3
3
  "description": "A Reciple Discord bot project builder",
4
4
  "license": "GPL-3.0",
5
- "version": "8.4.3",
5
+ "version": "8.4.4",
6
6
  "type": "module",
7
7
  "types": "./dist/index.d.ts",
8
8
  "module": "./dist/index.js",
@@ -36,13 +36,13 @@
36
36
  "fallout-utility": "^2.8.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@reciple/core": "^8.2.3",
39
+ "@reciple/core": "^8.2.4",
40
40
  "@types/node": "^20.9.0",
41
41
  "discord.js": "^14.14.1",
42
42
  "nodemon": "^3.0.1",
43
- "reciple": "^8.2.3",
43
+ "reciple": "^8.2.4",
44
44
  "rimraf": "^5.0.5",
45
45
  "typescript": "^5.2.2"
46
46
  },
47
- "gitHead": "a2e837166e79924c5b11f5181975f6c86b017492"
47
+ "gitHead": "a590b5c96c25dba68cb592c1c931cefefce9a2cb"
48
48
  }