@hyperneutrino/djs-lite 1.7.0 → 1.7.2

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/index.ts +9 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -47,7 +47,7 @@ type WrapperConfig<R extends Record<string, Handleable>> = {
47
47
  };
48
48
 
49
49
  /**
50
- * This is the type of `config.wrappers` in `loadCommands`. This type is exported so that you can expose the wrappers upstream if you are making a library
50
+ * This is the type of `config.wrappers` in {@link loadCommands}. This type is exported so that you can expose the wrappers upstream if you are making a library
51
51
  * surrounding this library.
52
52
  */
53
53
  export interface CommandWrappers extends WrapperConfig<{
@@ -58,7 +58,7 @@ export interface CommandWrappers extends WrapperConfig<{
58
58
  }> {}
59
59
 
60
60
  /**
61
- * This is the type of `config.wrappers` in `loadInteractions`. This type is exported so that you can expose the wrappers upstream if you are making a library
61
+ * This is the type of `config.wrappers` in {@link loadInteractions}. This type is exported so that you can expose the wrappers upstream if you are making a library
62
62
  * surrounding this library.
63
63
  */
64
64
  export interface InteractionWrappers extends WrapperConfig<{
@@ -72,7 +72,7 @@ export interface InteractionWrappers extends WrapperConfig<{
72
72
  }> {}
73
73
 
74
74
  /**
75
- * This is a union type of `CommandWrappers` and `InteractionWrappers` so you can expose all of them at once (since there is no overlap in the field names).
75
+ * This is a union type of {@link CommandWrappers} and {@link InteractionWrappers} so you can expose all of them at once (since there is no overlap in the field names).
76
76
  */
77
77
  export interface Wrappers extends CommandWrappers, InteractionWrappers {}
78
78
 
@@ -315,7 +315,9 @@ async function loadSubcommandsAndGroups(directory: string) {
315
315
  * @param directory The relative path (from your execution point) containing your command handlers.
316
316
  * @param config Command-related configuration values.
317
317
  * @param config.guildId The ID of the guild to which to set the commands.
318
- * @param config.wrappers A set of wrappers which transform all handler functions for each handler type.
318
+ * @param config.wrappers A set of wrappers which transform all handler functions for each handler type. This wrapper will be called on each of your configured
319
+ * handlers of the relevant type and must return another handler (i.e. it is a function that transforms its input parameter, which is itself a handler
320
+ * function). This is like middleware; use this for things like error handling, logging, etc.
319
321
  * @returns `commands`, the loaded command data (an array of objects).
320
322
  * @returns `slashCommandHandlers`, the map from each slash command name to its handler.
321
323
  * @returns `userCommandHandlers`, the map from each user context menu command name to its handler.
@@ -410,7 +412,9 @@ export async function loadCommands(client: Client<true>, directory: string, conf
410
412
  * @param directory The relative path (from your execution point) containing your interaction handlers.
411
413
  * @param config Interaction-related configuration values.
412
414
  * @param config.argumentSeparator The separator used to split custom IDs. This defaults to `:`.
413
- * @param config.wrappers A set of wrappers which transform all handler functions for each handler type.
415
+ * @param config.wrappers A set of wrappers which transform all handler functions for each handler type. This wrapper will be called on each of your configured
416
+ * handlers of the relevant type and must return another handler (i.e. it is a function that transforms its input parameter, which is itself a handler
417
+ * function). This is like middleware; use this for things like error handling, logging, etc.
414
418
  * @returns `modalHandlers`, the map from each modal submit handler's configuration file path to its handler function.
415
419
  * @returns `buttonHandlers`, the map from each button handler's configuration file path to its handler function.
416
420
  * @returns `stringSelectMenuHandlers`, the map from each string select menu handler's file path to its handler function.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperneutrino/djs-lite",
3
3
  "private": false,
4
- "version": "1.7.0",
4
+ "version": "1.7.2",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "devDependencies": {