reciple 7.9.10 → 7.9.12

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 (2) hide show
  1. package/README.md +214 -214
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,214 +1,214 @@
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/VzP8qW7Z8d">
8
- <img src="https://img.shields.io/discord/993105237000855592?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/FalloutStudios/Reciple/blob/main/LICENSE">
14
- <img src="https://img.shields.io/npm/dt/reciple.svg?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
- </h3>
20
-
21
- ## Features
22
-
23
- - [CLI based handler](#cli-usage)
24
- - [Supports Context Menus](#context-menus)
25
- - [Supports Prefix/Message commands](#message-commands)
26
- - [Validate messsage command options](#validate-message-command-options)
27
- - [Supports Slash Commands](#slash-commands)
28
- - [Built-in command cooldowns](#command-cooldowns)
29
- - Automatically register application commands
30
- - [Highly configurable](#config)
31
-
32
- ## Using Templates
33
-
34
- To use templates use the following command in your terminal:
35
-
36
- ```bash
37
- npm create reciple@latest
38
- ```
39
-
40
- After that configure the template you want to use.
41
-
42
- ## Manual Installation
43
-
44
- To install the handler, run the following command in your terminal:
45
-
46
- ```bash
47
- npm i reciple discord.js
48
- ```
49
-
50
- You can initialize the bot to the current directory with the following command in your terminal:
51
-
52
- ```bash
53
- npx reciple
54
- ```
55
-
56
- It will ask you to continue if the directory is not empty. Type `y` to continue. After the bot has been initialized, it will ask you for your bot token.
57
-
58
- > You can change the token anytime you want
59
-
60
- ## CLI usage
61
-
62
- ```yml
63
- Usage: reciple [options] [cwd]
64
-
65
- Reciple is a Discord.js bot framework
66
-
67
- Arguments:
68
- cwd Change the current working directory
69
-
70
- Options:
71
- -v, --version output the version number
72
- -t, --token <token> Replace used bot token
73
- -c, --config <dir> Change path to config file
74
- -D, --debugmode Enable debug mode
75
- -y, --yes Agree to all Reciple confirmation prompts
76
- --env <file> .env file location
77
- --shardmode Modifies some functionalities to support sharding
78
- --setup Create required config without starting the bot
79
- -h, --help display help for command
80
- ```
81
-
82
- ## Message Commands
83
-
84
- Reciple provides built-in `MessageCommandBuilder` class that can be used for message command handler.
85
-
86
- ```js
87
- const { MessageCommandBuilder } = require("reciple");
88
-
89
- new MessageCommandBuilder()
90
- .setName("command")
91
- .setDescription("Your lil tiny description")
92
- .addAliases("cmd", "cmd1")
93
- .setExecute((command) => command.message.reply("Hello!"));
94
- ```
95
-
96
- ### Validate Message Command Options
97
-
98
- ```js
99
- const { MessageCommandBuilder } = require("reciple");
100
-
101
- new MessageCommandBuilder()
102
- .setName("command")
103
- .setDescription("Your lil tiny description")
104
- .addAliases("cmd", "cmd1")
105
- .setValidateOptions(true) // Validate options
106
- .addOption(
107
- (option) =>
108
- option
109
- .setName("quantity")
110
- .setDescription("Must be a number")
111
- .setRequired(true) // A required option
112
- .setValidator((val) => !isNaN(Number(val))) // Validate value
113
- )
114
- .setExecute(async (command) => {
115
- const quantity = Number(command.options.getValue("quantity", true));
116
-
117
- await command.message.reply("Quantity: " + quantity);
118
- });
119
- ```
120
-
121
- ## Context Menus
122
-
123
- Reciple provides custom `ContextMenuBuilder` class that can be used for context menu command handler.
124
-
125
- ```js
126
- const { ContextMenuBuilder } = require("reciple");
127
- const { ApplicationCommandType } = require("discord.js");
128
-
129
- new ContextMenuBuilder()
130
- .setName("Ban")
131
- .setType(ApplicationCommandType.User)
132
- .setExecute(async ({ interaction }) => {
133
- if (!interaction.inCachedGuild()) return;
134
- await interaction.member.ban();
135
- });
136
- ```
137
-
138
- ## Slash Commands
139
-
140
- Reciple provides custom `SlashCommandBuilder` class that can be used for slash command handler.
141
-
142
- ```js
143
- const { SlashCommandBuilder } = require("reciple");
144
-
145
- new SlashCommandBuilder()
146
- .setName("ping")
147
- .setDescription("Pong")
148
- .setExecute(async ({ interaction }) => interaction.reply(`Pong!`));
149
- ```
150
-
151
- ## Command Cooldowns
152
-
153
- ```js
154
- const {
155
- MessageCommandBuilder,
156
- MessageCommandBuilder,
157
- SlashCommandBuilder,
158
- } = require("reciple");
159
- const { ApplicationCommandType } = require("discord.js");
160
-
161
- new ContextMenuCommandBuilder()
162
- .setName("Context Menu")
163
- .setType(ApplicationCommandType.Message)
164
- .setCooldown(1000 * 5) // 5 seconds cooldown
165
- .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
166
-
167
- new ContextMenuCommandBuilder()
168
- .setName("message-command")
169
- .setDescription(`Your command`)
170
- .setCooldown(1000 * 5) // 5 seconds cooldown
171
- .setExecute(async ({ message }) => message.reply(`Hello!`));
172
-
173
- new SlashCommandBuilder()
174
- .setName("slash-command")
175
- .setDescription(`Your command`)
176
- .setCooldown(1000 * 5) // 5 seconds cooldown
177
- .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
178
- ```
179
-
180
- ## Config
181
-
182
- You can configure the bot in `reciple.yml` located in the bot's root directory.
183
-
184
- ### Token
185
-
186
- You can directly change the token in `reciple.yml`.
187
-
188
- ```yml
189
- token: "YOUR_TOKEN_HERE"
190
- ```
191
-
192
- Using environment variables is also supported.
193
-
194
- ```yml
195
- token: "env:TOKEN_VARIABLE"
196
- ```
197
-
198
- You can override the given token using your terminal
199
-
200
- ```bash
201
- npx reciple --token "YOUR_TOKEN_HERE"
202
- ```
203
-
204
- Use env variable
205
-
206
- ```bash
207
- npx reciple --token "env:TOKEN_VARIABLE"
208
- ```
209
-
210
- ---
211
-
212
- > ## Fun Fact
213
- >
214
- > 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.gg/VzP8qW7Z8d">
8
+ <img src="https://img.shields.io/discord/993105237000855592?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/FalloutStudios/Reciple/blob/main/LICENSE">
14
+ <img src="https://img.shields.io/npm/dt/reciple.svg?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
+ </h3>
20
+
21
+ ## Features
22
+
23
+ - [CLI based handler](#cli-usage)
24
+ - [Supports Context Menus](#context-menus)
25
+ - [Supports Prefix/Message commands](#message-commands)
26
+ - [Validate messsage command options](#validate-message-command-options)
27
+ - [Supports Slash Commands](#slash-commands)
28
+ - [Built-in command cooldowns](#command-cooldowns)
29
+ - Automatically register application commands
30
+ - [Highly configurable](#config)
31
+
32
+ ## Using Templates
33
+
34
+ To use templates use the following command in your terminal:
35
+
36
+ ```bash
37
+ npm create reciple@latest
38
+ ```
39
+
40
+ After that configure the template you want to use.
41
+
42
+ ## Manual Installation
43
+
44
+ To install the handler, run the following command in your terminal:
45
+
46
+ ```bash
47
+ npm i reciple discord.js
48
+ ```
49
+
50
+ You can initialize the bot to the current directory with the following command in your terminal:
51
+
52
+ ```bash
53
+ npx reciple
54
+ ```
55
+
56
+ It will ask you to continue if the directory is not empty. Type `y` to continue. After the bot has been initialized, it will ask you for your bot token.
57
+
58
+ > You can change the token anytime you want
59
+
60
+ ## CLI usage
61
+
62
+ ```yml
63
+ Usage: reciple [options] [cwd]
64
+
65
+ Reciple is a Discord.js bot framework
66
+
67
+ Arguments:
68
+ cwd Change the current working directory
69
+
70
+ Options:
71
+ -v, --version output the version number
72
+ -t, --token <token> Replace used bot token
73
+ -c, --config <dir> Change path to config file
74
+ -D, --debugmode Enable debug mode
75
+ -y, --yes Agree to all Reciple confirmation prompts
76
+ --env <file> .env file location
77
+ --shardmode Modifies some functionalities to support sharding
78
+ --setup Create required config without starting the bot
79
+ -h, --help display help for command
80
+ ```
81
+
82
+ ## Message Commands
83
+
84
+ Reciple provides built-in `MessageCommandBuilder` class that can be used for message command handler.
85
+
86
+ ```js
87
+ const { MessageCommandBuilder } = require("reciple");
88
+
89
+ new MessageCommandBuilder()
90
+ .setName("command")
91
+ .setDescription("Your lil tiny description")
92
+ .addAliases("cmd", "cmd1")
93
+ .setExecute((command) => command.message.reply("Hello!"));
94
+ ```
95
+
96
+ ### Validate Message Command Options
97
+
98
+ ```js
99
+ const { MessageCommandBuilder } = require("reciple");
100
+
101
+ new MessageCommandBuilder()
102
+ .setName("command")
103
+ .setDescription("Your lil tiny description")
104
+ .addAliases("cmd", "cmd1")
105
+ .setValidateOptions(true) // Validate options
106
+ .addOption(
107
+ (option) =>
108
+ option
109
+ .setName("quantity")
110
+ .setDescription("Must be a number")
111
+ .setRequired(true) // A required option
112
+ .setValidator((val) => !isNaN(Number(val))) // Validate value
113
+ )
114
+ .setExecute(async (command) => {
115
+ const quantity = Number(command.options.getValue("quantity", true));
116
+
117
+ await command.message.reply("Quantity: " + quantity);
118
+ });
119
+ ```
120
+
121
+ ## Context Menus
122
+
123
+ Reciple provides custom `ContextMenuBuilder` class that can be used for context menu command handler.
124
+
125
+ ```js
126
+ const { ContextMenuBuilder } = require("reciple");
127
+ const { ApplicationCommandType } = require("discord.js");
128
+
129
+ new ContextMenuBuilder()
130
+ .setName("Ban")
131
+ .setType(ApplicationCommandType.User)
132
+ .setExecute(async ({ interaction }) => {
133
+ if (!interaction.inCachedGuild()) return;
134
+ await interaction.member.ban();
135
+ });
136
+ ```
137
+
138
+ ## Slash Commands
139
+
140
+ Reciple provides custom `SlashCommandBuilder` class that can be used for slash command handler.
141
+
142
+ ```js
143
+ const { SlashCommandBuilder } = require("reciple");
144
+
145
+ new SlashCommandBuilder()
146
+ .setName("ping")
147
+ .setDescription("Pong")
148
+ .setExecute(async ({ interaction }) => interaction.reply(`Pong!`));
149
+ ```
150
+
151
+ ## Command Cooldowns
152
+
153
+ ```js
154
+ const {
155
+ MessageCommandBuilder,
156
+ MessageCommandBuilder,
157
+ SlashCommandBuilder,
158
+ } = require("reciple");
159
+ const { ApplicationCommandType } = require("discord.js");
160
+
161
+ new ContextMenuCommandBuilder()
162
+ .setName("Context Menu")
163
+ .setType(ApplicationCommandType.Message)
164
+ .setCooldown(1000 * 5) // 5 seconds cooldown
165
+ .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
166
+
167
+ new ContextMenuCommandBuilder()
168
+ .setName("message-command")
169
+ .setDescription(`Your command`)
170
+ .setCooldown(1000 * 5) // 5 seconds cooldown
171
+ .setExecute(async ({ message }) => message.reply(`Hello!`));
172
+
173
+ new SlashCommandBuilder()
174
+ .setName("slash-command")
175
+ .setDescription(`Your command`)
176
+ .setCooldown(1000 * 5) // 5 seconds cooldown
177
+ .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
178
+ ```
179
+
180
+ ## Config
181
+
182
+ You can configure the bot in `reciple.yml` located in the bot's root directory.
183
+
184
+ ### Token
185
+
186
+ You can directly change the token in `reciple.yml`.
187
+
188
+ ```yml
189
+ token: "YOUR_TOKEN_HERE"
190
+ ```
191
+
192
+ Using environment variables is also supported.
193
+
194
+ ```yml
195
+ token: "env:TOKEN_VARIABLE"
196
+ ```
197
+
198
+ You can override the given token using your terminal
199
+
200
+ ```bash
201
+ npx reciple --token "YOUR_TOKEN_HERE"
202
+ ```
203
+
204
+ Use env variable
205
+
206
+ ```bash
207
+ npx reciple --token "env:TOKEN_VARIABLE"
208
+ ```
209
+
210
+ ---
211
+
212
+ > ## Fun Fact
213
+ >
214
+ > 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/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": "7.9.10",
6
+ "version": "7.9.12",
7
7
  "main": "./bin/index.js",
8
8
  "module": "./bin/esm.mjs",
9
9
  "types": "./bin/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "README.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@reciple/client": "^7.8.8",
40
+ "@reciple/client": "^7.8.10",
41
41
  "@reciple/update-checker": "^7.2.3",
42
42
  "commander": "^11.0.0",
43
43
  "dotenv": "^16.3.1",
@@ -60,5 +60,5 @@
60
60
  "peerDependencies": {
61
61
  "discord.js": "^14.7.1"
62
62
  },
63
- "gitHead": "c5b7e4cb11a23eb21830bea7264e1985b93e9085"
63
+ "gitHead": "2057e052bbab4f99ea8ddd4ce78ebdf940ad1509"
64
64
  }