reciple 9.0.0-dev.11 → 9.0.0-dev.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 +29 -28
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -45,15 +45,7 @@ To use templates use the following command in your terminal:
45
45
  npm create reciple@latest
46
46
  ```
47
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
- ```
48
+ After that configure the template you want to use. [Learn More](https://reciple.js.org/guide/getting-started/installation)
57
49
 
58
50
  ## CLI usage
59
51
 
@@ -63,20 +55,18 @@ Usage: reciple [options] [cwd]
63
55
  Reciple is a Discord.js bot framework
64
56
 
65
57
  Arguments:
66
- cwd Change the current working directory
58
+ cwd Change the current working directory
67
59
 
68
60
  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
61
+ -v, --version output the version number
62
+ -t, --token <token> Replace used bot token
63
+ -c, --config <dir> Set path to a config file
64
+ -D, --debugmode Enable debug mode
65
+ -y, --yes Agree to all Reciple confirmation prompts
66
+ --env <file> .env file location
67
+ --shardmode Modifies some functionalities to support sharding
68
+ --setup Create required config without starting the bot
69
+ -h, --help display help for command
80
70
  ```
81
71
 
82
72
  ## Message Commands
@@ -109,8 +99,8 @@ new MessageCommandBuilder()
109
99
  .setName("quantity")
110
100
  .setDescription("Must be a number")
111
101
  .setRequired(true) // A required option
112
- .setValidate(val => !isNaN(Number(val))) // Validate value
113
- .setResolveValue(val => Number(val)) // Resolves the option value
102
+ .setValidate(({ value }) => !isNaN(Number(value))) // Validate value
103
+ .setResolveValue(({ value }) => Number(value)) // Resolves the option value
114
104
  )
115
105
  .setExecute(async command => {
116
106
  /**
@@ -135,7 +125,10 @@ new ContextMenuCommandBuilder()
135
125
  .setType(ApplicationCommandType.User)
136
126
  .setExecute(async ({ interaction }) => {
137
127
  if (!interaction.inCachedGuild()) return;
128
+
129
+ await interaction.deferReply();
138
130
  await interaction.targetMember.ban();
131
+ await interaction.editReply(`Banned ${interaction.targetUser}`);
139
132
  });
140
133
  ```
141
134
 
@@ -150,7 +143,9 @@ import { SlashCommandMenuBuilder } from 'reciple';
150
143
  new SlashCommandBuilder()
151
144
  .setName("ping")
152
145
  .setDescription("Pong")
153
- .setExecute(async ({ interaction }) => interaction.reply(`Pong!`));
146
+ .setExecute(async ({ interaction }) => {
147
+ await interaction.reply(`Pong!`);
148
+ });
154
149
  ```
155
150
 
156
151
  ## Command Cooldowns
@@ -165,24 +160,30 @@ new ContextMenuCommandBuilder()
165
160
  .setName("Context Menu")
166
161
  .setType(ApplicationCommandType.Message)
167
162
  .setCooldown(1000 * 5) // 5 seconds cooldown
168
- .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
163
+ .setExecute(async ({ interaction }) => {
164
+ await interaction.reply(`Hello!`);
165
+ });
169
166
 
170
167
  new MessageCommandBuilder()
171
168
  .setName("message-command")
172
169
  .setDescription(`Your command`)
173
170
  .setCooldown(1000 * 5) // 5 seconds cooldown
174
- .setExecute(async ({ message }) => message.reply(`Hello!`));
171
+ .setExecute(async ({ message }) => {
172
+ await message.reply(`Hello!`);
173
+ });
175
174
 
176
175
  new SlashCommandBuilder()
177
176
  .setName("slash-command")
178
177
  .setDescription(`Your command`)
179
178
  .setCooldown(1000 * 5) // 5 seconds cooldown
180
- .setExecute(async ({ interaction }) => interaction.reply(`Hello!`));
179
+ .setExecute(async ({ interaction }) => {
180
+ await interaction.reply(`Hello!`);
181
+ });
181
182
  ```
182
183
 
183
184
  ## Config
184
185
 
185
- You can configure the bot in `reciple.mjs` or `reciple.cjs` usually located in the bot's root directory.
186
+ You can configure the bot in `reciple.mjs` usually located in the bot's root directory.
186
187
 
187
188
  ### Token
188
189
 
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": "9.0.0-dev.11",
6
+ "version": "9.0.0-dev.12",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "bin": "./dist/bin.js",
@@ -40,7 +40,7 @@
40
40
  "README.md"
41
41
  ],
42
42
  "dependencies": {
43
- "@reciple/utils": "^9.0.0-dev.4",
43
+ "@reciple/utils": "^9.0.0-dev.5",
44
44
  "commander": "^12.1.0",
45
45
  "dotenv": "^16.4.5",
46
46
  "fallout-utility": "^2.9.1",
@@ -50,7 +50,7 @@
50
50
  "semver": "^7.6.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@reciple/core": "^9.0.0-dev.7",
53
+ "@reciple/core": "^9.0.0-dev.8",
54
54
  "@types/micromatch": "^4.0.7",
55
55
  "@types/semver": "^7.5.8",
56
56
  "discord.js": "^14.15.2"
@@ -59,5 +59,5 @@
59
59
  "@reciple/core": "^9 || ^9.0.0-dev",
60
60
  "discord.js": "^14.15.0"
61
61
  },
62
- "gitHead": "eeade43ad057b3fe3234974c325fd8e1967ca867"
62
+ "gitHead": "01b281ea398113b20e3a4044f4da4a5112e42028"
63
63
  }