@wolfstar/plugin-gateway 0.8.0-next-20260928174931 → 0.8.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.
package/dist/esm/index.js CHANGED
@@ -73,6 +73,8 @@ const GatewayErrorMessages = {
73
73
  ChannelTypeChanged: (channelId, from, to) => `Channel ${channelId} changed type from ${from} to ${to}`,
74
74
  ChannelLockPermissionsConflict: "Pass either lockPermissions or permissionOverwrites, not both",
75
75
  GuildChannelOrphan: (channelId) => `Channel ${channelId} has no category to sync its permissions with`,
76
+ GuildChannelUnknown: (guildId, channelId) => `Channel ${channelId} is not a channel of guild ${guildId}`,
77
+ GuildRoleUnknown: (guildId, roleId) => `Role ${roleId} is not a role of guild ${guildId}`,
76
78
  ThreadParentUnknown: (threadId) => `Thread ${threadId} has no known parent`,
77
79
  ThreadOwnerUnknown: (threadId) => `Thread ${threadId} has no known owner`,
78
80
  ThreadMemberIdsMissing: (action) => `A thread member without a thread or user ID cannot be ${action}`,
@@ -620,6 +622,61 @@ async function resolveImageOption(image) {
620
622
  return image === void 0 ? void 0 : resolveImage(image);
621
623
  }
622
624
 
625
+ //#endregion
626
+ //#region src/util/cache.ts
627
+ /**
628
+ * Whether an {@link Awaitable} is a promise, rather than the value itself.
629
+ *
630
+ * @internal
631
+ */
632
+ function isPromiseLike(value) {
633
+ return typeof value?.then === "function";
634
+ }
635
+ /**
636
+ * Waits for a list of {@link Awaitable}s like `Promise.all`, then calls a function with their values. Unlike
637
+ * `Promise.all`, it stays synchronous when none of them is a promise, which is what lets a synchronous cache build
638
+ * structures without awaiting them.
639
+ *
640
+ * @param values The values, some of which may be promises.
641
+ * @param callback The function to call with the values.
642
+ * @internal
643
+ */
644
+ function whenAll(values, callback) {
645
+ return values.some(isPromiseLike) ? Promise.all(values).then(callback) : callback(values);
646
+ }
647
+ /**
648
+ * Picks the cached structures of some IDs, in their order, skipping the ones that are not cached: the equivalent of
649
+ * the collections discord.js fills from its caches, e.g. `MessageMentions#channels`.
650
+ *
651
+ * @param ids The IDs.
652
+ * @param cached The cached structures, by ID.
653
+ * @internal
654
+ */
655
+ function pickCached(ids, cached) {
656
+ const picked = /* @__PURE__ */ new Map();
657
+ for (const id of ids) {
658
+ const value = cached?.get(id);
659
+ if (value) picked.set(id, value);
660
+ }
661
+ return picked;
662
+ }
663
+ /**
664
+ * Reads the cached structures of some IDs, synchronously when every read is, skipping duplicates and the IDs that
665
+ * are not cached. The {@link Awaitable} counterpart of discord.js's collections filled from its caches.
666
+ *
667
+ * @param ids The IDs.
668
+ * @param get Reads the structure of an ID.
669
+ * @internal
670
+ */
671
+ function whenCachedMap(ids, get) {
672
+ const unique = [...new Set(ids)];
673
+ return whenAll(unique.map(get), (values) => {
674
+ const map = /* @__PURE__ */ new Map();
675
+ for (const [index, value] of values.entries()) if (value) map.set(unique[index], value);
676
+ return map;
677
+ });
678
+ }
679
+
623
680
  //#endregion
624
681
  //#region src/util/Colors.ts
625
682
  /**
@@ -844,7 +901,7 @@ function discordSort(items) {
844
901
  function moveElementInArray(array, element, newIndex, offset = false) {
845
902
  const index = array.indexOf(element);
846
903
  const target = (offset ? index : 0) + newIndex;
847
- if (target > -1 && target < array.length) {
904
+ if (index > -1 && target > -1 && target < array.length) {
848
905
  const [removed] = array.splice(index, 1);
849
906
  array.splice(target, 0, removed);
850
907
  }
@@ -930,6 +987,67 @@ function resolveSKUId(resolvable) {
930
987
  if (isObject(resolvable) && typeof resolvable.id === "string") return resolvable.id;
931
988
  return null;
932
989
  }
990
+ /**
991
+ * Computes the positions to send to Discord to move a role or channel among its sorted siblings: the body discord.js's
992
+ * `setPosition` sends.
993
+ *
994
+ * @param id The ID of the role or channel to move.
995
+ * @param position The index to move it to, or the offset to move it by with `relative`.
996
+ * @param relative Whether `position` is relative to its current index.
997
+ * @param sorted The role or channel and its siblings, sorted with {@link discordSort}.
998
+ * @returns Every sibling, with its index as its new position.
999
+ * @internal
1000
+ */
1001
+ function computePositions(id, position, relative, sorted) {
1002
+ const ids = sorted.map((item) => item.id);
1003
+ moveElementInArray(ids, id, position, relative);
1004
+ return ids.map((itemId, index) => ({
1005
+ id: itemId,
1006
+ position: index
1007
+ }));
1008
+ }
1009
+ /**
1010
+ * Resolves the users, members, roles, and channels some data refers to into structures, like discord.js's
1011
+ * `transformResolved`. `client.messages` builds the relations of a message's `MessageMentions` with it.
1012
+ *
1013
+ * @remarks
1014
+ * Nothing is written to the cache. Synchronous when every cache it reads is.
1015
+ *
1016
+ * @param supportingData The client, and the guild of the members and roles.
1017
+ * @param data The IDs or raw data to resolve.
1018
+ * @returns A map for each kind of data given, keyed by ID, without duplicates nor the IDs that are not cached.
1019
+ */
1020
+ function transformResolved({ client, guildId }, { users, members, roles, channels }) {
1021
+ return whenAll([
1022
+ users && resolveEach(users, (id) => client.users._get(id), (raw) => client.users._resolveData(raw)),
1023
+ guildId && members ? resolveEach(members, (id) => client.members._get(guildId, id), (raw) => client.members._resolveData({
1024
+ ...raw,
1025
+ guild_id: guildId
1026
+ }), (raw) => raw.user.id) : void 0,
1027
+ guildId && roles ? resolveEach(roles, (id) => client.roles._get(guildId, id), (raw) => client.roles._resolveData({
1028
+ ...raw,
1029
+ guild_id: guildId
1030
+ })) : void 0,
1031
+ channels && resolveEach(channels, (id) => client.channels._get(id), (raw) => client.channels._resolveData(raw))
1032
+ ], ([resolvedUsers, resolvedMembers, resolvedRoles, resolvedChannels]) => {
1033
+ const result = {};
1034
+ if (resolvedUsers) result.users = resolvedUsers;
1035
+ if (resolvedMembers) result.members = resolvedMembers;
1036
+ if (resolvedRoles) result.roles = resolvedRoles;
1037
+ if (resolvedChannels) result.channels = resolvedChannels;
1038
+ return result;
1039
+ });
1040
+ }
1041
+ function resolveEach(entries, get, resolve, idOf = (raw) => raw.id) {
1042
+ const raws = /* @__PURE__ */ new Map();
1043
+ const ids = [];
1044
+ for (const entry of entries) if (typeof entry === "string") ids.push(entry);
1045
+ else raws.set(idOf(entry), entry);
1046
+ return whenCachedMap([...ids, ...raws.keys()], (id) => {
1047
+ const raw = raws.get(id);
1048
+ return raw ? resolve(raw) : get(id);
1049
+ });
1050
+ }
933
1051
 
934
1052
  //#endregion
935
1053
  //#region src/structures/messages/MessagePayload.ts
@@ -2284,20 +2402,16 @@ var ChannelPermissionMixin = class {
2284
2402
  return sameOverwrites(this[kData], parent.toJSON());
2285
2403
  }
2286
2404
  /**
2287
- * Moves the channel.
2405
+ * Moves the channel among the channels it is sorted with, like discord.js's `GuildChannel#setPosition`.
2288
2406
  *
2289
- * @param position The new position, or the offset from the current one with `relative`.
2407
+ * @param position The index to move it to among them, or the offset to move it by with `relative`.
2290
2408
  * @param options Whether the position is relative, and the reason for the audit log.
2291
2409
  */
2292
2410
  async setPosition(position, options = {}) {
2293
2411
  const { guild_id: guildId } = this[kData];
2294
2412
  if (!guildId) throw new GatewayError("ChannelGuildUnknown", this.id);
2295
- const target = options.relative ? this.position + position : position;
2296
- await this.client.guilds.channels(guildId).setPositions([{
2297
- channel: this.id,
2298
- position: target
2299
- }], options.reason);
2300
- return this[kPatch]({ position: target });
2413
+ const moved = await this.client.guilds.channels(guildId).setPosition(this.id, position, options);
2414
+ return this[kPatch]({ position: moved.toJSON().position });
2301
2415
  }
2302
2416
  /**
2303
2417
  * Moves the channel into a category, or out of its category.
@@ -3572,61 +3686,6 @@ var StageInstance = class extends StageInstance$1 {
3572
3686
  };
3573
3687
  Mixin(StageInstance, [StructureMixin]);
3574
3688
 
3575
- //#endregion
3576
- //#region src/util/cache.ts
3577
- /**
3578
- * Whether an {@link Awaitable} is a promise, rather than the value itself.
3579
- *
3580
- * @internal
3581
- */
3582
- function isPromiseLike(value) {
3583
- return typeof value?.then === "function";
3584
- }
3585
- /**
3586
- * Waits for a list of {@link Awaitable}s like `Promise.all`, then calls a function with their values. Unlike
3587
- * `Promise.all`, it stays synchronous when none of them is a promise, which is what lets a synchronous cache build
3588
- * structures without awaiting them.
3589
- *
3590
- * @param values The values, some of which may be promises.
3591
- * @param callback The function to call with the values.
3592
- * @internal
3593
- */
3594
- function whenAll(values, callback) {
3595
- return values.some(isPromiseLike) ? Promise.all(values).then(callback) : callback(values);
3596
- }
3597
- /**
3598
- * Picks the cached structures of some IDs, in their order, skipping the ones that are not cached: the equivalent of
3599
- * the collections discord.js fills from its caches, e.g. `MessageMentions#channels`.
3600
- *
3601
- * @param ids The IDs.
3602
- * @param cached The cached structures, by ID.
3603
- * @internal
3604
- */
3605
- function pickCached(ids, cached) {
3606
- const picked = /* @__PURE__ */ new Map();
3607
- for (const id of ids) {
3608
- const value = cached?.get(id);
3609
- if (value) picked.set(id, value);
3610
- }
3611
- return picked;
3612
- }
3613
- /**
3614
- * Reads the cached structures of some IDs, synchronously when every read is, skipping duplicates and the IDs that
3615
- * are not cached. The {@link Awaitable} counterpart of discord.js's collections filled from its caches.
3616
- *
3617
- * @param ids The IDs.
3618
- * @param get Reads the structure of an ID.
3619
- * @internal
3620
- */
3621
- function whenCachedMap(ids, get) {
3622
- const unique = [...new Set(ids)];
3623
- return whenAll(unique.map(get), (values) => {
3624
- const map = /* @__PURE__ */ new Map();
3625
- for (const [index, value] of values.entries()) if (value) map.set(unique[index], value);
3626
- return map;
3627
- });
3628
- }
3629
-
3630
3689
  //#endregion
3631
3690
  //#region src/managers/CachedManager.ts
3632
3691
  /**
@@ -6828,6 +6887,51 @@ var GuildChannelManager = class {
6828
6887
  await this.client.api.guilds.setChannelPositions(this.guildId, body, { reason });
6829
6888
  await this.fetch();
6830
6889
  }
6890
+ /**
6891
+ * Moves a channel among the channels it is sorted with, like discord.js's `GuildChannelManager#setPosition`: the
6892
+ * channels of its category (the categories, for a category) and of its group, text-like or voice.
6893
+ *
6894
+ * @param channel The channel, or its ID.
6895
+ * @param position The index to move it to, in {@link GuildChannelManager.fetchSorted} order, or the offset to move it
6896
+ * by with `relative`. An index out of range leaves the channels where they are.
6897
+ * @param options Whether the position is relative, and the reason for the audit log.
6898
+ * @returns The moved channel.
6899
+ */
6900
+ async setPosition(channel, position, options = {}) {
6901
+ const id = resolveId(channel);
6902
+ const sorted = await this.fetchSorted(id);
6903
+ const positions = computePositions(id, position, options.relative ?? false, sorted);
6904
+ await this.setPositions(positions.map((entry) => ({
6905
+ channel: entry.id,
6906
+ position: entry.position
6907
+ })), options.reason);
6908
+ return await this.client.channels.get(id);
6909
+ }
6910
+ /**
6911
+ * Fetches the channels a channel is sorted with, itself included, and caches them.
6912
+ *
6913
+ * @param channel The channel, or its ID.
6914
+ * @returns The channels, in the order Discord displays them.
6915
+ */
6916
+ async fetchSorted(channel) {
6917
+ const id = resolveId(channel);
6918
+ const channels = new Map((await this.fetch()).map((entry) => [entry.id, entry]));
6919
+ const raw = [...channels.values()].map((entry) => {
6920
+ const data = entry.toJSON();
6921
+ return {
6922
+ id: entry.id,
6923
+ type: data.type,
6924
+ position: data.position ?? 0,
6925
+ parent_id: data.parent_id
6926
+ };
6927
+ });
6928
+ const target = raw.find((entry) => entry.id === id);
6929
+ if (!target) throw new GatewayError("GuildChannelUnknown", this.guildId, id);
6930
+ const isCategory = target.type === ChannelType.GuildCategory;
6931
+ const types = getSortableGroupTypes(target.type);
6932
+ const siblings = raw.filter((entry) => types.includes(entry.type) && (isCategory || (entry.parent_id ?? null) === (target.parent_id ?? null)));
6933
+ return discordSort(siblings).map((entry) => channels.get(entry.id));
6934
+ }
6831
6935
  };
