calabasas 0.3.2 → 0.3.3

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/dist/config.d.ts +35 -2
  2. package/package.json +1 -1
package/dist/config.d.ts CHANGED
@@ -9,12 +9,32 @@ export type SyncConfig = {
9
9
  };
10
10
 
11
11
  export type EventConfig = {
12
- [eventType: string]: true | string[];
12
+ [eventType: string]: true;
13
+ };
14
+
15
+ export type CommandOptionType = "string" | "integer" | "number" | "boolean" | "user" | "channel" | "role" | "mentionable" | "attachment";
16
+
17
+ export type CommandOption = {
18
+ name: string;
19
+ description: string;
20
+ type: CommandOptionType;
21
+ required?: boolean;
22
+ choices?: Array<{ name: string; value: string | number }>;
23
+ autocomplete?: boolean;
24
+ };
25
+
26
+ export type CommandDefinition = {
27
+ description: string;
28
+ options?: CommandOption[];
29
+ subcommands?: Record<string, { description: string; options?: CommandOption[] }>;
30
+ defaultMemberPermissions?: string;
31
+ dmPermission?: boolean;
13
32
  };
14
33
 
15
34
  export type CalabasasConfig = {
16
35
  sync?: SyncConfig;
17
36
  events?: EventConfig;
37
+ commands?: Record<string, CommandDefinition>;
18
38
  };
19
39
 
20
40
  /**
@@ -30,7 +50,20 @@ export type CalabasasConfig = {
30
50
  * channels: true,
31
51
  * },
32
52
  * events: {
33
- * messageCreate: ["id", "content", "author"],
53
+ * messageCreate: true,
54
+ * interactionCreate: true,
55
+ * },
56
+ * commands: {
57
+ * ping: {
58
+ * description: "Check bot latency",
59
+ * },
60
+ * ban: {
61
+ * description: "Ban a user",
62
+ * options: [
63
+ * { name: "user", type: "user", description: "User to ban", required: true },
64
+ * { name: "reason", type: "string", description: "Ban reason" },
65
+ * ],
66
+ * },
34
67
  * },
35
68
  * });
36
69
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "calabasas",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "CLI for Calabasas - Discord Gateway as a Service for Convex",
5
5
  "type": "module",
6
6
  "bin": {