reciple 2.0.0-pre.1 → 2.0.1

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 CHANGED
@@ -12,48 +12,54 @@ A simple Dicord.js command handler that just works.
12
12
  [![Discord Invite](https://i.imgur.com/GffJByO.png)](https://discord.gg/2CattJYNpw)
13
13
 
14
14
  ## Installation
15
- To install the bot, run the following command:
15
+ To install the bot, run the following command in your terminal:
16
16
 
17
17
  ```bash
18
18
  npm i reciple
19
19
  ```
20
+ ```bash
21
+ yarn add reciple
22
+ ```
23
+ ```bash
24
+ pnpm add reciple
25
+ ```
20
26
 
21
- You can initialize the bot to the current directory with the following command:
27
+ You can initialize the bot to the current directory with the following command in your terminal:
22
28
 
23
29
  ```bash
24
30
  npx reciple
25
31
  ```
26
32
 
27
- 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.
33
+ 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.
28
34
 
29
- > You can always change the token later
35
+ > You can change the token anytime you want
30
36
 
31
37
  ## Config
32
38
 
33
- You can configure the bot on `reciple.yml` in the bot root directory.
39
+ You can configure the bot in `reciple.yml` located in the bot's root directory.
34
40
 
35
41
  ### Token
36
42
 
37
- You can directly change the token on `reciple.yml` like so:
43
+ You can directly change the token in `reciple.yml`.
38
44
 
39
45
  ```yml
40
46
  token: "YOUR_TOKEN_HERE"
41
47
  ```
42
48
 
43
- Using environment variables is also supported:
49
+ Using environment variables is also supported.
44
50
 
45
51
  ```yml
46
52
  token: "env:TOKEN_VARIABLE"
47
53
  ```
48
54
 
49
- You can override the token on the command line like so:
55
+ You can override the given token using your terminal
50
56
 
51
57
  ```bash
52
58
  npx reciple --token "YOUR_TOKEN_HERE"
53
59
  ```
54
60
 
55
- ## Running the bot
56
- To run the bot, run the following command:
61
+ ## Starting the bot
62
+ To start the bot, run the following command:
57
63
 
58
64
  ```bash
59
65
  npx reciple
@@ -62,5 +68,4 @@ npx reciple
62
68
  > ## Fun Fact
63
69
  > 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)
64
70
 
65
- # Save the Earth
66
71
  [#letTheEarthBreathe](https://rebellion.global/)
package/bin/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export * from './reciple/classes/MessageCommandOptionManager';
4
4
  export * from './reciple/classes/builders/InteractionCommandBuilder';
5
5
  export * from './reciple/classes/builders/MessageCommandBuilder';
6
6
  export * from './reciple/classes/builders/MessageCommandOptionBuilder';
7
+ export * from './reciple/types/builders';
8
+ export * from './reciple/types/commands';
7
9
  export * from './reciple/permissions';
8
10
  export * from './reciple/flags';
9
11
  export * from './reciple/isIgnoredChannel';
package/bin/index.js CHANGED
@@ -20,6 +20,8 @@ __exportStar(require("./reciple/classes/MessageCommandOptionManager"), exports);
20
20
  __exportStar(require("./reciple/classes/builders/InteractionCommandBuilder"), exports);
21
21
  __exportStar(require("./reciple/classes/builders/MessageCommandBuilder"), exports);
22
22
  __exportStar(require("./reciple/classes/builders/MessageCommandOptionBuilder"), exports);
23
+ __exportStar(require("./reciple/types/builders"), exports);
24
+ __exportStar(require("./reciple/types/commands"), exports);
23
25
  __exportStar(require("./reciple/permissions"), exports);
24
26
  __exportStar(require("./reciple/flags"), exports);
25
27
  __exportStar(require("./reciple/isIgnoredChannel"), exports);
@@ -1,5 +1,5 @@
1
1
  import { Guild, TextBasedChannel, User } from 'discord.js';
2
- import { RecipleCommandBuilders } from '../modules';
2
+ import { RecipleCommandBuilders } from '../types/builders';
3
3
  export interface CooledDownUser {
4
4
  user: User;
5
5
  command: string;
@@ -13,9 +13,24 @@ export declare class CommandCooldownManager extends Array<CooledDownUser> {
13
13
  * Alias for `CommandCooldownManager#push()`
14
14
  */
15
15
  add(...options: CooledDownUser[]): number;
16
+ /**
17
+ * Remove cooldown from specific user, channel or guild
18
+ */
16
19
  remove(options: Partial<CooledDownUser>, limit?: number): void;
20
+ /**
21
+ * Check if the given user is cooled-down
22
+ */
17
23
  isCooledDown(options: Partial<Omit<CooledDownUser, 'expireTime'>>): boolean;
24
+ /**
25
+ * Clear non cooled-down users from this array
26
+ */
18
27
  clean(options?: Partial<Omit<CooledDownUser, 'expireTime'>>): void;
28
+ /**
29
+ * Get someone's cooldown data
30
+ */
19
31
  get(options: Partial<Omit<CooledDownUser, 'expireTime'>>): CooledDownUser | undefined;
32
+ /**
33
+ * Check if the options are valid
34
+ */
20
35
  static checkOptions(options: Partial<Omit<CooledDownUser, 'expireTime'>>, data: CooledDownUser): boolean;
21
36
  }
@@ -8,6 +8,9 @@ class CommandCooldownManager extends Array {
8
8
  add(...options) {
9
9
  return this.push(...options);
10
10
  }
11
+ /**
12
+ * Remove cooldown from specific user, channel or guild
13
+ */
11
14
  remove(options, limit = 0) {
12
15
  if (!Object.keys(options).length)
13
16
  throw new TypeError('Provide atleast one option to remove cooldown data.');
@@ -23,6 +26,9 @@ class CommandCooldownManager extends Array {
23
26
  i++;
24
27
  }
25
28
  }
29
+ /**
30
+ * Check if the given user is cooled-down
31
+ */
26
32
  isCooledDown(options) {
27
33
  const data = this.get(options);
28
34
  if (!data)
@@ -32,6 +38,9 @@ class CommandCooldownManager extends Array {
32
38
  return false;
33
39
  return true;
34
40
  }
41
+ /**
42
+ * Clear non cooled-down users from this array
43
+ */
35
44
  clean(options) {
36
45
  for (const index in this) {
37
46
  if (options && !CommandCooldownManager.checkOptions(options, this[index]))
@@ -41,9 +50,15 @@ class CommandCooldownManager extends Array {
41
50
  this.slice(Number(index));
42
51
  }
43
52
  }
53
+ /**
54
+ * Get someone's cooldown data
55
+ */
44
56
  get(options) {
45
57
  return this.find(data => CommandCooldownManager.checkOptions(options, data));
46
58
  }
59
+ /**
60
+ * Check if the options are valid
61
+ */
47
62
  static checkOptions(options, data) {
48
63
  var _a, _b;
49
64
  if ((options === null || options === void 0 ? void 0 : options.user) && options.user.id !== data.user.id)
@@ -1,38 +1,12 @@
1
1
  import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from './builders/InteractionCommandBuilder';
2
- import { InteractionBuilder } from '../registerInteractionCommands';
3
2
  import { MessageCommandBuilder, RecipleMessageCommandExecuteData } from './builders/MessageCommandBuilder';
4
- import { MessageCommandOptionManager } from './MessageCommandOptionManager';
3
+ import { InteractionBuilder } from '../registerInteractionCommands';
4
+ import { RecipleCommandBuilders } from '../types/builders';
5
+ import { CommandCooldownManager } from './CommandCooldownManager';
6
+ import { RecipleModule, RecipleScript } from '../modules';
5
7
  import { Logger as ILogger } from 'fallout-utility';
6
8
  import { Config } from './RecipleConfig';
7
- import { CommandCooldownManager, CooledDownUser } from './CommandCooldownManager';
8
9
  import { ApplicationCommandDataResolvable, Awaitable, Client, ClientEvents, ClientOptions, CommandInteraction, Interaction, Message } from 'discord.js';
9
- import { RecipleCommandBuilders, RecipleModule, RecipleScript } from '../modules';
10
- export declare type CommandHaltReason<Builder extends RecipleCommandBuilders> = RecipleHaltedCommandData<Builder>["reason"];
11
- export declare type RecipleHaltedCommandData<Builder extends RecipleCommandBuilders> = CommandErrorData<Builder> | CommandCooldownData<Builder> | CommandInvalidArguments<Builder> | CommandMissingArguments<Builder> | CommandMissingMemberPermissions<Builder> | CommandMissingBotPermissions<Builder>;
12
- export interface CommandHaltBaseData<Builder extends RecipleCommandBuilders> {
13
- executeData: Builder extends InteractionCommandBuilder ? RecipleInteractionCommandExecuteData : RecipleMessageCommandExecuteData;
14
- }
15
- export interface CommandErrorData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
16
- reason: 'ERROR';
17
- error: any;
18
- }
19
- export interface CommandCooldownData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder>, CooledDownUser {
20
- reason: 'COOLDOWN';
21
- }
22
- export interface CommandInvalidArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
23
- reason: 'INVALID_ARGUMENTS';
24
- invalidArguments: MessageCommandOptionManager;
25
- }
26
- export interface CommandMissingArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
27
- reason: 'MISSING_ARGUMENTS';
28
- missingArguments: MessageCommandOptionManager;
29
- }
30
- export interface CommandMissingMemberPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
31
- reason: 'MISSING_MEMBER_PERMISSIONS';
32
- }
33
- export interface CommandMissingBotPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
34
- reason: 'MISSING_BOT_PERMISSIONS';
35
- }
36
10
  export interface RecipleClientOptions extends ClientOptions {
37
11
  config?: Config;
38
12
  }
