@seedcord/core 0.1.0-next.3 → 0.1.0-next.5

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.
@@ -1,44 +1,146 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_CustomId = require('./CustomId-DV7daU7r.cjs');
2
+ const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
3
+ const require_permissions = require('./permissions-DQL5ViZn.cjs');
4
+ require("reflect-metadata");
5
+ let _seedcord_errors = require("@seedcord/errors");
6
+ let _seedcord_errors_internal = require("@seedcord/errors/internal");
7
+ let discord_api_types_v10 = require("discord-api-types/v10");
8
+ let _discordjs_builders = require("@discordjs/builders");
9
+ let _seedcord_logger = require("@seedcord/logger");
10
+ let _seedcord_utils = require("@seedcord/utils");
11
+ let envapt = require("envapt");
12
+ let chalk = require("chalk");
13
+ chalk = require_rolldown_runtime.__toESM(chalk, 1);
3
14
 
4
15
  //#region src/gates/runGates.ts
5
16
  function routeIdOf(handlerCtor) {
6
- for (const [kind, key] of Object.entries(require_CustomId.InteractionRouteKeys)) {
17
+ for (const [kind, key] of Object.entries(require_permissions.InteractionRouteKeys)) {
7
18
  const routes = Reflect.getMetadata(key, handlerCtor);
8
19
  if (routes?.length) return `${kind}:${routes.join(",")}`;
9
20
  }
10
21
  return null;
11
22
  }
23
+ async function timedCheck(gate, ctx, observe) {
24
+ const start = performance.now();
25
+ try {
26
+ await require_permissions.runCheck(gate, ctx);
27
+ } finally {
28
+ observe(gate.name, performance.now() - start);
29
+ }
30
+ }
12
31
  /**
13
32
  * Runs each gate's check in order, so the first refusal propagates to the dispatcher boundary. An effect
14
- * gate's commit runs once the whole set passes.
33
+ * gate's commit runs once the whole set passes. When `observe` is given, each check is timed and reported,
34
+ * commits excluded.
15
35
  */
16
- async function runGates(gates, ctx) {
36
+ async function runGates(gates, ctx, observe) {
17
37
  try {
18
- for (const gate of gates) await require_CustomId.runCheck(gate, ctx);
19
- await require_CustomId.runCommits(ctx);
38
+ for (const gate of gates) await (observe ? timedCheck(gate, ctx, observe) : require_permissions.runCheck(gate, ctx));
39
+ await require_permissions.runCommits(ctx);
20
40
  } finally {
21
- require_CustomId.discardCommits(ctx);
41
+ require_permissions.discardCommits(ctx);
22
42
  }
23
43
  }
24
- async function runHandlerGates(handlerCtor, ctx) {
25
- const gates = Reflect.getMetadata(require_CustomId.GatedMetadataKey, handlerCtor);
44
+ async function runHandlerGates(handlerCtor, ctx, routeId, observe) {
45
+ const gates = Reflect.getMetadata(require_permissions.GatedMetadataKey, handlerCtor);
26
46
  if (!gates) return;
27
47
  await runGates(gates, {
28
48
  ...ctx,
29
- routeId: routeIdOf(handlerCtor)
30
- });
49
+ routeId: routeId ?? routeIdOf(handlerCtor)
50
+ }, observe);
51
+ }
52
+
53
+ //#endregion
54
+ //#region src/gates/slowGate.ts
55
+ const SLOW_GATE_MS = 750;
56
+ let gateLogger;
57
+ function logger() {
58
+ gateLogger ??= new _seedcord_logger.Logger("Gates");
59
+ return gateLogger;
60
+ }
61
+ function slowGateMonitor() {
62
+ if (envapt.Envapter.isProduction) return void 0;
63
+ const readings = [];
64
+ return {
65
+ observe: (name, ms) => readings.push({
66
+ name,
67
+ ms
68
+ }),
69
+ report(routeId) {
70
+ const total = readings.reduce((sum, reading) => sum + reading.ms, 0);
71
+ if (total < SLOW_GATE_MS) return;
72
+ const shares = readings.toSorted((a, b) => b.ms - a.ms).map((reading) => `${_seedcord_logger.paint.sky.bold(reading.name)} ${Math.round(reading.ms)}ms`);
73
+ const headline = `gates${routeId === null ? "" : ` for ${_seedcord_logger.paint.sky.bold(routeId)}`} took ${_seedcord_logger.paint.amber(`${Math.round(total)}ms`)} of the 3s ack budget`;
74
+ logger().utils.block(headline, shares, "warn", (text) => text);
75
+ }
76
+ };
31
77
  }
32
78
 
33
79
  //#endregion
34
- //#region src/customId/routing.ts
80
+ //#region src/hmr/devChannel.ts
81
+ let channel;
82
+ /** @internal */
83
+ function setDevChannel(next) {
84
+ channel = next;
85
+ }
86
+ /** @internal */
87
+ function getDevChannel() {
88
+ return channel;
89
+ }
90
+
91
+ //#endregion
92
+ //#region src/hmr/wrapHot.ts
35
93
  /**
36
- * The route decorators store a handler's customId definitions here so the component base can decode
37
- * against them at runtime.
94
+ * Wraps a raw vite hot object as a typed {@link DevChannel}.
38
95
  *
39
96
  * @internal
40
97
  */
41
- const ComponentDefsKey = Symbol("seedcord:customId:componentDefs");
98
+ function wrapHot(hot) {
99
+ return {
100
+ send: (event, data) => hot.send(event, data),
101
+ on: (event, cb) => hot.on(event, cb)
102
+ };
103
+ }
104
+
105
+ //#endregion
106
+ //#region src/hmr/HmrManager.ts
107
+ var HmrManager = class {
108
+ logger = new _seedcord_logger.Logger("HMR", { channel: "hmr" });
109
+ listeners = /* @__PURE__ */ new Set();
110
+ /** @internal */
111
+ init() {
112
+ if (!{}.hot) return;
113
+ const channel = wrapHot({}.hot);
114
+ setDevChannel(channel);
115
+ if (envapt.Envapter.isDevelopment || envapt.Envapter.isTest) {
116
+ this.logger.info("Enabled");
117
+ channel.on("seedcord:hmr", (payload) => {
118
+ const affected = payload.affectedModules?.length ?? 0;
119
+ this.logger.info(`${chalk.default.bold("1")} module changed, ${chalk.default.bold(affected)} affected modules`);
120
+ if (payload.affectedModules) this.logger.utils.list(payload.affectedModules.map((mod) => (0, _seedcord_utils.formatFilePath)(mod)), "Affected modules: ");
121
+ this.handleUpdate(payload);
122
+ });
123
+ }
124
+ }
125
+ /** @internal */
126
+ register(listener) {
127
+ this.listeners.add(listener);
128
+ }
129
+ /** @internal */
130
+ unregister(listener) {
131
+ this.listeners.delete(listener);
132
+ }
133
+ async handleUpdate(event) {
134
+ const promises = [...this.listeners].map(async (listener) => {
135
+ try {
136
+ await listener.onHmr(event);
137
+ } catch (error) {
138
+ this.logger.error(`Error handling HMR update in ${chalk.default.bold(listener.name)}: `, error);
139
+ }
140
+ });
141
+ await Promise.all(promises);
142
+ }
143
+ };
42
144
 
43
145
  //#endregion
44
146
  //#region src/pagination/cursor.ts
@@ -46,34 +148,424 @@ const PAGE_MAX = 1e6;
46
148
  const SLOT_MAX = 4;
47
149
  /** Build the page cursor for a paginator. */
48
150
  function pageCursor(prefix) {
49
- return new require_CustomId.CustomId(prefix).int("page", 0, PAGE_MAX).int("slot", 0, SLOT_MAX);
151
+ return new require_permissions.CustomId(prefix).int("page", 0, PAGE_MAX).int("slot", 0, SLOT_MAX);
152
+ }
153
+
154
+ //#endregion
155
+ //#region src/reply/flags.ts
156
+ /** IsComponentsV2 is unconditional, every framework reply is v2. */
157
+ function sendFlags(opts) {
158
+ let flags = discord_api_types_v10.MessageFlags.IsComponentsV2;
159
+ if (opts?.ephemeral ?? true) flags |= discord_api_types_v10.MessageFlags.Ephemeral;
160
+ if (opts?.silent) flags |= discord_api_types_v10.MessageFlags.SuppressNotifications;
161
+ return flags;
162
+ }
163
+ /** A deferral carries no content, so only Ephemeral applies. */
164
+ function deferFlags(opts) {
165
+ return opts?.ephemeral ?? true ? discord_api_types_v10.MessageFlags.Ephemeral : 0;
166
+ }
167
+
168
+ //#endregion
169
+ //#region src/reply/ackLegality.ts
170
+ const showModalReason = {
171
+ reason: "this interaction was already acknowledged",
172
+ alternative: "showModal() must be the initial response."
173
+ };
174
+ function deferReason(what) {
175
+ return {
176
+ reason: `this interaction was already acknowledged with ${what}`,
177
+ alternative: "A deferral can only be the initial response."
178
+ };
179
+ }
180
+ const ILLEGAL = {
181
+ reply: {
182
+ "deferred-reply": {
183
+ reason: "this interaction was already deferred",
184
+ alternative: "Use edit() to fill the deferred reply or followUp() for a new message."
185
+ },
186
+ "deferred-update": {
187
+ reason: "this interaction was already acknowledged with a deferred update",
188
+ alternative: "Use followUp() for a new message."
189
+ },
190
+ replied: {
191
+ reason: "this interaction was already replied to",
192
+ alternative: "Use followUp() for a new message or edit() to rewrite the reply."
193
+ }
194
+ },
195
+ defer: {
196
+ "deferred-reply": deferReason("a deferred reply"),
197
+ "deferred-update": deferReason("a deferred update"),
198
+ replied: deferReason("a reply")
199
+ },
200
+ deferUpdate: {
201
+ "deferred-reply": deferReason("a deferred reply"),
202
+ "deferred-update": deferReason("a deferred update"),
203
+ replied: deferReason("a reply")
204
+ },
205
+ update: {
206
+ "deferred-reply": {
207
+ reason: "this interaction was deferred as a reply",
208
+ alternative: "The placeholder is yours via edit(). update() rewrites a source message."
209
+ },
210
+ replied: {
211
+ reason: "this interaction was already replied to",
212
+ alternative: "update() rewrites a source message. Use edit() or followUp() instead."
213
+ }
214
+ },
215
+ followUp: { unacked: {
216
+ reason: "this interaction has not been acknowledged yet",
217
+ alternative: "Ack first with reply() or defer()."
218
+ } },
219
+ edit: { unacked: {
220
+ reason: "nothing has been sent yet",
221
+ alternative: "Send with reply() or defer() first, then edit() rewrites it."
222
+ } },
223
+ delete: { unacked: {
224
+ reason: "nothing has been sent yet",
225
+ alternative: "Acknowledge first with reply() or defer(), then delete() removes it."
226
+ } },
227
+ showModal: {
228
+ "deferred-reply": showModalReason,
229
+ "deferred-update": showModalReason,
230
+ replied: showModalReason
231
+ }
232
+ };
233
+ const SEND_TARGET = {
234
+ unacked: "reply",
235
+ "deferred-reply": "edit",
236
+ "deferred-update": "followUp",
237
+ replied: "followUp"
238
+ };
239
+ /** Throws before any API call. `ackedBy` becomes the throw cause, its stack points at the first ack. */
240
+ function checkAckLegality(method, state, routeId, ackedBy) {
241
+ if (method === "send") return;
242
+ const illegal = ILLEGAL[method][state];
243
+ if (!illegal) return;
244
+ throw new _seedcord_errors_internal.SeedcordError(_seedcord_errors.SeedcordErrorCode.ReplyIllegalAckState, [
245
+ method,
246
+ illegal.reason,
247
+ illegal.alternative,
248
+ routeId
249
+ ], { cause: ackedBy });
250
+ }
251
+ function sendTarget(state) {
252
+ return SEND_TARGET[state];
253
+ }
254
+
255
+ //#endregion
256
+ //#region src/reply/AckTrace.ts
257
+ /** The first ack's stack, passed as the throw cause so a double-ack points to both lines. */
258
+ var AckTrace = class extends Error {
259
+ constructor(method) {
260
+ super(`${method}() acknowledged this interaction`);
261
+ this.name = "AckTrace";
262
+ }
263
+ };
264
+
265
+ //#endregion
266
+ //#region src/reply/translateSerialization.ts
267
+ const MAX_DEPTH = 8;
268
+ const OPERATOR_WORD = {
269
+ "<=": "at most",
270
+ ">=": "at least",
271
+ "<": "fewer than",
272
+ ">": "more than"
273
+ };
274
+ const KIND_WORD = {
275
+ string: "a string",
276
+ number: "a number",
277
+ boolean: "a boolean",
278
+ bigint: "a bigint",
279
+ array: "a list",
280
+ tuple: "a list",
281
+ date: "a date",
282
+ object: "an object"
283
+ };
284
+ function asRecord(value) {
285
+ return typeof value === "object" && value !== null ? value : null;
286
+ }
287
+ function firstLine(message) {
288
+ if (typeof message !== "string") return "unknown validation failure";
289
+ return message.split("\n")[0] ?? message;
290
+ }
291
+ const GIVEN_PREVIEW_LIMIT = 40;
292
+ function gotPhrase(given) {
293
+ if (given === void 0) return "nothing";
294
+ if (given === null) return "null";
295
+ if (typeof given === "string") {
296
+ if (given.length === 0) return "an empty string";
297
+ if (given.length > GIVEN_PREVIEW_LIMIT) return `${given.length} characters`;
298
+ return JSON.stringify(given);
299
+ }
300
+ if (Array.isArray(given)) return given.length === 0 ? "an empty list" : `${given.length} items`;
301
+ if (typeof given === "number" || typeof given === "bigint" || typeof given === "boolean") return String(given);
302
+ if (typeof given === "object") return given.constructor?.name ?? "an object";
303
+ return typeof given;
304
+ }
305
+ function needPhrase(expected, given) {
306
+ const bounds = [...expected.matchAll(/expected(\.length)?\s*(<=|>=|<|>)\s*(\d+)/g)];
307
+ if (bounds.length === 0) return null;
308
+ return bounds.map(([, lengthPart, operator, limit]) => {
309
+ const word = OPERATOR_WORD[operator ?? ""] ?? operator ?? "";
310
+ if (!lengthPart) return `${word} ${limit}`;
311
+ const unit = typeof given === "string" ? "character" : "item";
312
+ return `${word} ${limit} ${Number(limit) === 1 ? unit : `${unit}s`}`;
313
+ }).join(" and ");
314
+ }
315
+ function instanceName(expected) {
316
+ if (typeof expected === "function" && expected.name) return expected.name;
317
+ return "specific class instance";
318
+ }
319
+ function describeLeaf(record) {
320
+ if (typeof record.constraint === "string") {
321
+ const need = typeof record.expected === "string" ? needPhrase(record.expected, record.given) : null;
322
+ if (need) return `need ${need}, got ${gotPhrase(record.given)}`;
323
+ return `${firstLine(record.message)}${"given" in record ? ` (got ${gotPhrase(record.given)})` : ""}`;
324
+ }
325
+ if (typeof record.expected === "function") return `need a ${instanceName(record.expected)}, got ${gotPhrase(record.given)}`;
326
+ if (typeof record.validator === "string") {
327
+ const kind = KIND_WORD[record.validator.replace(/^s\./, "").replace(/\(.*$/, "")];
328
+ if (kind) return `need ${kind}, got ${gotPhrase(record.given)}`;
329
+ return `${firstLine(record.message)}, got ${gotPhrase(record.given)}`;
330
+ }
331
+ return firstLine(record.message);
332
+ }
333
+ function describeUnion(branches, depth) {
334
+ const records = [];
335
+ for (const branch of branches) {
336
+ const record = asRecord(branch);
337
+ if (record) records.push(record);
338
+ }
339
+ const bounded = records.find((record) => typeof record.constraint === "string");
340
+ if (bounded) return describeLeaf(bounded);
341
+ const names = [];
342
+ let allInstances = records.length > 0;
343
+ for (const record of records) if (typeof record.expected === "function") names.push(instanceName(record.expected));
344
+ else allInstances = false;
345
+ if (allInstances) return `need a ${[...new Set(names)].join(" or ")}, got ${gotPhrase(records[0]?.given)}`;
346
+ return detailOf(branches[0], depth + 1);
347
+ }
348
+ function detailOf(value, depth) {
349
+ const record = asRecord(value);
350
+ if (!record || depth >= MAX_DEPTH) return firstLine(record?.message);
351
+ if (Array.isArray(record.errors) && record.errors.length > 0) {
352
+ const errors = record.errors;
353
+ const [first] = errors;
354
+ if (Array.isArray(first)) {
355
+ const [key, inner] = first;
356
+ return `${String(key)}: ${detailOf(inner, depth + 1)}`;
357
+ }
358
+ return describeUnion(errors, depth);
359
+ }
360
+ return describeLeaf(record);
50
361
  }
362
+ /**
363
+ * Translates a shapeshift throw into an actionable message, keeping the original as `cause`. Any other
364
+ * throw contributes its message as the detail.
365
+ */
366
+ function translateSerializationError(error, componentClass, index, routeId) {
367
+ const detail = detailOf(error, 0);
368
+ return new _seedcord_errors_internal.SeedcordError(_seedcord_errors.SeedcordErrorCode.ReplyComponentSerialization, [
369
+ componentClass,
370
+ index,
371
+ detail,
372
+ routeId
373
+ ], { cause: error });
374
+ }
375
+
376
+ //#endregion
377
+ //#region src/reply/serializeReply.ts
378
+ /** Wraps a string in a TextDisplay component. */
379
+ function serializeReply(response, routeId) {
380
+ if (typeof response === "string") try {
381
+ return { components: [new _discordjs_builders.TextDisplayBuilder().setContent(response).toJSON()] };
382
+ } catch (error) {
383
+ throw translateSerializationError(error, "TextDisplayBuilder", 0, routeId);
384
+ }
385
+ return {
386
+ components: response.components.map((component, index) => {
387
+ try {
388
+ return component.toJSON();
389
+ } catch (error) {
390
+ const name = component.constructor?.name;
391
+ throw translateSerializationError(error, !name || name === "Object" ? "component" : name, index, routeId);
392
+ }
393
+ }),
394
+ ...response.allowedMentions && { allowedMentions: response.allowedMentions },
395
+ ...response.files && { files: response.files }
396
+ };
397
+ }
398
+
399
+ //#endregion
400
+ //#region src/reply/BaseReplySender.ts
401
+ /**
402
+ * Tracks acknowledgement state and throws a translated `SeedcordError` on an illegal verb before any
403
+ * transport call. Verbs execute the legality check, control the transport wire writer, then update the
404
+ * state and ack trace. Each transport binds `TMessage` to its created-message lens and supplies the
405
+ * writers.
406
+ */
407
+ var BaseReplySender = class {
408
+ routeId;
409
+ state;
410
+ sent = /* @__PURE__ */ new Set();
411
+ ackedBy;
412
+ constructor(routeId, initialState = "unacked") {
413
+ this.routeId = routeId;
414
+ this.state = initialState;
415
+ }
416
+ async reply(response, opts) {
417
+ this.checkLegality("reply");
418
+ const created = await this.writeReply(response, opts);
419
+ this.transition("reply", "replied");
420
+ return this.remember(this.requireMessage(created, "reply"));
421
+ }
422
+ async defer(opts) {
423
+ this.checkLegality("defer");
424
+ await this.writeDefer(opts);
425
+ this.transition("defer", "deferred-reply");
426
+ }
427
+ async deferUpdate() {
428
+ this.checkLegality("deferUpdate");
429
+ await this.writeDeferUpdate();
430
+ this.transition("deferUpdate", "deferred-update");
431
+ }
432
+ /**
433
+ * After a deferUpdate the state stays deferred-update, so the rewrite repeats. The returned message
434
+ * is the source message, editable only through a bare `update` or `edit`. A targeted `edit` or `delete`
435
+ * of it throws the foreign-target error.
436
+ */
437
+ async update(response) {
438
+ this.checkLegality("update");
439
+ if (this.state === "deferred-update") return await this.editOriginal(response);
440
+ const created = await this.writeUpdate(response);
441
+ this.transition("update", "replied");
442
+ return this.remember(this.requireMessage(created, "update"));
443
+ }
444
+ async followUp(response, opts) {
445
+ this.checkLegality("followUp");
446
+ const created = await this.writeFollowUp(response, opts);
447
+ return this.remember(created);
448
+ }
449
+ async edit(targetOrResponse, maybeResponse) {
450
+ this.checkLegality("edit");
451
+ if (maybeResponse === void 0) return await this.editOriginal(targetOrResponse);
452
+ const target = targetOrResponse;
453
+ if (!this.sent.has(target.id)) throw new _seedcord_errors_internal.SeedcordError(_seedcord_errors.SeedcordErrorCode.ReplyForeignEditTarget, [
454
+ "edit",
455
+ target.id,
456
+ this.routeId
457
+ ]);
458
+ return this.remember(await this.writeEditTarget(target.id, maybeResponse));
459
+ }
460
+ async delete(target) {
461
+ this.checkLegality("delete");
462
+ if (target === void 0) {
463
+ await this.writeDeleteOriginal();
464
+ return;
465
+ }
466
+ if (!this.sent.has(target.id)) throw new _seedcord_errors_internal.SeedcordError(_seedcord_errors.SeedcordErrorCode.ReplyForeignEditTarget, [
467
+ "delete",
468
+ target.id,
469
+ this.routeId
470
+ ]);
471
+ await this.writeDeleteTarget(target.id);
472
+ this.sent.delete(target.id);
473
+ }
474
+ /** Routes to the verb the current ack state permits. Every state has a route, so the illegal-ack throw is unreachable. */
475
+ async send(response, opts) {
476
+ const target = sendTarget(this.state);
477
+ if (target === "reply") return await this.reply(response, opts);
478
+ if (target === "edit") return await this.edit(response);
479
+ return await this.followUp(response, opts);
480
+ }
481
+ /** Must be the initial response. */
482
+ async showModal(modal) {
483
+ this.checkLegality("showModal");
484
+ this.guardModalSource();
485
+ let data;
486
+ try {
487
+ data = modal.toJSON();
488
+ } catch (error) {
489
+ const name = modal.constructor?.name;
490
+ throw translateSerializationError(error, !name || name === "Object" ? "modal" : name, 0, this.routeId);
491
+ }
492
+ await this.writeModal(data);
493
+ this.transition("showModal", "replied");
494
+ }
495
+ serialize(response) {
496
+ return serializeReply(response, this.routeId);
497
+ }
498
+ remember(created) {
499
+ this.sent.add(created.id);
500
+ return created;
501
+ }
502
+ requireMessage(created, method) {
503
+ if (!created) throw new _seedcord_errors_internal.SeedcordError(_seedcord_errors.SeedcordErrorCode.ReplyCallbackMissingMessage, [method, this.routeId]);
504
+ return created;
505
+ }
506
+ async editOriginal(response) {
507
+ const edited = await this.writeEditOriginal(response);
508
+ if (this.state !== "deferred-update") this.remember(edited);
509
+ return edited;
510
+ }
511
+ checkLegality(method) {
512
+ checkAckLegality(method, this.state, this.routeId, this.ackedBy);
513
+ }
514
+ transition(method, state) {
515
+ this.state = state;
516
+ this.ackedBy = new AckTrace(method);
517
+ }
518
+ guardModalSource() {}
519
+ };
51
520
 
52
521
  //#endregion
53
- exports.CommandMetadataKey = require_CustomId.CommandMetadataKey;
54
- exports.ComponentDefsKey = ComponentDefsKey;
55
- exports.EventMetadataKey = require_CustomId.EventMetadataKey;
56
- exports.GateNotice = require_CustomId.GateNotice;
57
- exports.GatedMetadataKey = require_CustomId.GatedMetadataKey;
58
- exports.InteractionMetadataKey = require_CustomId.InteractionMetadataKey;
59
- exports.InteractionRouteKeys = require_CustomId.InteractionRouteKeys;
60
- exports.InteractionRoutes = require_CustomId.InteractionRoutes;
61
- exports.MiddlewareMetadataKey = require_CustomId.MiddlewareMetadataKey;
62
- exports.NeedsAny = require_CustomId.NeedsAny;
63
- exports.NotAllowed = require_CustomId.NotAllowed;
64
- exports.NotInDm = require_CustomId.NotInDm;
65
- exports.NotInGuild = require_CustomId.NotInGuild;
66
- exports.NotOwner = require_CustomId.NotOwner;
67
- exports.NoticeCard = require_CustomId.NoticeCard;
68
- exports.OnCooldown = require_CustomId.OnCooldown;
522
+ exports.AckTrace = AckTrace;
523
+ exports.BaseReplySender = BaseReplySender;
524
+ exports.CommandMetadataKey = require_permissions.CommandMetadataKey;
525
+ exports.ComponentDefsKey = require_permissions.ComponentDefsKey;
526
+ exports.EventMetadataKey = require_permissions.EventMetadataKey;
527
+ exports.GateNotice = require_permissions.GateNotice;
528
+ exports.GatedMetadataKey = require_permissions.GatedMetadataKey;
529
+ exports.HmrManager = HmrManager;
530
+ exports.InteractionMetadataKey = require_permissions.InteractionMetadataKey;
531
+ exports.InteractionRouteKeys = require_permissions.InteractionRouteKeys;
532
+ exports.InteractionRoutes = require_permissions.InteractionRoutes;
533
+ exports.MiddlewareMetadataKey = require_permissions.MiddlewareMetadataKey;
534
+ exports.MissingPermissions = require_permissions.MissingPermissions;
535
+ exports.MissingRole = require_permissions.MissingRole;
536
+ exports.NeedsAny = require_permissions.NeedsAny;
537
+ exports.NotAllowed = require_permissions.NotAllowed;
538
+ exports.NotInDm = require_permissions.NotInDm;
539
+ exports.NotInGuild = require_permissions.NotInGuild;
540
+ exports.NotOwner = require_permissions.NotOwner;
541
+ exports.NoticeCard = require_permissions.NoticeCard;
542
+ exports.OnCooldown = require_permissions.OnCooldown;
69
543
  exports.PAGE_MAX = PAGE_MAX;
70
- exports.SubscribeMetadataKey = require_CustomId.SubscribeMetadataKey;
71
- exports.decodeFor = require_CustomId.decodeFor;
544
+ exports.PermissionNames = require_permissions.PermissionNames;
545
+ exports.SubscribeMetadataKey = require_permissions.SubscribeMetadataKey;
546
+ exports.WebhookUrlMetadataKey = require_permissions.WebhookUrlMetadataKey;
547
+ exports.areRoutes = require_permissions.areRoutes;
548
+ exports.checkAckLegality = checkAckLegality;
549
+ exports.contextMenuRouteOf = require_permissions.contextMenuRouteOf;
550
+ exports.decodeComponentRoute = require_permissions.decodeComponentRoute;
551
+ exports.decodeFor = require_permissions.decodeFor;
552
+ exports.deferFlags = deferFlags;
553
+ exports.getDevChannel = getDevChannel;
72
554
  exports.pageCursor = pageCursor;
73
- exports.pickNotice = require_CustomId.pickNotice;
74
- exports.prefixOf = require_CustomId.prefixOf;
555
+ exports.pickNotice = require_permissions.pickNotice;
556
+ exports.prefixOf = require_permissions.prefixOf;
75
557
  exports.routeIdOf = routeIdOf;
76
558
  exports.runGates = runGates;
77
559
  exports.runHandlerGates = runHandlerGates;
78
- exports.setBotColor = require_CustomId.setBotColor;
560
+ exports.selectMenuRouteOf = require_permissions.selectMenuRouteOf;
561
+ exports.sendFlags = sendFlags;
562
+ exports.sendTarget = sendTarget;
563
+ exports.serializeReply = serializeReply;
564
+ exports.setBotColor = require_permissions.setBotColor;
565
+ exports.setDevChannel = setDevChannel;
566
+ exports.slowGateMonitor = slowGateMonitor;
567
+ exports.storeComponentRoute = require_permissions.storeComponentRoute;
568
+ exports.storeInteractionRoute = require_permissions.storeInteractionRoute;
569
+ exports.translateSerializationError = translateSerializationError;
570
+ exports.wrapHot = wrapHot;
79
571
  //# sourceMappingURL=internal.index.cjs.map