6832
6936
 
6833
6937
  //#endregion
@@ -11564,7 +11668,6 @@ var MessageManager = class extends CachedManager {
11564
11668
  }));
11565
11669
  }
11566
11670
  resolveMentions(data) {
11567
- const { client } = this;
11568
11671
  const { guild_id: guildId, content = "" } = data;
11569
11672
  const users = [
11570
11673
  ...data.mentions.map((user) => user.id),
@@ -11572,17 +11675,15 @@ var MessageManager = class extends CachedManager {
11572
11675
  ...data.referenced_message ? [data.referenced_message.author.id] : []
11573
11676
  ];
11574
11677
  const members = data.mentions.filter((user) => "member" in user).map((user) => user.id);
11575
- return whenAll([
11576
- whenCachedMap(users, (id) => client.users._get(id)),
11577
- guildId ? whenCachedMap(members, (id) => client.members._get(guildId, id)) : void 0,
11578
- guildId ? whenCachedMap(data.mention_roles, (id) => client.roles._get(guildId, id)) : void 0,
11579
- whenCachedMap(MessageMentions.parseIds(content, MessageMentions.ChannelsPattern), (id) => client.channels._get(id))
11580
- ], ([resolvedUsers, resolvedMembers, roles, channels]) => ({
11581
- users: resolvedUsers,
11582
- members: resolvedMembers,
11583
- roles,
11584
- channels
11585
- }));
11678
+ return transformResolved({
11679
+ client: this.client,
11680
+ guildId
11681
+ }, {
11682
+ users,
11683
+ members,
11684
+ roles: data.mention_roles,
11685
+ channels: MessageMentions.parseIds(content, MessageMentions.ChannelsPattern)
11686
+ });
11586
11687
  }
11587
11688
  resolveEmojis(guildId, data) {
11588
11689
  const ids = [...(data.reactions ?? []).map((reaction) => reaction.emoji.id), ...(data.poll?.answers ?? []).map((answer) => answer.poll_media.emoji?.id)].filter((id) => Boolean(id));
@@ -12010,16 +12111,13 @@ var Role = class extends Structure {
12010
12111
  });
12011
12112
  }
