popii-framework 0.6.1-beta.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 (177) hide show
  1. package/README.md +159 -0
  2. package/dist/cli/commands.d.ts +15 -0
  3. package/dist/cli/commands.d.ts.map +1 -0
  4. package/dist/cli/pages.d.ts +5 -0
  5. package/dist/cli/pages.d.ts.map +1 -0
  6. package/dist/cli/scaffold.d.ts +23 -0
  7. package/dist/cli/scaffold.d.ts.map +1 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +1710 -0
  11. package/dist/client.d.ts +40 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/define/command.d.ts +47 -0
  14. package/dist/define/command.d.ts.map +1 -0
  15. package/dist/define/event.d.ts +52 -0
  16. package/dist/define/event.d.ts.map +1 -0
  17. package/dist/define/snap.d.ts +55 -0
  18. package/dist/define/snap.d.ts.map +1 -0
  19. package/dist/define/task.d.ts +64 -0
  20. package/dist/define/task.d.ts.map +1 -0
  21. package/dist/handler/cache.d.ts +6 -0
  22. package/dist/handler/cache.d.ts.map +1 -0
  23. package/dist/handler/context.d.ts +3 -0
  24. package/dist/handler/context.d.ts.map +1 -0
  25. package/dist/handler/index.d.ts +8 -0
  26. package/dist/handler/index.d.ts.map +1 -0
  27. package/dist/handler/interaction.d.ts +4 -0
  28. package/dist/handler/interaction.d.ts.map +1 -0
  29. package/dist/handler/lock.d.ts +2 -0
  30. package/dist/handler/lock.d.ts.map +1 -0
  31. package/dist/handler/logger.d.ts +4 -0
  32. package/dist/handler/logger.d.ts.map +1 -0
  33. package/dist/handler/message.d.ts +4 -0
  34. package/dist/handler/message.d.ts.map +1 -0
  35. package/dist/handler/middleware.d.ts +5 -0
  36. package/dist/handler/middleware.d.ts.map +1 -0
  37. package/dist/index.d.ts +31 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +10464 -0
  40. package/dist/loader/fizz.d.ts +2 -0
  41. package/dist/loader/fizz.d.ts.map +1 -0
  42. package/dist/loader/index.d.ts +3 -0
  43. package/dist/loader/index.d.ts.map +1 -0
  44. package/dist/loader/locales.d.ts +2 -0
  45. package/dist/loader/locales.d.ts.map +1 -0
  46. package/dist/loader/middleware.d.ts +54 -0
  47. package/dist/loader/middleware.d.ts.map +1 -0
  48. package/dist/loader/snaps.d.ts +3 -0
  49. package/dist/loader/snaps.d.ts.map +1 -0
  50. package/dist/loader/tasks.d.ts +3 -0
  51. package/dist/loader/tasks.d.ts.map +1 -0
  52. package/dist/plugins/activity.d.ts +15 -0
  53. package/dist/plugins/activity.d.ts.map +1 -0
  54. package/dist/plugins/ai.d.ts +35 -0
  55. package/dist/plugins/ai.d.ts.map +1 -0
  56. package/dist/plugins/automod.d.ts +12 -0
  57. package/dist/plugins/automod.d.ts.map +1 -0
  58. package/dist/plugins/canvas.d.ts +75 -0
  59. package/dist/plugins/canvas.d.ts.map +1 -0
  60. package/dist/plugins/captcha.d.ts +20 -0
  61. package/dist/plugins/captcha.d.ts.map +1 -0
  62. package/dist/plugins/commandAnalytic.d.ts +8 -0
  63. package/dist/plugins/commandAnalytic.d.ts.map +1 -0
  64. package/dist/plugins/commandLogger.d.ts +13 -0
  65. package/dist/plugins/commandLogger.d.ts.map +1 -0
  66. package/dist/plugins/desk.d.ts +23 -0
  67. package/dist/plugins/desk.d.ts.map +1 -0
  68. package/dist/plugins/economy.d.ts +41 -0
  69. package/dist/plugins/economy.d.ts.map +1 -0
  70. package/dist/plugins/errorHandler.d.ts +8 -0
  71. package/dist/plugins/errorHandler.d.ts.map +1 -0
  72. package/dist/plugins/giveaway.d.ts +21 -0
  73. package/dist/plugins/giveaway.d.ts.map +1 -0
  74. package/dist/plugins/lastfm.d.ts +24 -0
  75. package/dist/plugins/lastfm.d.ts.map +1 -0
  76. package/dist/plugins/mongoose.d.ts +23 -0
  77. package/dist/plugins/mongoose.d.ts.map +1 -0
  78. package/dist/plugins/pay.d.ts +24 -0
  79. package/dist/plugins/pay.d.ts.map +1 -0
  80. package/dist/plugins/permissionGuard.d.ts +8 -0
  81. package/dist/plugins/permissionGuard.d.ts.map +1 -0
  82. package/dist/plugins/reload.d.ts +8 -0
  83. package/dist/plugins/reload.d.ts.map +1 -0
  84. package/dist/plugins/sqlite.d.ts +20 -0
  85. package/dist/plugins/sqlite.d.ts.map +1 -0
  86. package/dist/plugins/telemetry.d.ts +11 -0
  87. package/dist/plugins/telemetry.d.ts.map +1 -0
  88. package/dist/plugins/ui.d.ts +60 -0
  89. package/dist/plugins/ui.d.ts.map +1 -0
  90. package/dist/plugins/voice/player.d.ts +9 -0
  91. package/dist/plugins/voice/player.d.ts.map +1 -0
  92. package/dist/plugins/voice/resolver.d.ts +16 -0
  93. package/dist/plugins/voice/resolver.d.ts.map +1 -0
  94. package/dist/plugins/voice/setup.d.ts +11 -0
  95. package/dist/plugins/voice/setup.d.ts.map +1 -0
  96. package/dist/plugins/voice/sponsorblock.d.ts +17 -0
  97. package/dist/plugins/voice/sponsorblock.d.ts.map +1 -0
  98. package/dist/plugins/voice/state.d.ts +35 -0
  99. package/dist/plugins/voice/state.d.ts.map +1 -0
  100. package/dist/plugins/voice/types.d.ts +14 -0
  101. package/dist/plugins/voice/types.d.ts.map +1 -0
  102. package/dist/plugins/voice/utils.d.ts +14 -0
  103. package/dist/plugins/voice/utils.d.ts.map +1 -0
  104. package/dist/plugins/voice.d.ts +72 -0
  105. package/dist/plugins/voice.d.ts.map +1 -0
  106. package/dist/plugins/web/helpers.d.ts +17 -0
  107. package/dist/plugins/web/helpers.d.ts.map +1 -0
  108. package/dist/plugins/web/index.d.ts +16 -0
  109. package/dist/plugins/web/index.d.ts.map +1 -0
  110. package/dist/plugins/web/routes/auth.d.ts +3 -0
  111. package/dist/plugins/web/routes/auth.d.ts.map +1 -0
  112. package/dist/plugins/web/routes/dashboard.d.ts +3 -0
  113. package/dist/plugins/web/routes/dashboard.d.ts.map +1 -0
  114. package/dist/plugins/web/routes/database.d.ts +3 -0
  115. package/dist/plugins/web/routes/database.d.ts.map +1 -0
  116. package/dist/plugins/web/routes/locales.d.ts +3 -0
  117. package/dist/plugins/web/routes/locales.d.ts.map +1 -0
  118. package/dist/plugins/web/routes/members.d.ts +3 -0
  119. package/dist/plugins/web/routes/members.d.ts.map +1 -0
  120. package/dist/plugins/web/routes/metrics.d.ts +7 -0
  121. package/dist/plugins/web/routes/metrics.d.ts.map +1 -0
  122. package/dist/plugins/web/routes/music.d.ts +3 -0
  123. package/dist/plugins/web/routes/music.d.ts.map +1 -0
  124. package/dist/plugins/web/routes/servers.d.ts +3 -0
  125. package/dist/plugins/web/routes/servers.d.ts.map +1 -0
  126. package/dist/plugins/web/routes/tasks.d.ts +3 -0
  127. package/dist/plugins/web/routes/tasks.d.ts.map +1 -0
  128. package/dist/plugins/web/routes/ui-editor.d.ts +3 -0
  129. package/dist/plugins/web/routes/ui-editor.d.ts.map +1 -0
  130. package/dist/plugins/web/setup.d.ts +7 -0
  131. package/dist/plugins/web/setup.d.ts.map +1 -0
  132. package/dist/plugins/web/types.d.ts +60 -0
  133. package/dist/plugins/web/types.d.ts.map +1 -0
  134. package/dist/plugins/web/views/admin.d.ts +5 -0
  135. package/dist/plugins/web/views/admin.d.ts.map +1 -0
  136. package/dist/plugins/web/views/base.d.ts +13 -0
  137. package/dist/plugins/web/views/base.d.ts.map +1 -0
  138. package/dist/plugins/web/views/commands.d.ts +2 -0
  139. package/dist/plugins/web/views/commands.d.ts.map +1 -0
  140. package/dist/plugins/web/views/dashboard.d.ts +32 -0
  141. package/dist/plugins/web/views/dashboard.d.ts.map +1 -0
  142. package/dist/plugins/web/views/database.d.ts +2 -0
  143. package/dist/plugins/web/views/database.d.ts.map +1 -0
  144. package/dist/plugins/web/views/home.d.ts +2 -0
  145. package/dist/plugins/web/views/home.d.ts.map +1 -0
  146. package/dist/plugins/web/views/index.d.ts +16 -0
  147. package/dist/plugins/web/views/index.d.ts.map +1 -0
  148. package/dist/plugins/web/views/invite.d.ts +2 -0
  149. package/dist/plugins/web/views/invite.d.ts.map +1 -0
  150. package/dist/plugins/web/views/lastfm.d.ts +2 -0
  151. package/dist/plugins/web/views/lastfm.d.ts.map +1 -0
  152. package/dist/plugins/web/views/locales.d.ts +2 -0
  153. package/dist/plugins/web/views/locales.d.ts.map +1 -0
  154. package/dist/plugins/web/views/members.d.ts +6 -0
  155. package/dist/plugins/web/views/members.d.ts.map +1 -0
  156. package/dist/plugins/web/views/music.d.ts +5 -0
  157. package/dist/plugins/web/views/music.d.ts.map +1 -0
  158. package/dist/plugins/web/views/servers.d.ts +3 -0
  159. package/dist/plugins/web/views/servers.d.ts.map +1 -0
  160. package/dist/plugins/web/views/terminal.d.ts +2 -0
  161. package/dist/plugins/web/views/terminal.d.ts.map +1 -0
  162. package/dist/plugins/web/views/ui-editor.d.ts +2 -0
  163. package/dist/plugins/web/views/ui-editor.d.ts.map +1 -0
  164. package/dist/types.d.ts +671 -0
  165. package/dist/types.d.ts.map +1 -0
  166. package/dist/utils/error.d.ts +62 -0
  167. package/dist/utils/error.d.ts.map +1 -0
  168. package/dist/utils/help.d.ts +3 -0
  169. package/dist/utils/help.d.ts.map +1 -0
  170. package/dist/utils/logger.d.ts +1 -0
  171. package/dist/utils/logger.d.ts.map +1 -0
  172. package/dist/utils/sharding.d.ts +17 -0
  173. package/dist/utils/sharding.d.ts.map +1 -0
  174. package/dist/utils/testing.d.ts +42 -0
  175. package/dist/utils/testing.d.ts.map +1 -0
  176. package/dist/utils/testing.js +192 -0
  177. package/package.json +77 -0
