oceanic.js 1.10.3-dev.c6c9f52 → 1.10.3-dev.ca8b6e8

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 (205) hide show
  1. package/dist/lib/Client.d.ts +99 -0
  2. package/dist/lib/Client.js +263 -0
  3. package/dist/lib/Constants.d.ts +1215 -0
  4. package/dist/lib/Constants.js +1513 -0
  5. package/dist/lib/gateway/Shard.d.ts +83 -0
  6. package/dist/lib/gateway/Shard.js +1621 -0
  7. package/dist/lib/gateway/ShardManager.d.ts +29 -0
  8. package/dist/lib/gateway/ShardManager.js +300 -0
  9. package/dist/lib/index.d.ts +84 -0
  10. package/dist/lib/index.js +168 -0
  11. package/dist/lib/rest/Bucket.d.ts +33 -0
  12. package/dist/lib/rest/Bucket.js +78 -0
  13. package/dist/lib/rest/DiscordHTTPError.d.ts +16 -0
  14. package/dist/lib/rest/DiscordHTTPError.js +65 -0
  15. package/dist/lib/rest/DiscordRESTError.d.ts +19 -0
  16. package/dist/lib/rest/DiscordRESTError.js +89 -0
  17. package/dist/lib/rest/OAuthHelper.d.ts +62 -0
  18. package/dist/lib/rest/OAuthHelper.js +183 -0
  19. package/dist/lib/rest/RESTManager.d.ts +42 -0
  20. package/dist/lib/rest/RESTManager.js +82 -0
  21. package/dist/lib/rest/RequestHandler.d.ts +28 -0
  22. package/dist/lib/rest/RequestHandler.js +313 -0
  23. package/dist/lib/rest/SequentialBucket.d.ts +25 -0
  24. package/dist/lib/rest/SequentialBucket.js +76 -0
  25. package/dist/lib/routes/Applications.d.ts +171 -0
  26. package/dist/lib/routes/Applications.js +447 -0
  27. package/dist/lib/routes/Channels.d.ts +408 -0
  28. package/dist/lib/routes/Channels.js +1160 -0
  29. package/dist/lib/routes/Guilds.d.ts +606 -0
  30. package/dist/lib/routes/Guilds.js +1669 -0
  31. package/dist/lib/routes/Interactions.d.ts +74 -0
  32. package/dist/lib/routes/Interactions.js +141 -0
  33. package/dist/lib/routes/Miscellaneous.d.ts +31 -0
  34. package/dist/lib/routes/Miscellaneous.js +69 -0
  35. package/dist/lib/routes/OAuth.d.ts +108 -0
  36. package/dist/lib/routes/OAuth.js +312 -0
  37. package/dist/lib/routes/Users.d.ts +32 -0
  38. package/dist/lib/routes/Users.js +59 -0
  39. package/dist/lib/routes/Webhooks.d.ts +128 -0
  40. package/dist/lib/routes/Webhooks.js +265 -0
  41. package/dist/lib/structures/AnnouncementChannel.d.ts +36 -0
  42. package/dist/lib/structures/AnnouncementChannel.js +47 -0
  43. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +18 -0
  44. package/dist/lib/structures/AnnouncementThreadChannel.js +27 -0
  45. package/dist/lib/structures/Application.d.ts +102 -0
  46. package/dist/lib/structures/Application.js +189 -0
  47. package/dist/lib/structures/ApplicationCommand.d.ts +74 -0
  48. package/dist/lib/structures/ApplicationCommand.js +141 -0
  49. package/dist/lib/structures/Attachment.d.ts +34 -0
  50. package/dist/lib/structures/Attachment.js +64 -0
  51. package/dist/lib/structures/AuditLogEntry.d.ts +25 -0
  52. package/dist/lib/structures/AuditLogEntry.js +53 -0
  53. package/dist/lib/structures/AutoModerationRule.d.ts +49 -0
  54. package/dist/lib/structures/AutoModerationRule.js +139 -0
  55. package/dist/lib/structures/AutocompleteInteraction.d.ts +62 -0
  56. package/dist/lib/structures/AutocompleteInteraction.js +115 -0
  57. package/dist/lib/structures/Base.d.ts +20 -0
  58. package/dist/lib/structures/Base.js +58 -0
  59. package/dist/lib/structures/BaseEntitlement.d.ts +19 -0
  60. package/dist/lib/structures/BaseEntitlement.js +44 -0
  61. package/dist/lib/structures/CategoryChannel.d.ts +41 -0
  62. package/dist/lib/structures/CategoryChannel.js +105 -0
  63. package/dist/lib/structures/Channel.d.ts +20 -0
  64. package/dist/lib/structures/Channel.js +91 -0
  65. package/dist/lib/structures/ClientApplication.d.ts +153 -0
  66. package/dist/lib/structures/ClientApplication.js +220 -0
  67. package/dist/lib/structures/CommandInteraction.d.ts +127 -0
  68. package/dist/lib/structures/CommandInteraction.js +297 -0
  69. package/dist/lib/structures/ComponentInteraction.d.ts +137 -0
  70. package/dist/lib/structures/ComponentInteraction.js +311 -0
  71. package/dist/lib/structures/Entitlement.d.ts +12 -0
  72. package/dist/lib/structures/Entitlement.js +26 -0
  73. package/dist/lib/structures/ExtendedUser.d.ts +26 -0
  74. package/dist/lib/structures/ExtendedUser.js +57 -0
  75. package/dist/lib/structures/ForumChannel.d.ts +11 -0
  76. package/dist/lib/structures/ForumChannel.js +19 -0
  77. package/dist/lib/structures/GroupChannel.d.ts +62 -0
  78. package/dist/lib/structures/GroupChannel.js +133 -0
  79. package/dist/lib/structures/Guild.d.ts +654 -0
  80. package/dist/lib/structures/Guild.js +1319 -0
  81. package/dist/lib/structures/GuildChannel.d.ts +34 -0
  82. package/dist/lib/structures/GuildChannel.js +75 -0
  83. package/dist/lib/structures/GuildPreview.d.ts +50 -0
  84. package/dist/lib/structures/GuildPreview.js +119 -0
  85. package/dist/lib/structures/GuildScheduledEvent.d.ts +60 -0
  86. package/dist/lib/structures/GuildScheduledEvent.js +154 -0
  87. package/dist/lib/structures/GuildTemplate.d.ts +55 -0
  88. package/dist/lib/structures/GuildTemplate.js +126 -0
  89. package/dist/lib/structures/Integration.d.ts +54 -0
  90. package/dist/lib/structures/Integration.js +156 -0
  91. package/dist/lib/structures/Interaction.d.ts +40 -0
  92. package/dist/lib/structures/Interaction.js +90 -0
  93. package/dist/lib/structures/InteractionResolvedChannel.d.ts +28 -0
  94. package/dist/lib/structures/InteractionResolvedChannel.js +45 -0
  95. package/dist/lib/structures/Invite.d.ts +64 -0
  96. package/dist/lib/structures/Invite.js +193 -0
  97. package/dist/lib/structures/InviteGuild.d.ts +52 -0
  98. package/dist/lib/structures/InviteGuild.js +88 -0
  99. package/dist/lib/structures/MediaChannel.d.ts +11 -0
  100. package/dist/lib/structures/MediaChannel.js +19 -0
  101. package/dist/lib/structures/Member.d.ts +122 -0
  102. package/dist/lib/structures/Member.js +255 -0
  103. package/dist/lib/structures/Message.d.ts +194 -0
  104. package/dist/lib/structures/Message.js +477 -0
  105. package/dist/lib/structures/ModalSubmitInteraction.d.ts +128 -0
  106. package/dist/lib/structures/ModalSubmitInteraction.js +240 -0
  107. package/dist/lib/structures/OAuthApplication.d.ts +79 -0
  108. package/dist/lib/structures/OAuthApplication.js +210 -0
  109. package/dist/lib/structures/OAuthGuild.d.ts +35 -0
  110. package/dist/lib/structures/OAuthGuild.js +61 -0
  111. package/dist/lib/structures/PartialApplication.d.ts +30 -0
  112. package/dist/lib/structures/PartialApplication.js +67 -0
  113. package/dist/lib/structures/Permission.d.ts +21 -0
  114. package/dist/lib/structures/Permission.js +68 -0
  115. package/dist/lib/structures/PermissionOverwrite.d.ts +26 -0
  116. package/dist/lib/structures/PermissionOverwrite.js +49 -0
  117. package/dist/lib/structures/PingInteraction.d.ts +16 -0
  118. package/dist/lib/structures/PingInteraction.js +26 -0
  119. package/dist/lib/structures/Poll.d.ts +28 -0
  120. package/dist/lib/structures/Poll.js +78 -0
  121. package/dist/lib/structures/PrivateChannel.d.ts +90 -0
  122. package/dist/lib/structures/PrivateChannel.js +131 -0
  123. package/dist/lib/structures/PrivateThreadChannel.d.ts +18 -0
  124. package/dist/lib/structures/PrivateThreadChannel.js +27 -0
  125. package/dist/lib/structures/PublicThreadChannel.d.ts +21 -0
  126. package/dist/lib/structures/PublicThreadChannel.js +37 -0
  127. package/dist/lib/structures/Role.d.ts +52 -0
  128. package/dist/lib/structures/Role.js +137 -0
  129. package/dist/lib/structures/SKU.d.ts +32 -0
  130. package/dist/lib/structures/SKU.js +53 -0
  131. package/dist/lib/structures/StageChannel.d.ts +33 -0
  132. package/dist/lib/structures/StageChannel.js +44 -0
  133. package/dist/lib/structures/StageInstance.d.ts +36 -0
  134. package/dist/lib/structures/StageInstance.js +94 -0
  135. package/dist/lib/structures/Team.d.ts +22 -0
  136. package/dist/lib/structures/Team.js +67 -0
  137. package/dist/lib/structures/TestEntitlement.d.ts +10 -0
  138. package/dist/lib/structures/TestEntitlement.js +21 -0
  139. package/dist/lib/structures/TextChannel.d.ts +34 -0
  140. package/dist/lib/structures/TextChannel.js +46 -0
  141. package/dist/lib/structures/TextableChannel.d.ts +158 -0
  142. package/dist/lib/structures/TextableChannel.js +276 -0
  143. package/dist/lib/structures/TextableVoiceChannel.d.ts +39 -0
  144. package/dist/lib/structures/TextableVoiceChannel.js +81 -0
  145. package/dist/lib/structures/ThreadChannel.d.ts +159 -0
  146. package/dist/lib/structures/ThreadChannel.js +295 -0
  147. package/dist/lib/structures/ThreadOnlyChannel.d.ts +99 -0
  148. package/dist/lib/structures/ThreadOnlyChannel.js +233 -0
  149. package/dist/lib/structures/ThreadableChannel.d.ts +36 -0
  150. package/dist/lib/structures/ThreadableChannel.js +58 -0
  151. package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
  152. package/dist/lib/structures/UnavailableGuild.js +21 -0
  153. package/dist/lib/structures/User.d.ts +82 -0
  154. package/dist/lib/structures/User.js +168 -0
  155. package/dist/lib/structures/VoiceChannel.d.ts +20 -0
  156. package/dist/lib/structures/VoiceChannel.js +35 -0
  157. package/dist/lib/structures/VoiceState.d.ts +51 -0
  158. package/dist/lib/structures/VoiceState.js +140 -0
  159. package/dist/lib/structures/Webhook.d.ts +129 -0
  160. package/dist/lib/structures/Webhook.js +206 -0
  161. package/dist/lib/types/applications.d.ts +466 -0
  162. package/dist/lib/types/audit-log.d.ts +122 -0
  163. package/dist/lib/types/auto-moderation.d.ts +99 -0
  164. package/dist/lib/types/channels.d.ts +1244 -0
  165. package/dist/lib/types/client.d.ts +228 -0
  166. package/dist/lib/types/events.d.ts +265 -0
  167. package/dist/lib/types/gateway-raw.d.ts +584 -0
  168. package/dist/lib/types/gateway.d.ts +351 -0
  169. package/dist/lib/types/guild-template.d.ts +33 -0
  170. package/dist/lib/types/guilds.d.ts +855 -0
  171. package/dist/lib/types/index.d.ts +18 -0
  172. package/dist/lib/types/interactions.d.ts +377 -0
  173. package/dist/lib/types/json.d.ts +742 -0
  174. package/dist/lib/types/misc.d.ts +28 -0
  175. package/dist/lib/types/oauth.d.ts +201 -0
  176. package/dist/lib/types/request-handler.d.ts +52 -0
  177. package/dist/lib/types/scheduled-events.d.ts +88 -0
  178. package/dist/lib/types/shared.d.ts +9 -0
  179. package/dist/lib/types/users.d.ts +45 -0
  180. package/dist/lib/types/voice.d.ts +45 -0
  181. package/dist/lib/types/webhooks.d.ts +74 -0
  182. package/dist/lib/util/Collection.d.ts +47 -0
  183. package/dist/lib/util/Collection.js +78 -0
  184. package/dist/lib/util/Errors.d.ts +29 -0
  185. package/dist/lib/util/Errors.js +56 -0
  186. package/dist/lib/util/Routes.d.ts +127 -0
  187. package/dist/lib/util/Routes.js +248 -0
  188. package/dist/lib/util/SimpleCollection.d.ts +12 -0
  189. package/dist/lib/util/SimpleCollection.js +81 -0
  190. package/dist/lib/util/TypedCollection.d.ts +24 -0
  191. package/dist/lib/util/TypedCollection.js +76 -0
  192. package/dist/lib/util/TypedEmitter.d.ts +19 -0
  193. package/dist/lib/util/TypedEmitter.js +19 -0
  194. package/dist/lib/util/Util.d.ts +58 -0
  195. package/dist/lib/util/Util.js +535 -0
  196. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +170 -0
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +213 -0
  198. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +24 -0
  199. package/dist/lib/util/interactions/MessageInteractionResponse.js +28 -0
  200. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +24 -0
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +34 -0
  202. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +60 -0
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +124 -0
  204. package/dist/package.json +1 -1
  205. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ /** @module TextableChannel */
