@hyperneutrino/djs-lite 0.0.1 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @hyperneutrino/djs-lite
2
+
3
+ Opinionated and super lightweight DJS wrapper. To use this, you'll want to create a commands and/or interactions folder.
4
+
5
+ ## Commands
6
+
7
+ The command loader will only check top-level files in your commands folder (i.e. it will not read recursively). The intention is for you to use subfolders for subcommands and route them manually and/or use subfolders for utility functions to keep your files clean.
8
+
9
+ Each file should export a `SlashCommand`, `UserCommand`, or `MessageCommand`. Each of these takes the command data object with an extra `handler` field. Builders aren't supported (like I said, this is opinionated, and I don't like builders).
10
+
11
+ ## Interactions
12
+
13
+ The interaction loader will check all files in your interactions folder (i.e. it will read recursively). Pick a separator for your interaction custom IDs (I use `:`). Then, you can use the following format for custom IDs: `:[user ID]:<file path>:[argument]:[argument]:...`. Interactions received with this format will be routed to the appropriate handler based on the file path (if found).
14
+
15
+ ## Initialization
16
+
17
+ To initialize, just use `loadCommands(client, "path/to/commands")` and/or `loadInteractions(client, "path/to/interactions")`. The only thing this wrapper does is make command and interaction loading/routing easy. Everything else is up to you to handle.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperneutrino/djs-lite",
3
3
  "private": false,
4
- "version": "0.0.1",
4
+ "version": "1.0.0",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "devDependencies": {