@@ -0,0 +1,2 @@
1
+ export declare function loadFizz(baseDir: string): Promise<Map<string, Function>>;
2
+ //# sourceMappingURL=fizz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fizz.d.ts","sourceRoot":"","sources":["../../src/loader/fizz.ts"],"names":[],"mappings":"AAKA,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAsC9E"}
@@ -0,0 +1,3 @@
1
+ import type { PopiiCommandDefinition } from "../types";
2
+ export declare function loadCommands(baseDir: string, useFolderRouting?: boolean): Promise<Map<string, PopiiCommandDefinition>>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loader/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA6BvD,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,UAAO,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAiIzH"}
@@ -0,0 +1,2 @@
1
+ export declare function loadLocales(baseDir: string): Promise<Map<string, Record<string, string>>>;
2
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../src/loader/locales.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAkB/F"}
@@ -0,0 +1,54 @@
1
+ import type { PopiiMiddleware } from "../types";
2
+ export declare function loadMiddlewares(baseDir: string): Promise<PopiiMiddleware[]>;
3
+ /**
4
+ * Wraps a middleware function with strict TypeScript types.
5
+ *
6
+ * Middlewares run before every command and snap handler in the order they are
7
+ * loaded from `src/middlewares/` (alphabetically). Use them for auth checks,
8
+ * logging, injecting data into `pop.locals`, and other cross-cutting concerns.
9
+ *
10
+ * **Regular middleware** — `(pop, next)` — must call `next()` to continue the pipeline.
11
+ * **Error middleware** — `(err, pop, next)` — only runs when an earlier step throws.
12
+ * Popii detects error middlewares by function arity (`function.length === 3`).
13
+ * Always declare all three parameters explicitly.
14
+ *
15
+ * @category Core API
16
+ *
17
+ * @example Inject a database user into pop.locals
18
+ * ```ts
19
+ * // src/middlewares/01-load-user.ts
20
+ * import { middleware } from "popii";
21
+ *
22
+ * export default middleware(async (pop, next) => {
23
+ * const db = (pop.client as any).db;
24
+ * pop.locals.dbUser = db.query("SELECT * FROM users WHERE id = ?").get(pop.user.id)
25
+ * ?? { id: pop.user.id, balance: 0, premium: false };
26
+ * await next();
27
+ * });
28
+ * ```
29
+ *
30
+ * @example Block execution early (maintenance mode)
31
+ * ```ts
32
+ * import { middleware } from "popii";
33
+ *
34
+ * export default middleware(async (pop, next) => {
35
+ * if (process.env.MAINTENANCE === "true") {
36
+ * await pop.reply({ content: "The bot is under maintenance.", ephemeral: true });
37
+ * return; // do NOT call next()
38
+ * }
39
+ * await next();
40
+ * });
41
+ * ```
42
+ *
43
+ * @example Error-handling middleware (three explicit parameters required)
44
+ * ```ts
45
+ * import { middleware } from "popii";
46
+ *
47
+ * export default middleware(async (err, pop, next) => {
48
+ * pop.log.error("Unhandled command error:", err);
49
+ * await pop.reply({ content: "Something went wrong.", ephemeral: true }).catch(() => {});
50
+ * });
51
+ * ```
52
+ */
53
+ export declare function middleware<TState = any>(mw: PopiiMiddleware<TState>): PopiiMiddleware<TState>;
54
+ //# sourceMappingURL=middleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/loader/middleware.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAwBjF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,CAE7F"}
@@ -0,0 +1,3 @@
1
+ import type { PopiiComponentDefinition } from "../types";
2
+ export declare function loadSnaps(baseDir: string): Promise<Map<string | RegExp, PopiiComponentDefinition>>;
3
+ //# sourceMappingURL=snaps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snaps.d.ts","sourceRoot":"","sources":["../../src/loader/snaps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,wBAAwB,CAAC,CAAC,CA6CxG"}
@@ -0,0 +1,3 @@
1
+ import type { PopiiTaskDefinition } from "../types";
2
+ export declare function loadTasks(baseDir: string): Promise<Map<string, PopiiTaskDefinition>>;
3
+ //# sourceMappingURL=tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/loader/tasks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CA0B1F"}
@@ -0,0 +1,15 @@
1
+ import { ActivityType } from "discord.js";
2
+ import type { PopiiPlugin } from "../types";
3
+ export interface ActivityRotatorOptions {
4
+ intervalMs?: number;
5
+ activities: {
6
+ name: string;
7
+ type: ActivityType;
8
+ }[];
9
+ }
10
+ /**
11
+ * Automatically rotates the bot's rich presence status on a set interval.
12
+ * @category Plugins
13
+ */
14
+ export declare function activityRotatorPlugin(options: ActivityRotatorOptions): PopiiPlugin;
15
+ //# sourceMappingURL=activity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/plugins/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,YAAY,CAAA;KAAE,EAAE,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,WAAW,CAkBlF"}
@@ -0,0 +1,35 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ declare module "../types" {
3
+ interface Pop {
4
+ ai: {
5
+ generate(prompt: string): Promise<string>;
6
+ chat(history: {
7
+ role: "system" | "user" | "assistant";
8
+ content: string;
9
+ }[]): Promise<string>;
10
+ };
11
+ }
12
+ interface EventPop {
13
+ ai: {
14
+ generate(prompt: string): Promise<string>;
15
+ chat(history: {
16
+ role: "system" | "user" | "assistant";
17
+ content: string;
18
+ }[]): Promise<string>;
19
+ };
20
+ }
21
+ }
22
+ export interface PopiiAiOptions {
23
+ provider: "openai" | "gemini" | "anthropic";
24
+ apiKey: string;
25
+ model?: string;
26
+ systemPrompt?: string;
27
+ locale?: string;
28
+ }
29
+ /**
30
+ * Injects a powerful AI assistant using OpenAI or Google Gemini into the Pop context.
31
+ *
32
+ * @category Plugins
33
+ */
34
+ export declare function popiiAiPlugin(options: PopiiAiOptions): PopiiPlugin;
35
+ //# sourceMappingURL=ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/plugins/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,EAAE,EAAE;YACF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,EAAE;gBAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;SAC9F,CAAC;KACH;IACD,UAAU,QAAQ;QAChB,EAAE,EAAE;YACF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,EAAE;gBAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;SAC9F,CAAC;KACH;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,CA2GlE"}
@@ -0,0 +1,12 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface AutoModOptions {
3
+ action?: "delete" | "warn" | "both";
4
+ toxicityThreshold?: number;
5
+ spamThreshold?: number;
6
+ /** Max AI analysis calls per guild per minute. Defaults to 10. */
7
+ maxChecksPerMinute?: number;
8
+ /** Max AI analysis calls per user per minute. Defaults to 3. */
9
+ maxChecksPerUserPerMinute?: number;
10
+ }
11
+ export declare function autoModPlugin(options?: AutoModOptions): PopiiPlugin;
12
+ //# sourceMappingURL=automod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automod.d.ts","sourceRoot":"","sources":["../../src/plugins/automod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAGzD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAgBD,wBAAgB,aAAa,CAAC,OAAO,GAAE,cAAmB,GAAG,WAAW,CA4FvE"}
@@ -0,0 +1,75 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ import { AttachmentBuilder } from "discord.js";
3
+ export interface NowPlayingTrack {
4
+ title: string;
5
+ artist?: string;
6
+ duration?: string;
7
+ elapsed?: string;
8
+ progress?: number;
9
+ thumbnail?: string;
10
+ requestedBy?: string;
11
+ }
12
+ export interface NowPlayingCardOptions {
13
+ width?: number;
14
+ height?: number;
15
+ accentColor?: string;
16
+ }
17
+ declare module "../types" {
18
+ interface Pop {
19
+ canvas: {
20
+ create(width: number, height: number): Promise<CanvasBuilder>;
21
+ nowPlayingCard(track: NowPlayingTrack, opts?: NowPlayingCardOptions): Promise<AttachmentBuilder>;
22
+ };
23
+ }
24
+ }
25
+ /**
26
+ * Fluent canvas builder — wraps a 2D context with chainable drawing methods.
27
+ */
28
+ export declare class CanvasBuilder {
29
+ private _canvas;
30
+ private _ctx;
31
+ constructor(_canvas: any, _ctx: any);
32
+ fill(color: string): this;
33
+ rect(x: number, y: number, w: number, h: number, color: string, radius?: number): this;
34
+ outline(x: number, y: number, w: number, h: number, color: string, lineWidth?: number, radius?: number): this;
35
+ text(str: string, x: number, y: number, opts?: {
36
+ color?: string;
37
+ font?: string;
38
+ size?: number;
39
+ weight?: string;
40
+ align?: CanvasTextAlign;
41
+ baseline?: CanvasTextBaseline;
42
+ maxWidth?: number;
43
+ shadow?: {
44
+ color: string;
45
+ blur: number;
46
+ offsetX?: number;
47
+ offsetY?: number;
48
+ };
49
+ }): this;
50
+ /** Draws a string truncated with "…" to fit within maxWidth. Returns the string actually drawn. */
51
+ textTruncated(str: string, x: number, y: number, maxWidth: number, opts?: Parameters<CanvasBuilder["text"]>[3]): this;
52
+ image(src: string | Buffer, x: number, y: number, w: number, h: number, opts?: {
53
+ radius?: number;
54
+ opacity?: number;
55
+ filter?: string;
56
+ }): Promise<this>;
57
+ gradient(x: number, y: number, w: number, h: number, stops: {
58
+ offset: number;
59
+ color: string;
60
+ }[], direction?: "h" | "v"): this;
61
+ circle(cx: number, cy: number, r: number, color: string): this;
62
+ line(x1: number, y1: number, x2: number, y2: number, color: string, lineWidth?: number): this;
63
+ save(): this;
64
+ restore(): this;
65
+ /** Returns the raw CanvasRenderingContext2D for custom operations. */
66
+ raw(): any;
67
+ toBuffer(): Promise<Buffer>;
68
+ toAttachment(name?: string): Promise<AttachmentBuilder>;
69
+ }
70
+ /**
71
+ * Provides `pop.canvas` — a fluent image generation API backed by @napi-rs/canvas.
72
+ * @category Plugins
73
+ */
74
+ export declare function canvasPlugin(): PopiiPlugin;
75
+ //# sourceMappingURL=canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../src/plugins/canvas.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface CaptchaPluginOptions {
3
+ siteKey: string;
4
+ secretKey: string;
5
+ port?: number;
6
+ publicUrl?: string;
7
+ }
8
+ declare module "../types" {
9
+ interface Pop {
10
+ captcha: {
11
+ sendVerificationPanel(channelId: string): Promise<void>;
12
+ };
13
+ }
14
+ }
15
+ /**
16
+ * Injects a web-based CAPTCHA gate to securely verify members.
17
+ * @category Plugins
18
+ */
19
+ export declare function captchaPlugin(options: CaptchaPluginOptions): PopiiPlugin;
20
+ //# sourceMappingURL=captcha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"captcha.d.ts","sourceRoot":"","sources":["../../src/plugins/captcha.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAGzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,OAAO,EAAE;YACP,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;SACzD,CAAC;KACH;CACF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,WAAW,CAwExE"}
@@ -0,0 +1,8 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ /**
3
+ * Tracks command usage statistics and prints a summary on cleanup.
4
+ *
5
+ * @category Plugins
6
+ */
7
+ export declare function commandAnalyticPlugin(): PopiiPlugin;
8
+ //# sourceMappingURL=commandAnalytic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandAnalytic.d.ts","sourceRoot":"","sources":["../../src/plugins/commandAnalytic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,CAkCnD"}
@@ -0,0 +1,13 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface CommandLoggerOptions {
3
+ logExecution?: boolean;
4
+ logCompletion?: boolean;
5
+ logErrors?: boolean;
6
+ }
7
+ /**
8
+ * Logs execution, completion, and errors for all commands.
9
+ *
10
+ * @category Plugins
11
+ */
12
+ export declare function commandLoggerPlugin(options?: CommandLoggerOptions): PopiiPlugin;
13
+ //# sourceMappingURL=commandLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandLogger.d.ts","sourceRoot":"","sources":["../../src/plugins/commandLogger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,GAAG,WAAW,CAoCnF"}
@@ -0,0 +1,23 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ declare module "../types" {
3
+ interface Pop {
4
+ desk: {
5
+ sendPanel(channelId: string): Promise<void>;
6
+ closeTicket(): Promise<void>;
7
+ };
8
+ }
9
+ }
10
+ export interface PopiiDeskOptions {
11
+ categoryId?: string;
12
+ supportRoleId?: string;
13
+ panelTitle?: string;
14
+ panelMessage?: string;
15
+ transcriptChannelId?: string;
16
+ }
17
+ /**
18
+ * Installs "Popii Desk", a built-in interactive Ticket Support system.
19
+ *
20
+ * @category Plugins
21
+ */
22
+ export declare function deskPlugin(options?: PopiiDeskOptions): PopiiPlugin;
23
+ //# sourceMappingURL=desk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../src/plugins/desk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,IAAI,EAAE;YACJ,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5C,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;SAC9B,CAAC;KACH;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAwQtE"}
@@ -0,0 +1,41 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface EconomyPluginOptions {
3
+ xpPerMessage?: number | [number, number];
4
+ cooldownMs?: number;
5
+ currencyName?: string;
6
+ onLevelUp?: (userId: string, newLevel: number, msg: import("discord.js").Message) => void | Promise<void>;
7
+ }
8
+ declare module "../types" {
9
+ interface Pop {
10
+ economy: {
11
+ currencyName: string;
12
+ getProfile(userId: string): Promise<{
13
+ xp: number;
14
+ level: number;
15
+ balance: number;
16
+ last_daily: number;
17
+ } | null>;
18
+ addXp(userId: string, amount: number): Promise<boolean>;
19
+ addBalance(userId: string, amount: number): Promise<void>;
20
+ };
21
+ }
22
+ interface EventPop {
23
+ economy: {
24
+ currencyName: string;
25
+ getProfile(userId: string): Promise<{
26
+ xp: number;
27
+ level: number;
28
+ balance: number;
29
+ last_daily: number;
30
+ } | null>;
31
+ addXp(userId: string, amount: number): Promise<boolean>;
32
+ addBalance(userId: string, amount: number): Promise<void>;
33
+ };
34
+ }
35
+ }
36
+ /**
37
+ * Injects a powerful Economy and Leveling system into the bot.
38
+ * @category Plugins
39
+ */
40
+ export declare function economyPlugin(options?: EconomyPluginOptions): PopiiPlugin;
41
+ //# sourceMappingURL=economy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"economy.d.ts","sourceRoot":"","sources":["../../src/plugins/economy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,YAAY,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3G;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,OAAO,EAAE;YACP,YAAY,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAC;gBAAC,UAAU,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI,CAAC,CAAC;YAC/G,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;YACxD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;SAC3D,CAAC;KACH;IACD,UAAU,QAAQ;QAChB,OAAO,EAAE;YACP,YAAY,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAC;gBAAC,UAAU,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI,CAAC,CAAC;YAC/G,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;YACxD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;SAC3D,CAAC;KACH;CACF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,WAAW,CAuI7E"}
@@ -0,0 +1,8 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ /**
3
+ * Gracefully catches and handles PopiiErrors and unexpected exceptions.
4
+ *
5
+ * @category Plugins
6
+ */
7
+ export declare function errorHandlerPlugin(): PopiiPlugin;
8
+ //# sourceMappingURL=errorHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/plugins/errorHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,WAAW,CAuChD"}
@@ -0,0 +1,21 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface GiveawayPluginOptions {
3
+ }
4
+ declare module "../types" {
5
+ interface Pop {
6
+ giveaways: {
7
+ start(channelId: string, prize: string, winners: number, durationMs: number): Promise<void>;
8
+ };
9
+ }
10
+ interface EventPop {
11
+ giveaways: {
12
+ start(channelId: string, prize: string, winners: number, durationMs: number): Promise<void>;
13
+ };
14
+ }
15
+ }
16
+ /**
17
+ * Injects a robust Giveaway manager into the bot.
18
+ * @category Plugins
19
+ */
20
+ export declare function giveawayPlugin(options?: GiveawayPluginOptions): PopiiPlugin;
21
+ //# sourceMappingURL=giveaway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"giveaway.d.ts","sourceRoot":"","sources":["../../src/plugins/giveaway.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,qBAAqB;CAAG;AAEzC,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,SAAS,EAAE;YACT,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7F,CAAC;KACH;IACD,UAAU,QAAQ;QAChB,SAAS,EAAE;YACT,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7F,CAAC;KACH;CACF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,WAAW,CAyG/E"}
@@ -0,0 +1,24 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ declare module "../types" {
3
+ interface Pop {
4
+ lastfm: {
5
+ getAccount(userId: string): Promise<{
6
+ username: string;
7
+ sessionKey: string;
8
+ } | null>;
9
+ };
10
+ }
11
+ }
12
+ export interface PopiiLastFmOptions {
13
+ apiKey: string;
14
+ apiSecret: string;
15
+ scrobble?: boolean;
16
+ nowPlaying?: boolean;
17
+ }
18
+ /**
19
+ * Integrates Last.fm scrobbling and stats into the bot and dashboard.
20
+ *
21
+ * @category Plugins
22
+ */
23
+ export declare function lastFmPlugin(options: PopiiLastFmOptions): PopiiPlugin;
24
+ //# sourceMappingURL=lastfm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lastfm.d.ts","sourceRoot":"","sources":["../../src/plugins/lastfm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAKzD,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,MAAM,EAAE;YACN,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;gBAAE,QAAQ,EAAE,MAAM,CAAC;gBAAC,UAAU,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI,CAAC,CAAC;SACtF,CAAC;KACH;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA+DD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAsarE"}
@@ -0,0 +1,23 @@
1
+ import type mongoose from "mongoose";
2
+ import type { PopiiPlugin } from "../types";
3
+ declare module "../types" {
4
+ interface Pop {
5
+ mongoose: typeof mongoose;
6
+ }
7
+ interface EventPop {
8
+ mongoose: typeof mongoose;
9
+ }
10
+ interface PopiiClient {
11
+ mongoose: typeof mongoose;
12
+ }
13
+ }
14
+ export interface MongoosePluginOptions extends mongoose.ConnectOptions {
15
+ uri: string;
16
+ }
17
+ /**
18
+ * Injects a Mongoose database instance into the Pop context.
19
+ *
20
+ * @category Plugins
21
+ */
22
+ export declare function mongoosePlugin(options: MongoosePluginOptions): PopiiPlugin;
23
+ //# sourceMappingURL=mongoose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../src/plugins/mongoose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,QAAQ,EAAE,OAAO,QAAQ,CAAC;KAC3B;IACD,UAAU,QAAQ;QAChB,QAAQ,EAAE,OAAO,QAAQ,CAAC;KAC3B;IACD,UAAU,WAAW;QACnB,QAAQ,EAAE,OAAO,QAAQ,CAAC;KAC3B;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,QAAQ,CAAC,cAAc;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CA8B1E"}
@@ -0,0 +1,24 @@
1
+ import type { PopiiPlugin, PopiiClient } from "../types";
2
+ export interface PopiiPayOptions {
3
+ patreon?: {
4
+ webhookSecret: string;
5
+ port?: number;
6
+ path?: string;
7
+ onPledgeCreate?: (data: any, client: PopiiClient) => void | Promise<void>;
8
+ onPledgeUpdate?: (data: any, client: PopiiClient) => void | Promise<void>;
9
+ onPledgeDelete?: (data: any, client: PopiiClient) => void | Promise<void>;
10
+ };
11
+ kofi?: {
12
+ verificationToken: string;
13
+ port?: number;
14
+ path?: string;
15
+ onPayment?: (data: any, client: PopiiClient) => void | Promise<void>;
16
+ };
17
+ }
18
+ /**
19
+ * Integrates Patreon and Ko-fi monetization natively via secure Webhooks.
20
+ *
21
+ * @category Plugins
22
+ */
23
+ export declare function payPlugin(options: PopiiPayOptions): PopiiPlugin;
24
+ //# sourceMappingURL=pay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../../src/plugins/pay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1E,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1E,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC3E,CAAC;IACF,IAAI,CAAC,EAAE;QACL,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACtE,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CA2G/D"}
@@ -0,0 +1,8 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ /**
3
+ * Enforces permission checks for commands and components automatically.
4
+ *
5
+ * @category Plugins
6
+ */
7
+ export declare function permissionGuardPlugin(): PopiiPlugin;
8
+ //# sourceMappingURL=permissionGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissionGuard.d.ts","sourceRoot":"","sources":["../../src/plugins/permissionGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAIzD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,CAmDnD"}
@@ -0,0 +1,8 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ /**
3
+ * Adds a /reload command to gracefully reload all commands and events at runtime.
4
+ *
5
+ * @category Plugins
6
+ */
7
+ export declare function reloadPlugin(): PopiiPlugin;
8
+ //# sourceMappingURL=reload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reload.d.ts","sourceRoot":"","sources":["../../src/plugins/reload.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAuC,MAAM,UAAU,CAAC;AAEjF;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,WAAW,CAsE1C"}
@@ -0,0 +1,20 @@
1
+ import { Database } from "bun:sqlite";
2
+ import type { PopiiPlugin } from "../types";
3
+ declare module "../types" {
4
+ interface Pop {
5
+ db: Database;
6
+ }
7
+ interface EventPop {
8
+ db: Database;
9
+ }
10
+ }
11
+ export interface SQLitePluginOptions {
12
+ filename?: string;
13
+ }
14
+ /**
15
+ * Injects a blazing fast Bun SQLite database instance into the Pop context.
16
+ *
17
+ * @category Plugins
18
+ */
19
+ export declare function sqlitePlugin(options?: SQLitePluginOptions): PopiiPlugin;
20
+ //# sourceMappingURL=sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/plugins/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,GAAG;QACX,EAAE,EAAE,QAAQ,CAAC;KACd;IACD,UAAU,QAAQ;QAChB,EAAE,EAAE,QAAQ,CAAC;KACd;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,WAAW,CAqB3E"}
@@ -0,0 +1,11 @@
1
+ import type { PopiiPlugin } from "../types";
2
+ export interface TelemetryPluginOptions {
3
+ onCapture?: (error: Error, context: any) => void | Promise<void>;
4
+ }
5
+ /**
6
+ * Injects telemetry to capture rich context for errors.
7
+ *
8
+ * @category Plugins
9
+ */
10
+ export declare function telemetryPlugin(options?: TelemetryPluginOptions): PopiiPlugin;
11
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/plugins/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,UAAU,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,WAAW,CAqCjF"}