2
+ import TextableChannel from "./TextableChannel";
3
+ import type PrivateThreadChannel from "./PrivateThreadChannel";
4
+ import type { ChannelTypes, ThreadAutoArchiveDuration } from "../Constants";
5
+ import type Client from "../Client";
6
+ import type { RawAnnouncementChannel, RawTextChannel } from "../types/channels";
7
+ import type { AnyTextableGuildChannel, AnyThreadChannel, ArchivedThreads, GetArchivedThreadsOptions, JSONThreadableChannel, StartThreadFromMessageOptions, StartThreadWithoutMessageOptions } from "../types";
8
+ import Collection from "../util/Collection";
9
+ /** Represents a guild textable channel. */
10
+ export default class ThreadableChannel<TC extends AnyTextableGuildChannel = AnyTextableGuildChannel, TH extends AnyThreadChannel = AnyThreadChannel> extends TextableChannel<TC> {
11
+ /** The default auto archive duration for threads created in this channel. */
12
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration;
13
+ /** The threads in this channel. */
14
+ type: ChannelTypes.GUILD_TEXT | ChannelTypes.GUILD_ANNOUNCEMENT;
15
+ constructor(data: RawTextChannel | RawAnnouncementChannel, client: Client);
16
+ protected update(data: Partial<RawTextChannel | RawAnnouncementChannel>): void;
17
+ /** The threads in this channel. The returned collection is disposable. */
18
+ get threads(): Collection<string, TH>;
19
+ /**
20
+ * Get the public archived threads in this channel.
21
+ * @param options The options for getting the public archived threads.
22
+ */
23
+ getPublicArchivedThreads(options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<Exclude<TH, PrivateThreadChannel>>>;
24
+ /**
25
+ * Create a thread from an existing message in this channel.
26
+ * @param messageID The ID of the message to create a thread from.
27
+ * @param options The options for creating the thread.
28
+ */
29
+ startThreadFromMessage(messageID: string, options: StartThreadFromMessageOptions): Promise<TH>;
30
+ /**
31
+ * Create a thread without an existing message in this channel.
32
+ * @param options The options for creating the thread.
33
+ */
34
+ startThreadWithoutMessage(options: StartThreadWithoutMessageOptions): Promise<TH>;
35
+ toJSON(): JSONThreadableChannel;
36
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module TextableChannel */
5
+ const TextableChannel_1 = tslib_1.__importDefault(require("./TextableChannel"));
6
+ const Collection_1 = tslib_1.__importDefault(require("../util/Collection"));
7
+ /** Represents a guild textable channel. */
8
+ class ThreadableChannel extends TextableChannel_1.default {
9
+ /** The default auto archive duration for threads created in this channel. */
10
+ defaultAutoArchiveDuration;
11
+ constructor(data, client) {
12
+ super(data, client);
13
+ this.defaultAutoArchiveDuration = data.default_auto_archive_duration;
14
+ this.update(data);
15
+ }
16
+ update(data) {
17
+ super.update(data);
18
+ if (data.default_auto_archive_duration !== undefined) {
19
+ this.defaultAutoArchiveDuration = data.default_auto_archive_duration;
20
+ }
21
+ }
22
+ /** The threads in this channel. The returned collection is disposable. */
23
+ get threads() {
24
+ return new Collection_1.default(this.guild.threads.filter(thread => thread.parentID === this.id).map(thread => [thread.id, thread]));
25
+ }
26
+ /**
27
+ * Get the public archived threads in this channel.
28
+ * @param options The options for getting the public archived threads.
29
+ */
30
+ async getPublicArchivedThreads(options) {
31
+ return this.client.rest.channels.getPublicArchivedThreads(this.id, options);
32
+ }
33
+ /**
34
+ * Create a thread from an existing message in this channel.
35
+ * @param messageID The ID of the message to create a thread from.
36
+ * @param options The options for creating the thread.
37
+ */
38
+ async startThreadFromMessage(messageID, options) {
39
+ return this.client.rest.channels.startThreadFromMessage(this.id, messageID, options);
40
+ }
41
+ /**
42
+ * Create a thread without an existing message in this channel.
43
+ * @param options The options for creating the thread.
44
+ */
45
+ async startThreadWithoutMessage(options) {
46
+ return this.client.rest.channels.startThreadWithoutMessage(this.id, options);
47
+ }
48
+ toJSON() {
49
+ return {
50
+ ...super.toJSON(),
51
+ defaultAutoArchiveDuration: this.defaultAutoArchiveDuration,
52
+ threads: this.threads.map(thread => thread.id),
53
+ type: this.type
54
+ };
55
+ }
56
+ }
57
+ exports.default = ThreadableChannel;
58
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhyZWFkYWJsZUNoYW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** @module UnavailableGuild */
2
+ import Base from "./Base";
3
+ import type Client from "../Client";
4
+ import type { RawUnavailableGuild } from "../types/guilds";
5
+ import type { JSONUnavailableGuild } from "../types/json";
6
+ /** Represents a guild that is unavailable. */
7
+ export default class UnavailableGuild extends Base {
8
+ unavailable: true;
9
+ constructor(data: RawUnavailableGuild, client: Client);
10
+ toJSON(): JSONUnavailableGuild;
11
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module UnavailableGuild */
5
+ const Base_1 = tslib_1.__importDefault(require("./Base"));
6
+ /** Represents a guild that is unavailable. */
7
+ class UnavailableGuild extends Base_1.default {
8
+ unavailable;
9
+ constructor(data, client) {
10
+ super(data.id, client);
11
+ this.unavailable = data.unavailable;
12
+ }
13
+ toJSON() {
14
+ return {
15
+ ...super.toJSON(),
16
+ unavailable: this.unavailable
17
+ };
18
+ }
19
+ }
20
+ exports.default = UnavailableGuild;
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVW5hdmFpbGFibGVHdWlsZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdHJ1Y3R1cmVzL1VuYXZhaWxhYmxlR3VpbGQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0JBQStCO0FBQy9CLDBEQUEwQjtBQUsxQiw4Q0FBOEM7QUFDOUMsTUFBcUIsZ0JBQWlCLFNBQVEsY0FBSTtJQUM5QyxXQUFXLENBQU87SUFDbEIsWUFBWSxJQUF5QixFQUFFLE1BQWM7UUFDakQsS0FBSyxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDdkIsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDO0lBQ3hDLENBQUM7SUFFUSxNQUFNO1FBQ1gsT0FBTztZQUNILEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRTtZQUNqQixXQUFXLEVBQUUsSUFBSSxDQUFDLFdBQVc7U0FDaEMsQ0FBQztJQUNOLENBQUM7Q0FDSjtBQWJELG1DQWFDIn0=
@@ -0,0 +1,82 @@
1
+ /** @module User */
2
+ import Base from "./Base";
3
+ import type PrivateChannel from "./PrivateChannel";
4
+ import type Entitlement from "./Entitlement";
5
+ import type TestEntitlement from "./TestEntitlement";
6
+ import { type ImageFormat } from "../Constants";
7
+ import type Client from "../Client";
8
+ import type { RawUser } from "../types/users";
9
+ import type { JSONUser } from "../types/json";
10
+ import type { SearchEntitlementsOptions } from "../types/applications";
11
+ /** Represents a user. */
12
+ export default class User extends Base {
13
+ /** The user's banner color. If this member was received via the gateway, this will never be present. */
14
+ accentColor?: number | null;
15
+ /** The user's avatar hash. */
16
+ avatar: string | null;
17
+ /** The hash of this user's avatar decoration. This will always resolve to a png. */
18
+ avatarDecoration?: string | null;
19
+ /** The user's banner hash. If this member was received via the gateway, this will never be present. */
20
+ banner?: string | null;
21
+ /** If this user is a bot. */
22
+ bot: boolean;
23
+ /** The 4 digits after this user's username, if they have not been migrated. If migrated, this will be a single "0". */
24
+ discriminator: string;
25
+ /** The user's display name, if set. */
26
+ globalName: string | null;
27
+ /** The user's public [flags](https://discord.com/developers/docs/resources/user#user-object-user-flags). */
28
+ publicFlags: number;
29
+ /** If this user is an official discord system user. */
30
+ system: boolean;
31
+ /** The user's username. */
32
+ username: string;
33
+ constructor(data: RawUser, client: Client);
34
+ protected update(data: Partial<RawUser>): void;
35
+ /** The default avatar value of this user. */
36
+ get defaultAvatar(): number;
37
+ /** If this user has migrated to the new username system. */
38
+ get isMigrated(): boolean;
39
+ /** A string that will mention this user. */
40
+ get mention(): string;
41
+ /** This user's unique username, if migrated, else a combination of the user's username and discriminator. */
42
+ get tag(): string;
43
+ /**
44
+ * The url of this user's avatar decoration. This will always be a png.
45
+ * Discord does not combine the decoration and their current avatar for you. This is ONLY the decoration.
46
+ * @note As of 12/8/2022 (Dec 8) `avatar_decoration` is only visible to bots if they set an `X-Super-Properties` header with a `client_build_number` ~162992. You can do this via the {@link Types/Client~RESTOptions#superProperties | rest.superProperties} option.
47
+ * @param size The dimensions of the image.
48
+ */
49
+ avatarDecorationURL(size?: number): string | null;
50
+ /**
51
+ * The url of this user's avatar (or default avatar, if they have not set an avatar).
52
+ * @param format The format the url should be.
53
+ * @param size The dimensions of the image.
54
+ */
55
+ avatarURL(format?: ImageFormat, size?: number): string;
56
+ /**
57
+ * The url of this user's banner.
58
+ * @param format The format the url should be.
59
+ * @param size The dimensions of the image.
60
+ */
61
+ bannerURL(format?: ImageFormat, size?: number): string | null;
62
+ /**
63
+ * Create a direct message with this user.
64
+ */
65
+ createDM(): Promise<PrivateChannel>;
66
+ /**
67
+ * Create a test entitlement for this user.
68
+ * @param skuID The ID of the SKU to create an entitlement for.
69
+ * @param applicationID The ID of the application to create the entitlement for. If present, defaults to the logged in client's application id.
70
+ */
71
+ createTestEntitlement(skuID: string, applicationID?: string): Promise<TestEntitlement>;
72
+ /**
73
+ * The url of this user's default avatar.
74
+ */
75
+ defaultAvatarURL(): string;
76
+ /**
77
+ * Get the entitlements for this guild.
78
+ * @param options The options for getting the entitlements.
79
+ */
80
+ getEntitlements(options?: Omit<SearchEntitlementsOptions, "userID">, applicationID?: string): Promise<Array<Entitlement | TestEntitlement>>;
81
+ toJSON(): JSONUser;
82
+ }
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module User */
5
+ const Base_1 = tslib_1.__importDefault(require("./Base"));
6
+ const Constants_1 = require("../Constants");
7
+ const Routes = tslib_1.__importStar(require("../util/Routes"));
8
+ const Errors_1 = require("../util/Errors");
9
+ /** Represents a user. */
10
+ class User extends Base_1.default {
11
+ /** The user's banner color. If this member was received via the gateway, this will never be present. */
12
+ accentColor;
13
+ /** The user's avatar hash. */
14
+ avatar;
15
+ /** The hash of this user's avatar decoration. This will always resolve to a png. */
16
+ avatarDecoration;
17
+ /** The user's banner hash. If this member was received via the gateway, this will never be present. */
18
+ banner;
19
+ /** If this user is a bot. */
20
+ bot;
21
+ /** The 4 digits after this user's username, if they have not been migrated. If migrated, this will be a single "0". */
22
+ discriminator;
23
+ /** The user's display name, if set. */
24
+ globalName;
25
+ /** The user's public [flags](https://discord.com/developers/docs/resources/user#user-object-user-flags). */
26
+ publicFlags;
27
+ /** If this user is an official discord system user. */
28
+ system;
29
+ /** The user's username. */
30
+ username;
31
+ constructor(data, client) {
32
+ super(data.id, client);
33
+ this.avatar = null;
34
+ this.bot = !!data.bot;
35
+ this.discriminator = data.discriminator;
36
+ this.globalName = data.global_name;
37
+ this.publicFlags = 0;
38
+ this.system = !!data.system;
39
+ this.username = data.username;
40
+ this.update(data);
41
+ }
42
+ update(data) {
43
+ if (data.accent_color !== undefined) {
44
+ this.accentColor = data.accent_color;
45
+ }
46
+ if (data.avatar !== undefined) {
47
+ this.avatar = data.avatar;
48
+ }
49
+ if (data.avatar_decoration !== undefined) {
50
+ this.avatarDecoration = data.avatar_decoration;
51
+ }
52
+ if (data.banner !== undefined) {
53
+ this.banner = data.banner;
54
+ }
55
+ if (data.discriminator !== undefined) {
56
+ this.discriminator = data.discriminator;
57
+ }
58
+ if (data.global_name !== undefined) {
59
+ this.globalName = data.global_name;
60
+ }
61
+ if (data.public_flags !== undefined) {
62
+ this.publicFlags = data.public_flags;
63
+ }
64
+ if (data.username !== undefined) {
65
+ this.username = data.username;
66
+ }
67
+ }
68
+ /** The default avatar value of this user. */
69
+ get defaultAvatar() {
70
+ if (this.isMigrated) {
71
+ return Number(BigInt(this.id) >> 22n) % 6;
72
+ }
73
+ return Number(this.discriminator) % 5;
74
+ }
75
+ /** If this user has migrated to the new username system. */
76
+ get isMigrated() {
77
+ return (this.discriminator === undefined || this.discriminator === "0");
78
+ }
79
+ /** A string that will mention this user. */
80
+ get mention() {
81
+ return `<@${this.id}>`;
82
+ }
83
+ /** This user's unique username, if migrated, else a combination of the user's username and discriminator. */
84
+ get tag() {
85
+ if (this.isMigrated) {
86
+ return this.username;
87
+ }
88
+ return `${this.username}#${this.discriminator}`;
89
+ }
90
+ /**
91
+ * The url of this user's avatar decoration. This will always be a png.
92
+ * Discord does not combine the decoration and their current avatar for you. This is ONLY the decoration.
93
+ * @note As of 12/8/2022 (Dec 8) `avatar_decoration` is only visible to bots if they set an `X-Super-Properties` header with a `client_build_number` ~162992. You can do this via the {@link Types/Client~RESTOptions#superProperties | rest.superProperties} option.
94
+ * @param size The dimensions of the image.
95
+ */
96
+ avatarDecorationURL(size) {
97
+ return this.avatarDecoration ? this.client.util.formatImage(Routes.USER_AVATAR_DECORATION(this.id, this.avatarDecoration), "png", size) : null;
98
+ }
99
+ /**
100
+ * The url of this user's avatar (or default avatar, if they have not set an avatar).
101
+ * @param format The format the url should be.
102
+ * @param size The dimensions of the image.
103
+ */
104
+ avatarURL(format, size) {
105
+ return this.avatar === null ? this.defaultAvatarURL() : this.client.util.formatImage(Routes.USER_AVATAR(this.id, this.avatar), format, size);
106
+ }
107
+ /**
108
+ * The url of this user's banner.
109
+ * @param format The format the url should be.
110
+ * @param size The dimensions of the image.
111
+ */
112
+ bannerURL(format, size) {
113
+ return this.banner ? this.client.util.formatImage(Routes.BANNER(this.id, this.banner), format, size) : null;
114
+ }
115
+ /**
116
+ * Create a direct message with this user.
117
+ */
118
+ async createDM() {
119
+ return this.client.rest.channels.createDM(this.id);
120
+ }
121
+ /**
122
+ * Create a test entitlement for this user.
123
+ * @param skuID The ID of the SKU to create an entitlement for.
124
+ * @param applicationID The ID of the application to create the entitlement for. If present, defaults to the logged in client's application id.
125
+ */
126
+ async createTestEntitlement(skuID, applicationID) {
127
+ if (applicationID === undefined && this.client["_application"] === undefined) {
128
+ throw new Errors_1.UncachedError("Client#application is not present, you must provide an applicationID as a second argument. To not need to provide an ID, only call this after at least one shard is READY, or restMode is enabled.");
129
+ }
130
+ return this.client.rest.applications.createTestEntitlement(applicationID ?? this.client.application.id, {
131
+ ownerID: this.id,
132
+ ownerType: Constants_1.EntitlementOwnerTypes.USER,
133
+ skuID
134
+ });
135
+ }
136
+ /**
137
+ * The url of this user's default avatar.
138
+ */
139
+ defaultAvatarURL() {
140
+ return this.client.util.formatImage(Routes.EMBED_AVATAR(this.defaultAvatar), "png");
141
+ }
142
+ /**
143
+ * Get the entitlements for this guild.
144
+ * @param options The options for getting the entitlements.
145
+ */
146
+ async getEntitlements(options, applicationID) {
147
+ if (applicationID === undefined && this.client["_application"] === undefined) {
148
+ throw new Errors_1.UncachedError("Client#application is not present, you must provide an applicationID as a second argument. To not need to provide an ID, only call this after at least one shard is READY, or restMode is enabled.");
149
+ }
150
+ return this.client.rest.applications.getEntitlements(applicationID ?? this.client.application.id, { userID: this.id, ...options });
151
+ }
152
+ toJSON() {
153
+ return {
154
+ ...super.toJSON(),
155
+ accentColor: this.accentColor,
156
+ avatar: this.avatar,
157
+ banner: this.banner,
158
+ bot: this.bot,
159
+ discriminator: this.discriminator,
160
+ globalName: this.globalName,
161
+ publicFlags: this.publicFlags,
162
+ system: this.system,
163
+ username: this.username
164
+ };
165
+ }
166
+ }
167
+ exports.default = User;
168
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdHJ1Y3R1cmVzL1VzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUJBQW1CO0FBQ25CLDBEQUEwQjtBQUkxQiw0Q0FBdUU7QUFDdkUsK0RBQXlDO0FBS3pDLDJDQUErQztBQUUvQyx5QkFBeUI7QUFDekIsTUFBcUIsSUFBSyxTQUFRLGNBQUk7SUFDbEMsd0dBQXdHO0lBQ3hHLFdBQVcsQ0FBaUI7SU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T0FBTyxFQUFFLENBQUMsQ0FBQztJQUN2SSxDQUFDO0lBRVEsTUFBTTtRQUNYLE9BQU87WUFDSCxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUU7WUFDakIsV0FBVyxFQUFJLElBQUksQ0FBQyxXQUFXO1lBQy9CLE1BQU0sRUFBUyxJQUFJLENBQUMsTUFBTTtZQUMxQixNQUFNLEVBQVMsSUFBSSxDQUFDLE1BQU07WUFDMUIsR0FBRyxFQUFZLElBQUksQ0FBQyxHQUFHO1lBQ3ZCLGFBQWEsRUFBRSxJQUFJLENBQUMsYUFBYTtZQUNqQyxVQUFVLEVBQUssSUFBSSxDQUFDLFVBQVU7WUFDOUIsV0FBVyxFQUFJLElBQUksQ0FBQyxXQUFXO1lBQy9CLE1BQU0sRUFBUyxJQUFJLENBQUMsTUFBTTtZQUMxQixRQUFRLEVBQU8sSUFBSSxDQUFDLFFBQVE7U0FDL0IsQ0FBQztJQUNOLENBQUM7Q0FDSjtBQXpLRCx1QkF5S0MifQ==
@@ -0,0 +1,20 @@
1
+ /** @module VoiceChannel */
2
+ import TextableVoiceChannel from "./TextableVoiceChannel";
3
+ import type { ChannelTypes } from "../Constants";
4
+ import type Client from "../Client";
5
+ import type { RawVoiceChannel } from "../types/channels";
6
+ import type { JSONVoiceChannel } from "../types/json";
7
+ /** Represents a guild voice channel. */
8
+ export default class VoiceChannel extends TextableVoiceChannel<VoiceChannel> {
9
+ /** The status of this voice channel. */
10
+ status: string | null;
11
+ type: ChannelTypes.GUILD_VOICE;
12
+ constructor(data: RawVoiceChannel, client: Client);
13
+ protected update(data: Partial<RawVoiceChannel>): void;
14
+ /**
15
+ * Set a voice status in this channel.
16
+ * @param status The voice status to set.
17
+ */
18
+ setStatus(status: string | null): Promise<void>;
19
+ toJSON(): JSONVoiceChannel;
20
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module VoiceChannel */
5
+ const TextableVoiceChannel_1 = tslib_1.__importDefault(require("./TextableVoiceChannel"));
6
+ /** Represents a guild voice channel. */
7
+ class VoiceChannel extends TextableVoiceChannel_1.default {
8
+ /** The status of this voice channel. */
9
+ status;
10
+ constructor(data, client) {
11
+ super(data, client);
12
+ this.status = null;
13
+ this.update(data);
14
+ }
15
+ update(data) {
16
+ this.status = data.status ?? null;
17
+ super.update(data);
18
+ }
19
+ /**
20
+ * Set a voice status in this channel.
21
+ * @param status The voice status to set.
22
+ */
23
+ async setStatus(status) {
24
+ return this.client.rest.channels.setVoiceStatus(this.id, status);
25
+ }
26
+ toJSON() {
27
+ return {
28
+ ...super.toJSON(),
29
+ status: this.status,
30
+ type: this.type
31
+ };
32
+ }
33
+ }
34
+ exports.default = VoiceChannel;
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVm9pY2VDaGFubmVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3N0cnVjdHVyZXMvVm9pY2VDaGFubmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJCQUEyQjtBQUMzQiwwRkFBMEQ7QUFNMUQsd0NBQXdDO0FBQ3hDLE1BQXFCLFlBQWEsU0FBUSw4QkFBa0M7SUFDeEUsd0NBQXdDO0lBQ3hDLE1BQU0sQ0FBZ0I7SUFFdEIsWUFBWSxJQUFxQixFQUFFLE1BQWM7UUFDN0MsS0FBSyxDQUFDLElBQUksRUFBRSxNQUFNLENBQUMsQ0FBQztRQUNwQixJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQztRQUNuQixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3RCLENBQUM7SUFFa0IsTUFBTSxDQUFDLElBQThCO1FBQ3BELElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sSUFBSSxJQUFJLENBQUM7UUFDbEMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN2QixDQUFDO0lBRUQ7OztPQUdHO0lBQ0gsS0FBSyxDQUFDLFNBQVMsQ0FBQyxNQUFxQjtRQUNqQyxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLEVBQUUsRUFBRSxNQUFNLENBQUMsQ0FBQztJQUNyRSxDQUFDO0lBRVEsTUFBTTtRQUNYLE9BQU87WUFDSCxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUU7WUFDakIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO1lBQ25CLElBQUksRUFBSSxJQUFJLENBQUMsSUFBSTtTQUNwQixDQUFDO0lBQ04sQ0FBQztDQUNKO0FBOUJELCtCQThCQyJ9
@@ -0,0 +1,51 @@
1
+ /** @module VoiceState */
2
+ import Base from "./Base";
3
+ import type Member from "./Member";
4
+ import type Guild from "./Guild";
5
+ import type User from "./User";
6
+ import type Client from "../Client";
7
+ import type { RawVoiceState } from "../types/voice";
8
+ import type { JSONVoiceState } from "../types/json";
9
+ import type { AnyVoiceChannel } from "../types";
10
+ /** Represents a guild member's voice state. */
11
+ export default class VoiceState<T extends AnyVoiceChannel = AnyVoiceChannel> extends Base {
12
+ private _cachedChannel?;
13
+ private _cachedGuild?;
14
+ private _cachedMember?;
15
+ private _cachedUser?;
16
+ /** The ID of the channel the user is connected to. */
17
+ channelID: string | null;
18
+ /** If the associated member is deafened. */
19
+ deaf: boolean;
20
+ /** The ID of the guild this voice state is a part of. */
21
+ guildID: string;
22
+ /** If the associated member is muted. */
23
+ mute: boolean;
24
+ /** The time at which the associated member requested to speak. */
25
+ requestToSpeakTimestamp: Date | null;
26
+ /** If the associated member is self deafened. */
27
+ selfDeaf: boolean;
28
+ /** If the associated member is self muted. */
29
+ selfMute: boolean;
30
+ /** If the associated member is streaming. */
31
+ selfStream: boolean;
32
+ /** If the associated member is has their camera on. */
33
+ selfVideo: boolean;
34
+ /** The id of the associated member's voice session. */
35
+ sessionID: string;
36
+ /** If the associated member is suppressed. */
37
+ suppress: boolean;
38
+ /** The ID of the user associated with this voice state. */
39
+ userID: string;
40
+ constructor(data: RawVoiceState, client: Client);
41
+ protected update(data: Partial<RawVoiceState>): void;
42
+ /** The channel the user is connected to. */
43
+ get channel(): T | null | undefined;
44
+ /** The guild this voice state is a part of. This will throw an error if the guild is not cached. */
45
+ get guild(): Guild;
46
+ /** The member associated with this voice state. */
47
+ get member(): Member | undefined;
48
+ /** TThe user associated with this voice state. */
49
+ get user(): User | undefined;
50
+ toJSON(): JSONVoiceState;
51
+ }
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /** @module VoiceState */
5
+ const Base_1 = tslib_1.__importDefault(require("./Base"));
6
+ const Errors_1 = require("../util/Errors");
7
+ /** Represents a guild member's voice state. */
8
+ class VoiceState extends Base_1.default {
9
+ _cachedChannel;
10
+ _cachedGuild;
11
+ _cachedMember;
12
+ _cachedUser;
13
+ /** The ID of the channel the user is connected to. */
14
+ channelID;
15
+ /** If the associated member is deafened. */
16
+ deaf;
17
+ /** The ID of the guild this voice state is a part of. */
18
+ guildID;
19
+ /** If the associated member is muted. */
20
+ mute;
21
+ /** The time at which the associated member requested to speak. */
22
+ requestToSpeakTimestamp;
23
+ /** If the associated member is self deafened. */
24
+ selfDeaf;
25
+ /** If the associated member is self muted. */
26
+ selfMute;
27
+ /** If the associated member is streaming. */
28
+ selfStream;
29
+ /** If the associated member is has their camera on. */
30
+ selfVideo;
31
+ /** The id of the associated member's voice session. */
32
+ sessionID;
33
+ /** If the associated member is suppressed. */
34
+ suppress;
35
+ /** The ID of the user associated with this voice state. */
36
+ userID;
37
+ constructor(data, client) {
38
+ super(data.user_id, client);
39
+ this.channelID = data.channel_id;
40
+ this.deaf = false;
41
+ this.guildID = data.guild_id;
42
+ this.mute = false;
43
+ this.requestToSpeakTimestamp = null;
44
+ this.selfDeaf = false;
45
+ this.selfMute = false;
46
+ this.selfStream = false;
47
+ this.selfVideo = false;
48
+ this.suppress = false;
49
+ this.userID = this.id;
50
+ this.update(data);
51
+ }
52
+ update(data) {
53
+ if (data.channel_id !== undefined) {
54
+ this.channelID = data.channel_id;
55
+ this._cachedChannel = null;
56
+ }
57
+ if (data.deaf !== undefined) {
58
+ this.deaf = data.deaf;
59
+ }
60
+ if (data.guild_id !== undefined) {
61
+ this.guildID = data.guild_id;
62
+ }
63
+ if (data.member !== undefined) {
64
+ this._cachedMember = this.client.util.updateMember(data.guild_id, this.id, data.member);
65
+ }
66
+ if (data.mute !== undefined) {
67
+ this.mute = data.mute;
68
+ }
69
+ if (data.request_to_speak_timestamp !== undefined) {
70
+ this.requestToSpeakTimestamp = data.request_to_speak_timestamp === null ? null : new Date(data.request_to_speak_timestamp);
71
+ }
72
+ if (data.self_deaf !== undefined) {
73
+ this.selfDeaf = data.self_deaf;
74
+ }
75
+ if (data.self_mute !== undefined) {
76
+ this.selfMute = data.self_mute;
77
+ }
78
+ if (data.self_stream !== undefined) {
79
+ this.selfStream = data.self_stream;
80
+ }
81
+ if (data.self_video !== undefined) {
82
+ this.selfVideo = data.self_video;
83
+ }
84
+ if (data.suppress !== undefined) {
85
+ this.suppress = data.suppress;
86
+ }
87
+ if (data.user_id !== undefined) {
88
+ this.userID = data.user_id;
89
+ }
90
+ }
91
+ /** The channel the user is connected to. */
92
+ get channel() {
93
+ if (this.channelID !== null) {
94
+ return this._cachedChannel ??= this.client.getChannel(this.channelID);
95
+ }
96
+ return (this._cachedChannel ??= null);
97
+ }
98
+ /** The guild this voice state is a part of. This will throw an error if the guild is not cached. */
99
+ get guild() {
100
+ this._cachedGuild ??= this.client.guilds.get(this.guildID);
101
+ if (!this._cachedGuild) {
102
+ if (this.client.options.restMode) {
103
+ throw new Errors_1.UncachedError(`${this.constructor.name}#guild is not present when rest mode is enabled.`);
104
+ }
105
+ if (!this.client.shards.connected) {
106
+ throw new Errors_1.UncachedError(`${this.constructor.name}#guild is not present without a gateway connection.`);
107
+ }
108
+ throw new Errors_1.UncachedError(`${this.constructor.name}#guild is not present.`);
109
+ }
110
+ return this._cachedGuild;
111
+ }
112
+ /** The member associated with this voice state. */
113
+ get member() {
114
+ return this._cachedMember ?? (this._cachedMember = this["_cachedGuild"]?.members.get(this.userID));
115
+ }
116
+ /** TThe user associated with this voice state. */
117
+ get user() {
118
+ return this._cachedUser ?? (this._cachedUser = this.client.users.get(this.userID));
119
+ }
120
+ toJSON() {
121
+ return {
122
+ ...super.toJSON(),
123
+ channelID: this.channelID,
124
+ deaf: this.deaf,
125
+ guildID: this.guildID ?? undefined,
126
+ member: this.member?.toJSON(),
127
+ mute: this.mute,
128
+ requestToSpeakTimestamp: this.requestToSpeakTimestamp ? this.requestToSpeakTimestamp.getTime() : null,
129
+ selfDeaf: this.selfDeaf,
130
+ selfMute: this.selfMute,
131
+ selfStream: this.selfStream,
132
+ selfVideo: this.selfVideo,
133
+ sessionID: this.sessionID,
134
+ suppress: this.suppress,
135
+ user: this.user?.toJSON()
136
+ };
137
+ }
138
+ }
139
+ exports.default = VoiceState;
140
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVm9pY2VTdGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdHJ1Y3R1cmVzL1ZvaWNlU3RhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXlCO0FBQ3pCLDBEQUEwQjtBQU8xQiwyQ0FBK0M7QUFHL0MsK0NBQStDO0FBQy9DLE1BQXFCLFVBQXdELFNBQVEsY0FBSTtJQUM3RSxjQUFjLENBQVk7SUFDMUIsWUFBWSxDQUFTO0lBQ3JCLGFBQWEsQ0FBVT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