@@ -115,7 +89,7 @@ export declare class RecipleClient<Ready extends boolean = boolean> extends Clie
115
89
  /**
116
90
  * Emits the "recipleReplyError" event
117
91
  */
118
- private replyError;
92
+ private _replyError;
119
93
  /**
120
94
  * Error message when a command fails to execute
121
95
  */
@@ -1,10 +1,5 @@
1
1
  "use strict";
2
- // Dear precious programmer,
3
- // If you're trying to understand this code, please, consider that
4
- // at the time of writing this code, It was written the way humans
5
- // can understand it but I transformed into a dog at Apr 12th 2022
6
- // and accidentally made it unreadable for humans. So, if you're
7
- // trying to understand this code, please, consider being a dog first.
2
+ // Not cool code
8
3
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9
4
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10
5
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -17,17 +12,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
12
  Object.defineProperty(exports, "__esModule", { value: true });
18
13
  exports.RecipleClient = void 0;
19
14
  const registerInteractionCommands_1 = require("../registerInteractionCommands");
15
+ const permissions_1 = require("../permissions");
16
+ const CommandCooldownManager_1 = require("./CommandCooldownManager");
20
17
  const MessageCommandOptionManager_1 = require("./MessageCommandOptionManager");
18
+ const modules_1 = require("../modules");
21
19
  const fallout_utility_1 = require("fallout-utility");
