reciple 8.3.1 → 8.4.0
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.
- package/README.md +207 -207
- package/dist/bin.mjs +2 -3
- package/dist/bin.mjs.map +1 -1
- package/dist/classes/Config.js +2 -3
- package/dist/classes/Config.js.map +1 -1
- package/dist/utils/modules.js +2 -2
- package/dist/utils/modules.js.map +1 -1
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -1,207 +1,207 @@
|
|
|
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.
|
|
8
|
-
<img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://npmjs.org/package/reciple">
|
|
11
|
-
<img src="https://img.shields.io/npm/v/reciple?label=npm">
|
|
12
|
-
</a>
|
|
13
|
-
<a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/reciple">
|
|
14
|
-
<img src="https://img.shields.io/npm/dt/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.
|
|
22
|
-
<img src="https://discord.com/api/guilds/1032785824686817291/embed.png?style=banner2">
|
|
23
|
-
</a>
|
|
24
|
-
</div>
|
|
25
|
-
</h3>
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Highlights
|
|
30
|
-
|
|
31
|
-
- [CLI based handler](#cli-usage)
|
|
32
|
-
- [Supports Context Menus](#context-menus)
|
|
33
|
-
- [Supports Prefix/Message commands](#message-commands)
|
|
34
|
-
- [Validate messsage command options](#validate-message-command-options)
|
|
35
|
-
- [Supports Slash Commands](#slash-commands)
|
|
36
|
-
- [Built-in command cooldowns](#command-cooldowns)
|
|
37
|
-
- Automatically register application commands
|
|
38
|
-
- [Highly configurable](#config)
|
|
39
|
-
|
|
40
|
-
## Using Templates
|
|
41
|
-
|
|
42
|
-
To use templates use the following command in your terminal:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm create reciple@latest
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
After that configure the template you want to use.
|
|
49
|
-
|
|
50
|
-
## Manual Installation
|
|
51
|
-
|
|
52
|
-
To install the handler, run the following command in your terminal:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
npm i reciple @reciple/core discord.js
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## CLI usage
|
|
59
|
-
|
|
60
|
-
```yml
|
|
61
|
-
Usage: reciple [options] [cwd]
|
|
62
|
-
|
|
63
|
-
Reciple is a Discord.js bot framework
|
|
64
|
-
|
|
65
|
-
Arguments:
|
|
66
|
-
cwd Change the current working directory
|
|
67
|
-
|
|
68
|
-
Options:
|
|
69
|
-
-v, --version output the version number
|
|
70
|
-
-t, --token <token> Replace used bot token
|
|
71
|
-
-c, --config <dir> Set path to a config file (default: "reciple.mjs")
|
|
72
|
-
-D, --debugmode Enable debug mode
|
|
73
|
-
-y, --yes Agree to all Reciple confirmation prompts
|
|
74
|
-
--env <file> .env file location
|
|
75
|
-
--shardmode Modifies some functionalities to support sharding
|
|
76
|
-
--setup Create required config without starting the bot
|
|
77
|
-
--cache-config <file> Add custom caching config
|
|
78
|
-
--sweeper-config <file> Add custom sweeper config
|
|
79
|
-
-h, --help display help for command
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Message Commands
|
|
83
|
-
|
|
84
|
-
Reciple provides a built-in `MessageCommandBuilder` class that can be used for message command handler.
|
|
85
|
-
|
|
86
|
-
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:MessageCommandBuilder)
|
|
87
|
-
```js
|
|
88
|
-
import { MessageCommandBuilder } from 'reciple';
|
|
89
|
-
|
|
90
|
-
new MessageCommandBuilder()
|
|
91
|
-
.setName("command")
|
|
92
|
-
.setDescription("Your lil tiny description")
|
|
93
|
-
.addAliases("cmd", "cmd1")
|
|
94
|
-
.setExecute(command => command.message.reply("Hello!"));
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Validate Message Command Options
|
|
98
|
-
|
|
99
|
-
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:MessageCommandOptionBuilder)
|
|
100
|
-
```js
|
|
101
|
-
import { MessageCommandBuilder } from 'reciple';
|
|
102
|
-
|
|
103
|
-
new MessageCommandBuilder()
|
|
104
|
-
.setName("command")
|
|
105
|
-
.setDescription("Your lil tiny description")
|
|
106
|
-
.addAliases("cmd", "cmd1")
|
|
107
|
-
.setValidateOptions(true) // Validate options
|
|
108
|
-
.addOption(option => option
|
|
109
|
-
.setName("quantity")
|
|
110
|
-
.setDescription("Must be a number")
|
|
111
|
-
.setRequired(true) // A required option
|
|
112
|
-
.setValidate(val => !isNaN(Number(val))) // Validate value
|
|
113
|
-
.setResolveValue(val => Number(val)) // Resolves the option value
|
|
114
|
-
)
|
|
115
|
-
.setExecute(async command => {
|
|
116
|
-
/**
|
|
117
|
-
* @type {number}
|
|
118
|
-
*/
|
|
119
|
-
const quantity = await data.options.getOptionValue('number', { required: true, resolveValue: true });;
|
|
120
|
-
await command.message.reply("Quantity: " + quantity);
|
|
121
|
-
});
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Context Menus
|
|
125
|
-
|
|
126
|
-
Reciple provides extended `ContextMenuCommandBuilder` class that can be used for context menu command handler.
|
|
127
|
-
|
|
128
|
-
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:ContextMenuCommandBuilder)
|
|
129
|
-
```js
|
|
130
|
-
import { ApplicationCommandType } from 'discord.js';
|
|
131
|
-
import { ContextMenuCommandBuilder } from 'reciple';
|
|
132
|
-
|
|
133
|
-
new ContextMenuCommandBuilder()
|
|
134
|
-
.setName("Ban")
|
|
135
|
-
.setType(ApplicationCommandType.User)
|
|
136
|
-
.setExecute(async ({ interaction }) => {
|
|
137
|
-
if (!interaction.inCachedGuild()) return;
|
|
138
|
-
await interaction.targetMember.ban();
|
|
139
|
-
});
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Slash Commands
|
|
143
|
-
|
|
144
|
-
Reciple provides extended `SlashCommandBuilder` class that can be used for slash command handler.
|
|
145
|
-
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:SlashCommandBuilder)
|
|
146
|
-
|
|
147
|
-
```js
|
|
148
|
-
import { SlashCommandMenuBuilder } from 'reciple';
|
|
149
|
-
|
|
150
|
-
new SlashCommandBuilder()
|
|
151
|
-
.setName("ping")
|
|
152
|
-
.setDescription("Pong")
|
|
153
|
-
.setExecute(async ({ interaction }) => interaction.reply(`Pong!`));
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Command Cooldowns
|
|
157
|
-
|
|
158
|
-
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:BaseCommandBuilder#setcooldown)
|
|
159
|
-
|
|
160
|
-
```js
|
|
161
|
-
import { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } from 'reciple';
|
|
162
|
-
import { ApplicationCommandType } from 'discord.js';
|
|
163
|
-
|
|
164
|
-
new ContextMenuCommandBuilder()
|
|
165
|
-
.setName("Context Menu")
|
|
166
|
-
.setType(ApplicationCommandType.Message)
|
|
167
|
-
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
168
|
-
.setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
|
|
169
|
-
|
|
170
|
-
new MessageCommandBuilder()
|
|
171
|
-
.setName("message-command")
|
|
172
|
-
.setDescription(`Your command`)
|
|
173
|
-
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
174
|
-
.setExecute(async ({ message }) => message.reply(`Hello!`));
|
|
175
|
-
|
|
176
|
-
new SlashCommandBuilder()
|
|
177
|
-
.setName("slash-command")
|
|
178
|
-
.setDescription(`Your command`)
|
|
179
|
-
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
180
|
-
.setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Config
|
|
184
|
-
|
|
185
|
-
You can configure the bot in `reciple.mjs` or `reciple.cjs` usually located in the bot's root directory.
|
|
186
|
-
|
|
187
|
-
### Token
|
|
188
|
-
|
|
189
|
-
You can change the token in config.
|
|
190
|
-
|
|
191
|
-
```js
|
|
192
|
-
token: "Your Token" // Directly set token string
|
|
193
|
-
token: process.env.TOKEN // Use env variable
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
You can override the given token as cli flag
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
reciple --token "YOUR_TOKEN_HERE"
|
|
200
|
-
reciple --token "env:TOKEN_VARIABLE"
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
> ## Fun Fact
|
|
206
|
-
>
|
|
207
|
-
> The name reciple is from a minecraft bug. The bug was a misspelling of the word `recipe`. [View Mojang Bug Report](https://bugs.mojang.com/browse/MC-225837)
|
|
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.ggthenorthsolution1">
|
|
8
|
+
<img src="https://img.shields.io/discord/1032785824686817291?color=5865F2&logo=discord&logoColor=white">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://npmjs.org/package/reciple">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/reciple?label=npm">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://github.com/thenorthsolution/Reciple/tree/main/packages/reciple">
|
|
14
|
+
<img src="https://img.shields.io/npm/dt/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.ggthenorthsolution1">
|
|
22
|
+
<img src="https://discord.com/api/guilds/1032785824686817291/embed.png?style=banner2">
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
</h3>
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Highlights
|
|
30
|
+
|
|
31
|
+
- [CLI based handler](#cli-usage)
|
|
32
|
+
- [Supports Context Menus](#context-menus)
|
|
33
|
+
- [Supports Prefix/Message commands](#message-commands)
|
|
34
|
+
- [Validate messsage command options](#validate-message-command-options)
|
|
35
|
+
- [Supports Slash Commands](#slash-commands)
|
|
36
|
+
- [Built-in command cooldowns](#command-cooldowns)
|
|
37
|
+
- Automatically register application commands
|
|
38
|
+
- [Highly configurable](#config)
|
|
39
|
+
|
|
40
|
+
## Using Templates
|
|
41
|
+
|
|
42
|
+
To use templates use the following command in your terminal:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm create reciple@latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
After that configure the template you want to use.
|
|
49
|
+
|
|
50
|
+
## Manual Installation
|
|
51
|
+
|
|
52
|
+
To install the handler, run the following command in your terminal:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm i reciple @reciple/core discord.js
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## CLI usage
|
|
59
|
+
|
|
60
|
+
```yml
|
|
61
|
+
Usage: reciple [options] [cwd]
|
|
62
|
+
|
|
63
|
+
Reciple is a Discord.js bot framework
|
|
64
|
+
|
|
65
|
+
Arguments:
|
|
66
|
+
cwd Change the current working directory
|
|
67
|
+
|
|
68
|
+
Options:
|
|
69
|
+
-v, --version output the version number
|
|
70
|
+
-t, --token <token> Replace used bot token
|
|
71
|
+
-c, --config <dir> Set path to a config file (default: "reciple.mjs")
|
|
72
|
+
-D, --debugmode Enable debug mode
|
|
73
|
+
-y, --yes Agree to all Reciple confirmation prompts
|
|
74
|
+
--env <file> .env file location
|
|
75
|
+
--shardmode Modifies some functionalities to support sharding
|
|
76
|
+
--setup Create required config without starting the bot
|
|
77
|
+
--cache-config <file> Add custom caching config
|
|
78
|
+
--sweeper-config <file> Add custom sweeper config
|
|
79
|
+
-h, --help display help for command
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Message Commands
|
|
83
|
+
|
|
84
|
+
Reciple provides a built-in `MessageCommandBuilder` class that can be used for message command handler.
|
|
85
|
+
|
|
86
|
+
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:MessageCommandBuilder)
|
|
87
|
+
```js
|
|
88
|
+
import { MessageCommandBuilder } from 'reciple';
|
|
89
|
+
|
|
90
|
+
new MessageCommandBuilder()
|
|
91
|
+
.setName("command")
|
|
92
|
+
.setDescription("Your lil tiny description")
|
|
93
|
+
.addAliases("cmd", "cmd1")
|
|
94
|
+
.setExecute(command => command.message.reply("Hello!"));
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Validate Message Command Options
|
|
98
|
+
|
|
99
|
+
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:MessageCommandOptionBuilder)
|
|
100
|
+
```js
|
|
101
|
+
import { MessageCommandBuilder } from 'reciple';
|
|
102
|
+
|
|
103
|
+
new MessageCommandBuilder()
|
|
104
|
+
.setName("command")
|
|
105
|
+
.setDescription("Your lil tiny description")
|
|
106
|
+
.addAliases("cmd", "cmd1")
|
|
107
|
+
.setValidateOptions(true) // Validate options
|
|
108
|
+
.addOption(option => option
|
|
109
|
+
.setName("quantity")
|
|
110
|
+
.setDescription("Must be a number")
|
|
111
|
+
.setRequired(true) // A required option
|
|
112
|
+
.setValidate(val => !isNaN(Number(val))) // Validate value
|
|
113
|
+
.setResolveValue(val => Number(val)) // Resolves the option value
|
|
114
|
+
)
|
|
115
|
+
.setExecute(async command => {
|
|
116
|
+
/**
|
|
117
|
+
* @type {number}
|
|
118
|
+
*/
|
|
119
|
+
const quantity = await data.options.getOptionValue('number', { required: true, resolveValue: true });;
|
|
120
|
+
await command.message.reply("Quantity: " + quantity);
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Context Menus
|
|
125
|
+
|
|
126
|
+
Reciple provides extended `ContextMenuCommandBuilder` class that can be used for context menu command handler.
|
|
127
|
+
|
|
128
|
+
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:ContextMenuCommandBuilder)
|
|
129
|
+
```js
|
|
130
|
+
import { ApplicationCommandType } from 'discord.js';
|
|
131
|
+
import { ContextMenuCommandBuilder } from 'reciple';
|
|
132
|
+
|
|
133
|
+
new ContextMenuCommandBuilder()
|
|
134
|
+
.setName("Ban")
|
|
135
|
+
.setType(ApplicationCommandType.User)
|
|
136
|
+
.setExecute(async ({ interaction }) => {
|
|
137
|
+
if (!interaction.inCachedGuild()) return;
|
|
138
|
+
await interaction.targetMember.ban();
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Slash Commands
|
|
143
|
+
|
|
144
|
+
Reciple provides extended `SlashCommandBuilder` class that can be used for slash command handler.
|
|
145
|
+
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:SlashCommandBuilder)
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
import { SlashCommandMenuBuilder } from 'reciple';
|
|
149
|
+
|
|
150
|
+
new SlashCommandBuilder()
|
|
151
|
+
.setName("ping")
|
|
152
|
+
.setDescription("Pong")
|
|
153
|
+
.setExecute(async ({ interaction }) => interaction.reply(`Pong!`));
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Command Cooldowns
|
|
157
|
+
|
|
158
|
+
[**Read Docs**](https://reciple.js.org/docs/core/main/classes:BaseCommandBuilder#setcooldown)
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
import { ContextMenuCommandBuilder, MessageCommandBuilder, SlashCommandBuilder } from 'reciple';
|
|
162
|
+
import { ApplicationCommandType } from 'discord.js';
|
|
163
|
+
|
|
164
|
+
new ContextMenuCommandBuilder()
|
|
165
|
+
.setName("Context Menu")
|
|
166
|
+
.setType(ApplicationCommandType.Message)
|
|
167
|
+
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
168
|
+
.setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
|
|
169
|
+
|
|
170
|
+
new MessageCommandBuilder()
|
|
171
|
+
.setName("message-command")
|
|
172
|
+
.setDescription(`Your command`)
|
|
173
|
+
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
174
|
+
.setExecute(async ({ message }) => message.reply(`Hello!`));
|
|
175
|
+
|
|
176
|
+
new SlashCommandBuilder()
|
|
177
|
+
.setName("slash-command")
|
|
178
|
+
.setDescription(`Your command`)
|
|
179
|
+
.setCooldown(1000 * 5) // 5 seconds cooldown
|
|
180
|
+
.setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Config
|
|
184
|
+
|
|
185
|
+
You can configure the bot in `reciple.mjs` or `reciple.cjs` usually located in the bot's root directory.
|
|
186
|
+
|
|
187
|
+
### Token
|
|
188
|
+
|
|
189
|
+
You can change the token in config.
|
|
190
|
+
|
|
191
|
+
```js
|
|
192
|
+
token: "Your Token" // Directly set token string
|
|
193
|
+
token: process.env.TOKEN // Use env variable
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
You can override the given token as cli flag
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
reciple --token "YOUR_TOKEN_HERE"
|
|
200
|
+
reciple --token "env:TOKEN_VARIABLE"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
> ## Fun Fact
|
|
206
|
+
>
|
|
207
|
+
> The name reciple is from a minecraft bug. The bug was a misspelling of the word `recipe`. [View Mojang Bug Report](https://bugs.mojang.com/browse/MC-225837)
|
package/dist/bin.mjs
CHANGED
|
@@ -4,17 +4,16 @@ import { createLogger, addEventListenersToClient } from './utils/logger.js';
|
|
|
4
4
|
import { setTimeout as setTimeoutAsync } from 'node:timers/promises';
|
|
5
5
|
import { command, cli, cliVersion, checkForUpdates } from './utils/cli.js';
|
|
6
6
|
import { RecipleClient, findModules } from './index.js';
|
|
7
|
-
import { resolveEnvProtocol } from '@reciple/utils';
|
|
7
|
+
import { existsAsync, resolveEnvProtocol } from '@reciple/utils';
|
|
8
8
|
import { ConfigReader } from './classes/Config.js';
|
|
9
9
|
import { config as loadEnv } from 'dotenv';
|
|
10
10
|
import { mkdir } from 'node:fs/promises';
|
|
11
11
|
import { kleur } from 'fallout-utility';
|
|
12
|
-
import { existsSync } from 'node:fs';
|
|
13
12
|
import { parentPort, threadId } from 'node:worker_threads';
|
|
14
13
|
import path from 'node:path';
|
|
15
14
|
import semver from 'semver';
|
|
16
15
|
command.parse();
|
|
17
|
-
if (!
|
|
16
|
+
if (!await existsAsync(cli.cwd))
|
|
18
17
|
await mkdir(cli.cwd, { recursive: true });
|
|
19
18
|
if (cli.cwd !== cli.nodeCwd || parentPort === null) {
|
|
20
19
|
process.chdir(cli.cwd);
|
package/dist/bin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../src/bin.mts"],"names":[],"mappings":";AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5H,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,UAAU,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C,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhH,MAAM,EAAE,GAAG,CAAC,UAAU,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,0BAA0B,CAAC,CAAC;IAC1F,MAAM,EAAE,GAAG,CAAC,UAAU,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,qBAAqB,CAAC,CAAC;IACjF,MAAM,EAAE,GAAG,CAAC,UAAU,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC,CAAC;IAC7E,MAAM,EAAE,GAAG,CAAC,UAAU,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,kBAAkB,CAAC,CAAC;IAE5E,IAAI,MAAM,CAAC,eAAe;QAAE,MAAM,eAAe,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;AAC3E,CAAC,CAAC,CAAC;AAEH,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;AAE/B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC"}
|
package/dist/classes/Config.js
CHANGED
|
@@ -9,7 +9,6 @@ const utils_1 = require("@reciple/utils");
|
|
|
9
9
|
const promises_1 = require("node:fs/promises");
|
|
10
10
|
const strings_1 = require("fallout-utility/strings");
|
|
11
11
|
const cli_1 = require("../utils/cli");
|
|
12
|
-
const node_fs_1 = require("node:fs");
|
|
13
12
|
const node_path_1 = __importDefault(require("node:path"));
|
|
14
13
|
class ConfigReader {
|
|
15
14
|
static defaultConfigFile = node_path_1.default.join(__dirname, '../../static/config.mjs');
|
|
@@ -39,11 +38,11 @@ class ConfigReader {
|
|
|
39
38
|
return data ?? this.readConfigJS(config.default ?? config.paths[0], createIfNotExists);
|
|
40
39
|
}
|
|
41
40
|
const file = node_path_1.default.resolve(config);
|
|
42
|
-
const isFile = node_path_1.default.isAbsolute(config) || (0,
|
|
41
|
+
const isFile = node_path_1.default.isAbsolute(config) || await (0, utils_1.existsAsync)(file) || ['reciple.js', 'reciple.mjs', 'reciple.cjs'].includes(config);
|
|
43
42
|
if (isFile) {
|
|
44
43
|
const isCommonJS = file.endsWith('.cjs') || ((await (0, utils_1.getDirModuleType)(node_path_1.default.dirname(file))) === 'commonjs');
|
|
45
44
|
const defaultConfig = await this.getDefaultConfigData(!file.endsWith('.mjs') && isCommonJS);
|
|
46
|
-
if (!(0,
|
|
45
|
+
if (!await (0, utils_1.existsAsync)(file)) {
|
|
47
46
|
if (!createIfNotExists)
|
|
48
47
|
return null;
|
|
49
48
|
await (0, promises_1.mkdir)(node_path_1.default.dirname(file), { recursive: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/classes/Config.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/classes/Config.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA0E;AAC1E,0CAAkF;AAClF,+CAA8D;AAC9D,qDAAgD;AAChD,sCAA0C;AAE1C,0DAA6B;AA4B7B,MAAa,YAAY;IACd,MAAM,CAAC,iBAAiB,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;IAE3E,MAAM,CAAC,KAAK,CAAC,iBAAiB;QACjC,OAAO,IAAA,yBAAiB,EAAkB,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAE,CAAC;IACrF,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,WAAqB;QAC1D,IAAI,aAAa,GAAG,CAAC,MAAM,IAAA,m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,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.findModules = void 0;
|
|
7
7
|
const promises_1 = require("node:fs/promises");
|
|
8
|
-
const node_fs_1 = require("node:fs");
|
|
9
8
|
const micromatch_1 = __importDefault(require("micromatch"));
|
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
const utils_1 = require("@reciple/utils");
|
|
11
11
|
async function findModules(config, filter) {
|
|
12
12
|
const modules = [];
|
|
13
13
|
const { globby, isDynamicPattern } = await import('globby');
|
|
@@ -27,7 +27,7 @@ async function findModules(config, filter) {
|
|
|
27
27
|
}));
|
|
28
28
|
continue;
|
|
29
29
|
}
|
|
30
|
-
if (!(0,
|
|
30
|
+
if (!await (0, utils_1.existsAsync)(dir))
|
|
31
31
|
await (0, promises_1.mkdir)(dir, { recursive: true });
|
|
32
32
|
if (!(await (0, promises_1.lstat)(dir)).isDirectory())
|
|
33
33
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/utils/modules.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAGzD,
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/utils/modules.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAGzD,4DAAoC;AACpC,0DAA6B;AAC7B,0CAA6C;AAEtC,KAAK,UAAU,WAAW,CAAC,MAAgC,EAAE,MAAiD;IACjH,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE5D,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,mBAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAA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oBAAU,CAAC,OAAO,CAAC,mBAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CACjG;aACA,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEpE,MAAM,OAAO,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,IAAI,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/H,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAvCD,kCAuCC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Reciple is a Discord.js bot framework",
|
|
4
4
|
"homepage": "https://reciple.js.org/docs/reciple",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
|
-
"version": "8.
|
|
6
|
+
"version": "8.4.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"module": "./dist/esm.mjs",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
@@ -41,25 +41,26 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"
|
|
45
|
-
"@reciple/
|
|
46
|
-
"
|
|
47
|
-
"
|
|
44
|
+
"-": "^0.0.1",
|
|
45
|
+
"@reciple/update-checker": "^9.1.0",
|
|
46
|
+
"@reciple/utils": "^8.3.0",
|
|
47
|
+
"commander": "^12.0.0",
|
|
48
|
+
"dotenv": "^16.4.5",
|
|
48
49
|
"fallout-utility": "^2.8.0",
|
|
49
|
-
"globby": "^14.0.
|
|
50
|
+
"globby": "^14.0.1",
|
|
50
51
|
"micromatch": "^4.0.5",
|
|
51
52
|
"prompts": "^2.4.2",
|
|
52
|
-
"semver": "^7.
|
|
53
|
+
"semver": "^7.6.1"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@reciple/core": "^8.
|
|
56
|
-
"@types/micromatch": "^4.0.
|
|
57
|
-
"@types/semver": "^7.5.
|
|
58
|
-
"discord.js": "^14.
|
|
56
|
+
"@reciple/core": "^8.4.0",
|
|
57
|
+
"@types/micromatch": "^4.0.7",
|
|
58
|
+
"@types/semver": "^7.5.8",
|
|
59
|
+
"discord.js": "^14.15.2"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
62
|
"@reciple/core": "^8.0.0",
|
|
62
63
|
"discord.js": "^14.7.1"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "30d9c2952e7bd40b5f5e0debd9b50f462447cc8a"
|
|
65
66
|
}
|