12012
12113
  /**
12013
- * Moves the role.
12114
+ * Moves the role among the roles of its guild, like discord.js's `Role#setPosition`.
12014
12115
  *
12015
- * @param position The new position.
12016
- * @param reason The reason for the audit log.
12116
+ * @param position The index to move it to, lowest role first, or the offset to move it by with `relative`.
12117
+ * @param options Whether the position is relative and the reason for the audit log, or the reason alone.
12017
12118
  */
12018
- async setPosition(position, reason) {
12019
- const updated = (await this.client.roles.setPositions(this.guildId, [{
12020
- role: this.id,
12021
- position
12022
- }], reason)).find((role) => role.id === this.id);
12119
+ async setPosition(position, options = {}) {
12120
+ const updated = (await this.client.roles.setPosition(this.guildId, this.id, position, options)).find((role) => role.id === this.id);
12023
12121
  return updated ? this[kPatch](updated.toJSON()) : this;
12024
12122
  }
12025
12123
  /**
@@ -12072,7 +12170,8 @@ var RoleManager = class extends CachedManager {
12072
12170
  */
12073
12171
  async fetchAll(guildId) {
12074
12172
  const roles = await this.client.api.guilds.getRoles(guildId);
12075
- return (await Promise.all(roles.map((role) => this.store(guildId, role)))).toSorted((a, b) => b.comparePositionTo(a));
12173
+ const structures = await Promise.all(roles.map((role) => this.store(guildId, role)));
12174
+ return discordSort(structures).toReversed();
12076
12175
  }
12077
12176
  /**
12078
12177
  * Fetches how many members each role of a guild has, `@everyone` excluded.
@@ -12117,18 +12216,24 @@ var RoleManager = class extends CachedManager {
12117
12216
  await this.cache?.delete(this.resolveKey(guildId, roleId));
12118
12217
  }
12119
12218
  /**
12120
- * Moves a role.
12219
+ * Moves a role among the roles of its guild, like discord.js's `RoleManager#setPosition`.
12121
12220
  *
12122
12221
  * @param guildId The ID of the guild.
12123
12222
  * @param roleId The ID of the role.
12124
- * @param position The new position.
12125
- * @param reason The reason for the audit log.
12223
+ * @param position The index to move it to, lowest role first, or the offset to move it by with `relative`. An index
12224
+ * out of range leaves the roles where they are.
12225
+ * @param options Whether the position is relative and the reason for the audit log, or the reason alone.
12226
+ * @returns Every role of the guild, highest first.
12126
12227
  */
12127
- async setPosition(guildId, roleId, position, reason) {
12128
- return this.setPositions(guildId, [{
12129
- role: roleId,
12130
- position
12131
- }], reason);
12228
+ async setPosition(guildId, roleId, position, options = {}) {
12229
+ const { relative = false, reason } = typeof options === "string" ? { reason: options } : options;
12230
+ const sorted = (await this.fetchAll(guildId)).toReversed();
12231
+ if (!sorted.some((role) => role.id === roleId)) throw new GatewayError("GuildRoleUnknown", guildId, roleId);
12232
+ const positions = computePositions(roleId, position, relative, sorted);
12233
+ return this.setPositions(guildId, positions.map((entry) => ({
12234
+ role: entry.id,
12235
+ position: entry.position
12236
+ })), reason);
12132
12237
  }
12133
12238
  /**
12134
12239
  * Moves several roles at once.
@@ -12144,7 +12249,8 @@ var RoleManager = class extends CachedManager {
12144
12249
  position
12145
12250
  }));
12146
12251
  const roles = await this.client.api.guilds.setRolePositions(guildId, body, { reason });
12147
- return (await Promise.all(roles.map((role) => this.store(guildId, role)))).toSorted((a, b) => b.comparePositionTo(a));
12252
+ const structures = await Promise.all(roles.map((role) => this.store(guildId, role)));
12253
+ return discordSort(structures).toReversed();
12148
12254
  }
12149
12255
  /**
12150
12256
  * Compares the positions of two roles.
@@ -14991,5 +15097,5 @@ function RegisterAsGatewayListener(event, options = {}) {
14991
15097
  }
14992
15098
 
14993
15099
  //#endregion
14994
- export { Action, ActionRow, ActionsManager, Activity, ActivityFlagsBitField, AnnouncementChannel, AnnouncementThreadChannel, AnonymousGuild, ApplicationFlagsBitField, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationActionExecution, AutoModerationRule, AutoModerationRuleManager, BaseChannel, BaseChannelMixin, BaseInvite, CachedManager as BaseManager, CachedManager, BitField, CategoryChannel, Channel, ChannelFlagsBitField, ChannelManager, ChannelMessageManager, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelThreadManager, ChannelThreadsMixin, ChannelTopicMixin, ChannelWebhooksMixin, CheckboxComponent, CheckboxGroupComponent, ClientUser, Colors, Component, ComponentMixin, ContainerComponent, DMChannel, DMChannelMixin, DispatchAction, DispatchHandlers, DispatchQueue, DispatchTimeoutError, Embed, Emoji, EventGatewayListener, FileComponent, FileUploadComponent, ForumChannel, GatewayClient, GatewayError, GatewayErrorCodes, GatewayErrorMessages, GatewayEvents, GatewayRangeError, GatewaySessionStoreError, GatewayTypeError, GroupDMChannel, GroupDMInvite, GroupDMMixin, Guild, GuildAuditLogsEntry, GuildBan, GuildBanManager, GuildChannelFields, GuildChannelManager, GuildChannelMixin, GuildEmoji, GuildEmojiManager, GuildEmojiRoleManager, GuildIntegrationManager, GuildInvite, GuildInviteManager, GuildManager, GuildMember, GuildMemberFlagsBitField, GuildMemberManager, GuildMemberRoleManager, GuildMembersRateLimitError, GuildMembersTimeoutError, GuildOnboarding, GuildOnboardingPrompt, GuildOnboardingPromptOption, GuildPreview, GuildScheduledEvent, GuildScheduledEventManager, GuildSoundboardSoundManager, GuildStickerManager, GuildTemplate, GuildTemplateManager, GuildTemplatesPattern, Integration, IntentsBitField, InteractiveButtonComponent, InviteGuild, InvitesPattern, LabelComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, Message, MessageFlagsBitField, MessageManager, MessageMentions, MessagePayload, MessageReaction, Mixin, MultiDispatchAction, MultiDispatchHandlers, NumberFlagsBitField, Partials, PermissionOverwriteManager, PermissionOverwrites, PermissionsBitField, Poll, PollAnswer, PremiumButtonComponent, Presence, PresenceManager, PrivateThreadChannel, PublicThreadChannel, RadioGroupComponent, ReactionEmoji, ReactionManager, ReactionUserManager, RegisterAsGatewayListener, RichPresenceAssets, Role, RoleFlagsBitField, RoleManager, RoleSelectMenuComponent, SectionComponent, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, StageInstanceManager, Sticker, StickerPack, StringSelectMenuComponent, Structure, StructureMixin, SystemChannelFlagsBitField, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMemberManager, ThreadChannelMixin, ThreadManager, ThreadMember, ThreadMemberManager, ThreadOnlyChannelMixin, ThumbnailComponent, Typing, UnfurledMediaItem, User, UserFlagsBitField, UserManager, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceState, VoiceStateManager, Webhook, WebhookManager, WebhookMixin, WelcomeScreen, Widget, WidgetMember, basename, bindClient, cleanCodeBlockContent, cleanContent, compareRolePositions, computeChannelPermissions, computeGuildPermissions, computePermissionsIn, computeTargetPermissions, createChannel, createComponent, createInvite, discordSort, dispatchPartition, findComponentByCustomId, findName, flatten, getGatewayClient, getSortableGroupTypes, initStructure, isDeepEqual, isThreadChannelType, kClient, kClone, kData, kPatch, kPatchRelations, kRelations, makeError, makePlainError, moveElementInArray, parseEmoji, parseWebhookURL, resolveBase64, resolveCode, resolveColor, resolveFile, resolveGuildTemplateCode, resolveId, resolveImage, resolveImageOption, resolveInviteCode, resolveOverwriteOptions, resolvePartialEmoji, resolveSKUId, snakeCase, snowflakeTimestamp, toAPIOverwrite, toChannelBody, toSnakeCase, transformAPIAuditLogChange, transformAPIAutoModerationAction, transformAPIAutoModerationRuleTriggerMetadata, transformAPIAvatarDecorationData, transformAPIChannelMention, transformAPIEmbedAsset, transformAPIEmbedAuthor, transformAPIEmbedFooter, transformAPIGuildDefaultReaction, transformAPIGuildForumTag, transformAPIGuildScheduledEventEntityMetadata, transformAPIGuildScheduledEventRecurrenceRule, transformAPIIncidentsData, transformAPIMessageActivity, transformAPIMessageCall, transformAPIMessageInteractionMetadata, transformAPIMessageReference, transformAPIRoleSubscriptionData, transformAPIRoleTags, transformAPIUserPrimaryGuild, transformAutoModerationAction, transformAutoModerationRuleTriggerMetadata, transformCollectibles, transformGuildDefaultReaction, transformGuildForumTag, transformGuildScheduledEventRecurrenceRule, verifyString };
15100
+ export { Action, ActionRow, ActionsManager, Activity, ActivityFlagsBitField, AnnouncementChannel, AnnouncementThreadChannel, AnonymousGuild, ApplicationFlagsBitField, AppliedTagsMixin, Attachment, AttachmentFlagsBitField, AutoModerationActionExecution, AutoModerationRule, AutoModerationRuleManager, BaseChannel, BaseChannelMixin, BaseInvite, CachedManager as BaseManager, CachedManager, BitField, CategoryChannel, Channel, ChannelFlagsBitField, ChannelManager, ChannelMessageManager, ChannelOwnerMixin, ChannelParentMixin, ChannelPermissionMixin, ChannelSelectMenuComponent, ChannelSlowmodeMixin, ChannelThreadManager, ChannelThreadsMixin, ChannelTopicMixin, ChannelWebhooksMixin, CheckboxComponent, CheckboxGroupComponent, ClientUser, Colors, Component, ComponentMixin, ContainerComponent, DMChannel, DMChannelMixin, DispatchAction, DispatchHandlers, DispatchQueue, DispatchTimeoutError, Embed, Emoji, EventGatewayListener, FileComponent, FileUploadComponent, ForumChannel, GatewayClient, GatewayError, GatewayErrorCodes, GatewayErrorMessages, GatewayEvents, GatewayRangeError, GatewaySessionStoreError, GatewayTypeError, GroupDMChannel, GroupDMInvite, GroupDMMixin, Guild, GuildAuditLogsEntry, GuildBan, GuildBanManager, GuildChannelFields, GuildChannelManager, GuildChannelMixin, GuildEmoji, GuildEmojiManager, GuildEmojiRoleManager, GuildIntegrationManager, GuildInvite, GuildInviteManager, GuildManager, GuildMember, GuildMemberFlagsBitField, GuildMemberManager, GuildMemberRoleManager, GuildMembersRateLimitError, GuildMembersTimeoutError, GuildOnboarding, GuildOnboardingPrompt, GuildOnboardingPromptOption, GuildPreview, GuildScheduledEvent, GuildScheduledEventManager, GuildSoundboardSoundManager, GuildStickerManager, GuildTemplate, GuildTemplateManager, GuildTemplatesPattern, Integration, IntentsBitField, InteractiveButtonComponent, InviteGuild, InvitesPattern, LabelComponent, LinkButtonComponent, MediaChannel, MediaGalleryComponent, MediaGalleryItem, MentionableSelectMenuComponent, Message, MessageFlagsBitField, MessageManager, MessageMentions, MessagePayload, MessageReaction, Mixin, MultiDispatchAction, MultiDispatchHandlers, NumberFlagsBitField, Partials, PermissionOverwriteManager, PermissionOverwrites, PermissionsBitField, Poll, PollAnswer, PremiumButtonComponent, Presence, PresenceManager, PrivateThreadChannel, PublicThreadChannel, RadioGroupComponent, ReactionEmoji, ReactionManager, ReactionUserManager, RegisterAsGatewayListener, RichPresenceAssets, Role, RoleFlagsBitField, RoleManager, RoleSelectMenuComponent, SectionComponent, SeparatorComponent, SoundboardSound, StageChannel, StageInstance, StageInstanceManager, Sticker, StickerPack, StringSelectMenuComponent, Structure, StructureMixin, SystemChannelFlagsBitField, TextChannel, TextChannelMixin, TextDisplayComponent, TextInputComponent, ThreadChannelMemberManager, ThreadChannelMixin, ThreadManager, ThreadMember, ThreadMemberManager, ThreadOnlyChannelMixin, ThumbnailComponent, Typing, UnfurledMediaItem, User, UserFlagsBitField, UserManager, UserSelectMenuComponent, VoiceChannel, VoiceChannelMixin, VoiceState, VoiceStateManager, Webhook, WebhookManager, WebhookMixin, WelcomeScreen, Widget, WidgetMember, basename, bindClient, cleanCodeBlockContent, cleanContent, compareRolePositions, computeChannelPermissions, computeGuildPermissions, computePermissionsIn, computePositions, computeTargetPermissions, createChannel, createComponent, createInvite, discordSort, dispatchPartition, findComponentByCustomId, findName, flatten, getGatewayClient, getSortableGroupTypes, initStructure, isDeepEqual, isThreadChannelType, kClient, kClone, kData, kPatch, kPatchRelations, kRelations, makeError, makePlainError, moveElementInArray, parseEmoji, parseWebhookURL, resolveBase64, resolveCode, resolveColor, resolveFile, resolveGuildTemplateCode, resolveId, resolveImage, resolveImageOption, resolveInviteCode, resolveOverwriteOptions, resolvePartialEmoji, resolveSKUId, snakeCase, snowflakeTimestamp, toAPIOverwrite, toChannelBody, toSnakeCase, transformAPIAuditLogChange, transformAPIAutoModerationAction, transformAPIAutoModerationRuleTriggerMetadata, transformAPIAvatarDecorationData, transformAPIChannelMention, transformAPIEmbedAsset, transformAPIEmbedAuthor, transformAPIEmbedFooter, transformAPIGuildDefaultReaction, transformAPIGuildForumTag, transformAPIGuildScheduledEventEntityMetadata, transformAPIGuildScheduledEventRecurrenceRule, transformAPIIncidentsData, transformAPIMessageActivity, transformAPIMessageCall, transformAPIMessageInteractionMetadata, transformAPIMessageReference, transformAPIRoleSubscriptionData, transformAPIRoleTags, transformAPIUserPrimaryGuild, transformAutoModerationAction, transformAutoModerationRuleTriggerMetadata, transformCollectibles, transformGuildDefaultReaction, transformGuildForumTag, transformGuildScheduledEventRecurrenceRule, transformResolved, verifyString };
14995
15101
  //# sourceMappingURL=index.js.map