22
20
  const RecipleConfig_1 = require("./RecipleConfig");
23
21
  const isIgnoredChannel_1 = require("../isIgnoredChannel");
24
- const CommandCooldownManager_1 = require("./CommandCooldownManager");
25
- const permissions_1 = require("../permissions");
26
22
  const version_1 = require("../version");
27
23
  const logger_1 = require("../logger");
28
24
  const discord_js_1 = require("discord.js");
29
- const modules_1 = require("../modules");
30
- ;
31
25
  class RecipleClient extends discord_js_1.Client {
32
26
  constructor(options) {
33
27
  var _a, _b, _c;
@@ -175,20 +169,20 @@ class RecipleClient extends discord_js_1.Client {
175
169
  if (command.validateOptions) {
176
170
  if (commandOptions.some(o => o.invalid)) {
177
171
  if (!(command === null || command === void 0 ? void 0 : command.halt) || !(yield command.halt({ executeData, reason: 'INVALID_ARGUMENTS', invalidArguments: new MessageCommandOptionManager_1.MessageCommandOptionManager(executeData.options.filter(o => o.invalid)) }))) {
178
- message.reply(this.getMessage('invalidArguments', 'Invalid argument(s) given.')).catch(er => this.replyError(er));
172
+ message.reply(this.getMessage('invalidArguments', 'Invalid argument(s) given.')).catch(er => this._replyError(er));
179
173
  }
180
174
  return;
181
175
  }
182
176
  if (commandOptions.some(o => o.missing)) {
183
177
  if (!command.halt || !(yield command.halt({ executeData, reason: 'MISSING_ARGUMENTS', missingArguments: new MessageCommandOptionManager_1.MessageCommandOptionManager(executeData.options.filter(o => o.missing)) }))) {
184
- message.reply(this.getMessage('notEnoughArguments', 'Not enough arguments.')).catch(er => this.replyError(er));
178
+ message.reply(this.getMessage('notEnoughArguments', 'Not enough arguments.')).catch(er => this._replyError(er));
185
179
  }
186
180
  return;
187
181
  }
188
182
  }
189
183
  if (message.guild && !(0, permissions_1.botHasExecutePermissions)(message.guild, command.requiredBotPermissions)) {
190
184
  if (!command.halt || !(yield command.halt({ executeData, reason: 'MISSING_BOT_PERMISSIONS' }))) {
191
- message.reply(this.getMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this.replyError(er));
185
+ message.reply(this.getMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this._replyError(er));
192
186
  }
193
187
  return;
194
188
  }
@@ -199,12 +193,12 @@ class RecipleClient extends discord_js_1.Client {
199
193
  guild: message.guild,
200
194
  type: 'MESSAGE_COMMAND'
201
195
  };
202
- if (command.cooldown && !this.commandCooldowns.isCooledDown(userCooldown)) {
196
+ if (this.config.commands.messageCommand.enableCooldown && command.cooldown && !this.commandCooldowns.isCooledDown(userCooldown)) {
203
197
  this.commandCooldowns.add(Object.assign(Object.assign({}, userCooldown), { expireTime: Date.now() + command.cooldown }));
204
198
  }
205
- else if (command.cooldown) {
199
+ else if (this.config.commands.messageCommand.enableCooldown && command.cooldown) {
206
200
  if (!command.halt || !(yield command.halt(Object.assign({ executeData, reason: 'COOLDOWN' }, this.commandCooldowns.get(userCooldown))))) {
207
- yield message.reply(this.getMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this.replyError(er));
201
+ yield message.reply(this.getMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this._replyError(er));
208
202
  }
209
203
  return;
210
204
  }
@@ -220,7 +214,7 @@ class RecipleClient extends discord_js_1.Client {
220
214
  }
221
215
  }
222
216
  else if (!command.halt || !(yield command.halt({ executeData, reason: 'MISSING_MEMBER_PERMISSIONS' }))) {
223
- message.reply(this.getMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this.replyError(er));
217
+ message.reply(this.getMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this._replyError(er));
224
218
  }
225
219
  });
226
220
  }
@@ -245,7 +239,7 @@ class RecipleClient extends discord_js_1.Client {
245
239
  return;
246
240
  if (interaction.guild && (0, permissions_1.botHasExecutePermissions)(interaction.guild, command.requiredBotPermissions)) {
247
241
  if (!command.halt || !(yield command.halt({ executeData, reason: 'MISSING_BOT_PERMISSIONS' }))) {
248
- yield interaction.reply(this.getMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this.replyError(er));
242
+ yield interaction.reply(this.getMessage('insufficientBotPerms', 'Insufficient bot permissions.')).catch(er => this._replyError(er));
249
243
  }
250
244
  return;
251
245
  }
@@ -256,12 +250,12 @@ class RecipleClient extends discord_js_1.Client {
256
250
  guild: interaction.guild,
257
251
  type: 'INTERACTION_COMMAND'
258
252
  };
259
- if (command.cooldown && !this.commandCooldowns.isCooledDown(userCooldown)) {
253
+ if (this.config.commands.interactionCommand.enableCooldown && command.cooldown && !this.commandCooldowns.isCooledDown(userCooldown)) {
260
254
  this.commandCooldowns.add(Object.assign(Object.assign({}, userCooldown), { expireTime: Date.now() + command.cooldown }));
261
255
  }
262
- else if (command.cooldown) {
256
+ else if (this.config.commands.interactionCommand.enableCooldown && command.cooldown) {
263
257
  if (!command.halt || !(yield command.halt(Object.assign({ executeData, reason: 'COOLDOWN' }, this.commandCooldowns.get(userCooldown))))) {
264
- yield interaction.reply(this.getMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this.replyError(er));
258
+ yield interaction.reply(this.getMessage('cooldown', 'You cannot execute this command right now due to the cooldown.')).catch(er => this._replyError(er));
265
259
  }
266
260
  return;
267
261
  }
@@ -277,7 +271,7 @@ class RecipleClient extends discord_js_1.Client {
277
271
  }
278
272
  }
279
273
  else if (!command.halt || !(yield command.halt({ executeData, reason: 'MISSING_MEMBER_PERMISSIONS' }))) {
280
- yield interaction.reply(this.getMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this.replyError(er));
274
+ yield interaction.reply(this.getMessage('noPermissions', 'You do not have permission to use this command.')).catch(er => this._replyError(er));
281
275
  }
282
276
  });
283
277
  }
@@ -310,7 +304,7 @@ class RecipleClient extends discord_js_1.Client {
310
304
  /**
311
305
  * Emits the "recipleReplyError" event
312
306
  */
313
- replyError(error) {
307
+ _replyError(error) {
314
308
  this.emit('recipleReplyError', error);
315
309
  }
316
310
  /**
@@ -327,12 +321,12 @@ class RecipleClient extends discord_js_1.Client {
327
321
  if (command === null || command === void 0 ? void 0 : command.message) {
328
322
  if (!this.config.commands.messageCommand.replyOnError)
329
323
  return;
330
- yield command.message.reply(this.getMessage('error', 'An error occurred.')).catch(er => this.replyError(er));
324
+ yield command.message.reply(this.getMessage('error', 'An error occurred.')).catch(er => this._replyError(er));
331
325
  }
332
326
  else if (command === null || command === void 0 ? void 0 : command.interaction) {
333
327
  if (!this.config.commands.interactionCommand.replyOnError)
334
328
  return;
335
- yield command.interaction.followUp(this.getMessage('error', 'An error occurred.')).catch(er => this.replyError(er));
329
+ yield command.interaction.followUp(this.getMessage('error', 'An error occurred.')).catch(er => this._replyError(er));
336
330
  }
337
331
  });
338
332
  }
@@ -1,6 +1,7 @@
1
1
  import { Awaitable, CommandInteraction, PermissionResolvable } from 'discord.js';
2
- import { RecipleClient, RecipleHaltedCommandData } from '../RecipleClient';
2
+ import { RecipleHaltedCommandData } from '../../types/commands';
3
3
  import { SlashCommandBuilder } from '@discordjs/builders';
4
+ import { RecipleClient } from '../RecipleClient';
4
5
  export interface RecipleInteractionCommandExecuteData {
5
6
  interaction: CommandInteraction;
6
7
  builder: InteractionCommandBuilder;
@@ -1,8 +1,9 @@
1
1
  import { MessageCommandOptionBuilder } from './MessageCommandOptionBuilder';
2
- import { RecipleClient, RecipleHaltedCommandData } from '../RecipleClient';
3
2
  import { MessageCommandOptionManager } from '../MessageCommandOptionManager';
4
3
  import { Awaitable, Message, PermissionResolvable } from 'discord.js';
4
+ import { RecipleHaltedCommandData } from '../../types/commands';
5
5
  import { Command as CommandMessage } from 'fallout-utility';
6
+ import { RecipleClient } from '../RecipleClient';
6
7
  export interface RecipleMessageCommandExecuteData {
7
8
  message: Message;
8
9
  options: MessageCommandOptionManager;
@@ -1,8 +1,5 @@
1
- import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from './classes/builders/InteractionCommandBuilder';
2
- import { MessageCommandBuilder, RecipleMessageCommandExecuteData } from './classes/builders/MessageCommandBuilder';
1
+ import { RecipleCommandBuilders } from './types/builders';
3
2
  import { RecipleClient } from './classes/RecipleClient';
4
- export declare type RecipleCommandBuilders = MessageCommandBuilder | InteractionCommandBuilder;
5
- export declare type RecipleCommandBuildersExecuteData = RecipleInteractionCommandExecuteData | RecipleMessageCommandExecuteData;
6
3
  export declare type LoadedModules = {
7
4
  commands: RecipleCommandBuilders[];
8
5
  modules: RecipleModule[];
@@ -1,6 +1,6 @@
1
- import { RecipleCommandBuilders } from './modules';
2
- import { Config } from './classes/RecipleConfig';
3
1
  import { Guild, PermissionResolvable, Permissions } from 'discord.js';
2
+ import { RecipleCommandBuilders } from './types/builders';
3
+ import { Config } from './classes/RecipleConfig';
4
4
  /**
5
5
  * Check if the user has permissions to execute the given command name
6
6
  */
@@ -0,0 +1,4 @@
1
+ import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
+ import { MessageCommandBuilder, RecipleMessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
3
+ export declare type RecipleCommandBuilders = MessageCommandBuilder | InteractionCommandBuilder;
4
+ export declare type RecipleCommandBuildersExecuteData = RecipleInteractionCommandExecuteData | RecipleMessageCommandExecuteData;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ import { InteractionCommandBuilder, RecipleInteractionCommandExecuteData } from '../classes/builders/InteractionCommandBuilder';
2
+ import { RecipleMessageCommandExecuteData } from '../classes/builders/MessageCommandBuilder';
3
+ import { MessageCommandOptionManager } from '../classes/MessageCommandOptionManager';
4
+ import { CooledDownUser } from '../classes/CommandCooldownManager';
5
+ import { RecipleCommandBuilders } from '../types/builders';
6
+ export declare type CommandHaltReason<Builder extends RecipleCommandBuilders> = RecipleHaltedCommandData<Builder>["reason"];
7
+ export declare type RecipleHaltedCommandData<Builder extends RecipleCommandBuilders> = CommandErrorData<Builder> | CommandCooldownData<Builder> | CommandInvalidArguments<Builder> | CommandMissingArguments<Builder> | CommandMissingMemberPermissions<Builder> | CommandMissingBotPermissions<Builder>;
8
+ export interface CommandHaltBaseData<Builder extends RecipleCommandBuilders> {
9
+ executeData: Builder extends InteractionCommandBuilder ? RecipleInteractionCommandExecuteData : RecipleMessageCommandExecuteData;
10
+ }
11
+ export interface CommandErrorData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
12
+ reason: 'ERROR';
13
+ error: any;
14
+ }
15
+ export interface CommandCooldownData<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder>, CooledDownUser {
16
+ reason: 'COOLDOWN';
17
+ }
18
+ export interface CommandInvalidArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
19
+ reason: 'INVALID_ARGUMENTS';
20
+ invalidArguments: MessageCommandOptionManager;
21
+ }
22
+ export interface CommandMissingArguments<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
23
+ reason: 'MISSING_ARGUMENTS';
24
+ missingArguments: MessageCommandOptionManager;
25
+ }
26
+ export interface CommandMissingMemberPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
27
+ reason: 'MISSING_MEMBER_PERMISSIONS';
28
+ }
29
+ export interface CommandMissingBotPermissions<Builder extends RecipleCommandBuilders> extends CommandHaltBaseData<Builder> {
30
+ reason: 'MISSING_BOT_PERMISSIONS';
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "2.0.0-pre.1",
4
- "description": "A Discord.js bot",
3
+ "version": "2.0.1",
4
+ "description": "Handler for Discord.js",
5
5
  "author": "FalloutStudios",
6
- "homepage": "https://falloutstudios.github.io/Reciple",
6
+ "homepage": "https://reciple.js.org",
7
+ "bugs": {
8
+ "url": "https://github.com/FalloutStudios/reciple/issues"
9
+ },
7
10
  "license": "GPL-3.0",
8
11
  "main": "bin/index.js",
9
12
  "bin": {