oceanic.js 1.10.1-dev.97cef9c → 1.10.1-dev.9b37972

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 (204) hide show
  1. package/dist/package.json +5 -5
  2. package/esm.mjs +2 -0
  3. package/package.json +5 -5
  4. package/dist/lib/Client.d.ts +0 -91
  5. package/dist/lib/Client.js +0 -254
  6. package/dist/lib/Constants.d.ts +0 -1121
  7. package/dist/lib/Constants.js +0 -1401
  8. package/dist/lib/gateway/Shard.d.ts +0 -77
  9. package/dist/lib/gateway/Shard.js +0 -1582
  10. package/dist/lib/gateway/ShardManager.d.ts +0 -26
  11. package/dist/lib/gateway/ShardManager.js +0 -304
  12. package/dist/lib/index.d.ts +0 -83
  13. package/dist/lib/index.js +0 -166
  14. package/dist/lib/rest/Bucket.d.ts +0 -33
  15. package/dist/lib/rest/Bucket.js +0 -78
  16. package/dist/lib/rest/DiscordHTTPError.d.ts +0 -16
  17. package/dist/lib/rest/DiscordHTTPError.js +0 -65
  18. package/dist/lib/rest/DiscordRESTError.d.ts +0 -19
  19. package/dist/lib/rest/DiscordRESTError.js +0 -89
  20. package/dist/lib/rest/OAuthHelper.d.ts +0 -60
  21. package/dist/lib/rest/OAuthHelper.js +0 -180
  22. package/dist/lib/rest/RESTManager.d.ts +0 -42
  23. package/dist/lib/rest/RESTManager.js +0 -82
  24. package/dist/lib/rest/RequestHandler.d.ts +0 -28
  25. package/dist/lib/rest/RequestHandler.js +0 -313
  26. package/dist/lib/rest/SequentialBucket.d.ts +0 -25
  27. package/dist/lib/rest/SequentialBucket.js +0 -76
  28. package/dist/lib/routes/Applications.d.ts +0 -171
  29. package/dist/lib/routes/Applications.js +0 -447
  30. package/dist/lib/routes/Channels.d.ts +0 -391
  31. package/dist/lib/routes/Channels.js +0 -1107
  32. package/dist/lib/routes/Guilds.d.ts +0 -606
  33. package/dist/lib/routes/Guilds.js +0 -1669
  34. package/dist/lib/routes/Interactions.d.ts +0 -74
  35. package/dist/lib/routes/Interactions.js +0 -141
  36. package/dist/lib/routes/Miscellaneous.d.ts +0 -25
  37. package/dist/lib/routes/Miscellaneous.js +0 -54
  38. package/dist/lib/routes/OAuth.d.ts +0 -105
  39. package/dist/lib/routes/OAuth.js +0 -309
  40. package/dist/lib/routes/Users.d.ts +0 -32
  41. package/dist/lib/routes/Users.js +0 -59
  42. package/dist/lib/routes/Webhooks.d.ts +0 -128
  43. package/dist/lib/routes/Webhooks.js +0 -264
  44. package/dist/lib/structures/AnnouncementChannel.d.ts +0 -36
  45. package/dist/lib/structures/AnnouncementChannel.js +0 -47
  46. package/dist/lib/structures/AnnouncementThreadChannel.d.ts +0 -18
  47. package/dist/lib/structures/AnnouncementThreadChannel.js +0 -27
  48. package/dist/lib/structures/Application.d.ts +0 -68
  49. package/dist/lib/structures/Application.js +0 -178
  50. package/dist/lib/structures/ApplicationCommand.d.ts +0 -74
  51. package/dist/lib/structures/ApplicationCommand.js +0 -141
  52. package/dist/lib/structures/Attachment.d.ts +0 -34
  53. package/dist/lib/structures/Attachment.js +0 -64
  54. package/dist/lib/structures/AuditLogEntry.d.ts +0 -25
  55. package/dist/lib/structures/AuditLogEntry.js +0 -53
  56. package/dist/lib/structures/AutoModerationRule.d.ts +0 -49
  57. package/dist/lib/structures/AutoModerationRule.js +0 -139
  58. package/dist/lib/structures/AutocompleteInteraction.d.ts +0 -62
  59. package/dist/lib/structures/AutocompleteInteraction.js +0 -115
  60. package/dist/lib/structures/Base.d.ts +0 -20
  61. package/dist/lib/structures/Base.js +0 -58
  62. package/dist/lib/structures/BaseEntitlement.d.ts +0 -19
  63. package/dist/lib/structures/BaseEntitlement.js +0 -44
  64. package/dist/lib/structures/CategoryChannel.d.ts +0 -41
  65. package/dist/lib/structures/CategoryChannel.js +0 -105
  66. package/dist/lib/structures/Channel.d.ts +0 -20
  67. package/dist/lib/structures/Channel.js +0 -91
  68. package/dist/lib/structures/ClientApplication.d.ts +0 -153
  69. package/dist/lib/structures/ClientApplication.js +0 -220
  70. package/dist/lib/structures/CommandInteraction.d.ts +0 -127
  71. package/dist/lib/structures/CommandInteraction.js +0 -297
  72. package/dist/lib/structures/ComponentInteraction.d.ts +0 -137
  73. package/dist/lib/structures/ComponentInteraction.js +0 -311
  74. package/dist/lib/structures/Entitlement.d.ts +0 -12
  75. package/dist/lib/structures/Entitlement.js +0 -26
  76. package/dist/lib/structures/ExtendedUser.d.ts +0 -26
  77. package/dist/lib/structures/ExtendedUser.js +0 -57
  78. package/dist/lib/structures/ForumChannel.d.ts +0 -11
  79. package/dist/lib/structures/ForumChannel.js +0 -19
  80. package/dist/lib/structures/GroupChannel.d.ts +0 -62
  81. package/dist/lib/structures/GroupChannel.js +0 -133
  82. package/dist/lib/structures/Guild.d.ts +0 -654
  83. package/dist/lib/structures/Guild.js +0 -1319
  84. package/dist/lib/structures/GuildChannel.d.ts +0 -34
  85. package/dist/lib/structures/GuildChannel.js +0 -75
  86. package/dist/lib/structures/GuildPreview.d.ts +0 -50
  87. package/dist/lib/structures/GuildPreview.js +0 -119
  88. package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -60
  89. package/dist/lib/structures/GuildScheduledEvent.js +0 -154
  90. package/dist/lib/structures/GuildTemplate.d.ts +0 -55
  91. package/dist/lib/structures/GuildTemplate.js +0 -126
  92. package/dist/lib/structures/Integration.d.ts +0 -54
  93. package/dist/lib/structures/Integration.js +0 -156
  94. package/dist/lib/structures/Interaction.d.ts +0 -40
  95. package/dist/lib/structures/Interaction.js +0 -91
  96. package/dist/lib/structures/InteractionResolvedChannel.d.ts +0 -28
  97. package/dist/lib/structures/InteractionResolvedChannel.js +0 -45
  98. package/dist/lib/structures/Invite.d.ts +0 -64
  99. package/dist/lib/structures/Invite.js +0 -193
  100. package/dist/lib/structures/InviteGuild.d.ts +0 -52
  101. package/dist/lib/structures/InviteGuild.js +0 -88
  102. package/dist/lib/structures/MediaChannel.d.ts +0 -11
  103. package/dist/lib/structures/MediaChannel.js +0 -19
  104. package/dist/lib/structures/Member.d.ts +0 -122
  105. package/dist/lib/structures/Member.js +0 -255
  106. package/dist/lib/structures/Message.d.ts +0 -183
  107. package/dist/lib/structures/Message.js +0 -455
  108. package/dist/lib/structures/ModalSubmitInteraction.d.ts +0 -128
  109. package/dist/lib/structures/ModalSubmitInteraction.js +0 -240
  110. package/dist/lib/structures/OAuthApplication.d.ts +0 -79
  111. package/dist/lib/structures/OAuthApplication.js +0 -210
  112. package/dist/lib/structures/OAuthGuild.d.ts +0 -35
  113. package/dist/lib/structures/OAuthGuild.js +0 -61
  114. package/dist/lib/structures/PartialApplication.d.ts +0 -30
  115. package/dist/lib/structures/PartialApplication.js +0 -67
  116. package/dist/lib/structures/Permission.d.ts +0 -21
  117. package/dist/lib/structures/Permission.js +0 -68
  118. package/dist/lib/structures/PermissionOverwrite.d.ts +0 -26
  119. package/dist/lib/structures/PermissionOverwrite.js +0 -49
  120. package/dist/lib/structures/PingInteraction.d.ts +0 -16
  121. package/dist/lib/structures/PingInteraction.js +0 -26
  122. package/dist/lib/structures/PrivateChannel.d.ts +0 -90
  123. package/dist/lib/structures/PrivateChannel.js +0 -131
  124. package/dist/lib/structures/PrivateThreadChannel.d.ts +0 -18
  125. package/dist/lib/structures/PrivateThreadChannel.js +0 -27
  126. package/dist/lib/structures/PublicThreadChannel.d.ts +0 -21
  127. package/dist/lib/structures/PublicThreadChannel.js +0 -37
  128. package/dist/lib/structures/Role.d.ts +0 -50
  129. package/dist/lib/structures/Role.js +0 -131
  130. package/dist/lib/structures/SKU.d.ts +0 -32
  131. package/dist/lib/structures/SKU.js +0 -53
  132. package/dist/lib/structures/StageChannel.d.ts +0 -33
  133. package/dist/lib/structures/StageChannel.js +0 -44
  134. package/dist/lib/structures/StageInstance.d.ts +0 -36
  135. package/dist/lib/structures/StageInstance.js +0 -94
  136. package/dist/lib/structures/Team.d.ts +0 -22
  137. package/dist/lib/structures/Team.js +0 -67
  138. package/dist/lib/structures/TestEntitlement.d.ts +0 -10
  139. package/dist/lib/structures/TestEntitlement.js +0 -21
  140. package/dist/lib/structures/TextChannel.d.ts +0 -34
  141. package/dist/lib/structures/TextChannel.js +0 -46
  142. package/dist/lib/structures/TextableChannel.d.ts +0 -158
  143. package/dist/lib/structures/TextableChannel.js +0 -276
  144. package/dist/lib/structures/TextableVoiceChannel.d.ts +0 -39
  145. package/dist/lib/structures/TextableVoiceChannel.js +0 -81
  146. package/dist/lib/structures/ThreadChannel.d.ts +0 -159
  147. package/dist/lib/structures/ThreadChannel.js +0 -295
  148. package/dist/lib/structures/ThreadOnlyChannel.d.ts +0 -99
  149. package/dist/lib/structures/ThreadOnlyChannel.js +0 -233
  150. package/dist/lib/structures/ThreadableChannel.d.ts +0 -36
  151. package/dist/lib/structures/ThreadableChannel.js +0 -58
  152. package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
  153. package/dist/lib/structures/UnavailableGuild.js +0 -21
  154. package/dist/lib/structures/User.d.ts +0 -82
  155. package/dist/lib/structures/User.js +0 -168
  156. package/dist/lib/structures/VoiceChannel.d.ts +0 -20
  157. package/dist/lib/structures/VoiceChannel.js +0 -35
  158. package/dist/lib/structures/VoiceState.d.ts +0 -51
  159. package/dist/lib/structures/VoiceState.js +0 -140
  160. package/dist/lib/structures/Webhook.d.ts +0 -129
  161. package/dist/lib/structures/Webhook.js +0 -206
  162. package/dist/lib/types/applications.d.ts +0 -448
  163. package/dist/lib/types/audit-log.d.ts +0 -121
  164. package/dist/lib/types/auto-moderation.d.ts +0 -99
  165. package/dist/lib/types/channels.d.ts +0 -1150
  166. package/dist/lib/types/client.d.ts +0 -228
  167. package/dist/lib/types/events.d.ts +0 -260
  168. package/dist/lib/types/gateway-raw.d.ts +0 -567
  169. package/dist/lib/types/gateway.d.ts +0 -338
  170. package/dist/lib/types/guild-template.d.ts +0 -33
  171. package/dist/lib/types/guilds.d.ts +0 -854
  172. package/dist/lib/types/index.d.ts +0 -18
  173. package/dist/lib/types/interactions.d.ts +0 -376
  174. package/dist/lib/types/json.d.ts +0 -709
  175. package/dist/lib/types/misc.d.ts +0 -13
  176. package/dist/lib/types/oauth.d.ts +0 -201
  177. package/dist/lib/types/request-handler.d.ts +0 -52
  178. package/dist/lib/types/scheduled-events.d.ts +0 -88
  179. package/dist/lib/types/shared.d.ts +0 -9
  180. package/dist/lib/types/users.d.ts +0 -45
  181. package/dist/lib/types/voice.d.ts +0 -45
  182. package/dist/lib/types/webhooks.d.ts +0 -73
  183. package/dist/lib/util/Collection.d.ts +0 -47
  184. package/dist/lib/util/Collection.js +0 -78
  185. package/dist/lib/util/Errors.d.ts +0 -29
  186. package/dist/lib/util/Errors.js +0 -56
  187. package/dist/lib/util/Routes.d.ts +0 -124
  188. package/dist/lib/util/Routes.js +0 -243
  189. package/dist/lib/util/SimpleCollection.d.ts +0 -12
  190. package/dist/lib/util/SimpleCollection.js +0 -81
  191. package/dist/lib/util/TypedCollection.d.ts +0 -24
  192. package/dist/lib/util/TypedCollection.js +0 -76
  193. package/dist/lib/util/TypedEmitter.d.ts +0 -19
  194. package/dist/lib/util/TypedEmitter.js +0 -19
  195. package/dist/lib/util/Util.d.ts +0 -52
  196. package/dist/lib/util/Util.js +0 -469
  197. package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +0 -170
  198. package/dist/lib/util/interactions/InteractionOptionsWrapper.js +0 -213
  199. package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +0 -24
  200. package/dist/lib/util/interactions/MessageInteractionResponse.js +0 -28
  201. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +0 -24
  202. package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +0 -34
  203. package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +0 -60
  204. package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +0 -124
@@ -1,193 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /** @module Invite */
5
- const Channel_1 = tslib_1.__importDefault(require("./Channel"));
6
- const PartialApplication_1 = tslib_1.__importDefault(require("./PartialApplication"));
7
- const InviteGuild_1 = tslib_1.__importDefault(require("./InviteGuild"));
8
- /** Represents an invite. */
9
- class Invite {
10
- _cachedChannel;
11
- /** The approximate number of total members in the guild this invite leads to. */
12
- approximateMemberCount;
13
- /** The approximate number of online members in the guild this invite leads to. */
14
- approximatePresenceCount;
15
- /** The ID of the channel this invite leads to. */
16
- channelID;
17
- client;
18
- /** The code of this invite. */
19
- code;
20
- /** When this invite was created. */
21
- createdAt;
22
- /** The date at which this invite expires. */
23
- expiresAt;
24
- /** This invite's [flags](https://discord.com/developers/docs/resources/invite#invite-object-invite-flags). */
25
- flags;
26
- /** The guild this invite leads to or `null` if this invite leads to a Group DM. */
27
- guild;
28
- /** The ID of the guild this invite leads to or `null` if this invite leads to a Group DM. */
29
- guildID;
30
- /** The scheduled event associated with this invite. */
31
- guildScheduledEvent;
32
- /** The user that created this invite. */
33
- inviter;
34
- /** The time after which this invite expires. */
35
- maxAge;
36
- /** The maximum number of times this invite can be used, */
37
- maxUses;
38
- /** @deprecated The stage instance in the invite this channel is for. */
39
- stageInstance;
40
- /** The embedded application this invite will open. */
41
- targetApplication;
42
- /** The [target type](https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types) of this invite. */
43
- targetType;
44
- /** The user whose stream to display for this voice channel stream invite. */
45
- targetUser;
46
- /** If this invite only grants temporary membership. */
47
- temporary;
48
- /** The number of times this invite has been used. */
49
- uses;
50
- constructor(data, client) {
51
- Object.defineProperty(this, "client", {
52
- value: client,
53
- enumerable: false,
54
- writable: false,
55
- configurable: false
56
- });
57
- this.channelID = (data.channel_id ?? data.channel?.id) ?? null;
58
- this.code = data.code;
59
- this.flags = data.flags ?? 0;
60
- this.guild = null;
61
- this.guildID = data.guild?.id ?? null;
62
- this.expiresAt = (data.expires_at ? new Date(data.expires_at) : undefined);
63
- this.targetType = data.target_type;
64
- this.update(data);
65
- }
66
- update(data) {
67
- if (data.approximate_member_count !== undefined) {
68
- this.approximateMemberCount = data.approximate_member_count;
69
- }
70
- if (data.approximate_presence_count !== undefined) {
71
- this.approximatePresenceCount = data.approximate_presence_count;
72
- }
73
- if (data.flags !== undefined) {
74
- this.flags = data.flags;
75
- }
76
- let guild;
77
- if (data.guild) {
78
- if (this.guild === null) {
79
- this.guild = new InviteGuild_1.default(data.guild, this.client);
80
- }
81
- else {
82
- this.guild["update"](data.guild);
83
- }
84
- if (this.client.guilds.has(data.guild.id)) {
85
- this.client.guilds.update(data.guild);
86
- }
87
- }
88
- if (this.channelID === null) {
89
- this._cachedChannel = null;
90
- }
91
- else {
92
- let channel;
93
- channel = this.client.getChannel(this.channelID);
94
- if (data.channel !== undefined) {
95
- if (channel && channel instanceof Channel_1.default) {
96
- channel["update"](data.channel);
97
- }
98
- else {
99
- channel = data.channel;
100
- }
101
- }
102
- this._cachedChannel = channel;
103
- }
104
- if (data.inviter !== undefined) {
105
- this.inviter = this.client.users.update(data.inviter);
106
- }
107
- if (data.stage_instance !== undefined) {
108
- this.stageInstance = {
109
- members: data.stage_instance.members.map(member => this.client.util.updateMember(guild.id, member.user.id, member)),
110
- participantCount: data.stage_instance.participant_count,
111
- speakerCount: data.stage_instance.speaker_count,
112
- topic: data.stage_instance.topic
113
- };
114
- }
115
- if (data.target_application !== undefined) {
116
- this.targetApplication = new PartialApplication_1.default(data.target_application, this.client);
117
- }
118
- if (data.guild_scheduled_event !== undefined) {
119
- this.guildScheduledEvent = guild.scheduledEvents.update(data.guild_scheduled_event);
120
- }
121
- if (data.target_user !== undefined) {
122
- this.targetUser = this.client.users.update(data.target_user);
123
- }
124
- if ("created_at" in data) {
125
- if (data.created_at !== undefined) {
126
- this.createdAt = new Date(data.created_at);
127
- }
128
- if (data.uses !== undefined) {
129
- this.uses = data.uses;
130
- }
131
- if (data.max_uses !== undefined) {
132
- this.maxUses = data.max_uses;
133
- }
134
- if (data.max_age !== undefined) {
135
- this.maxAge = data.max_age;
136
- }
137
- if (data.temporary !== undefined) {
138
- this.temporary = data.temporary;
139
- }
140
- }
141
- }
142
- /** The channel this invite leads to. If the channel is not cached, this will be a partial with only `id`, `name, and `type`. */
143
- get channel() {
144
- if (this.channelID !== null) {
145
- if (this._cachedChannel instanceof Channel_1.default) {
146
- return this._cachedChannel;
147
- }
148
- const cachedChannel = this.client.getChannel(this.channelID);
149
- return cachedChannel ? (this._cachedChannel = cachedChannel) : this._cachedChannel;
150
- }
151
- return this._cachedChannel === null ? this._cachedChannel : (this._cachedChannel = null);
152
- }
153
- /**
154
- * Delete this invite.
155
- * @param reason The reason for deleting this invite.
156
- */
157
- async deleteInvite(reason) {
158
- return this.client.rest.channels.deleteInvite(this.code, reason);
159
- }
160
- /** Whether this invite belongs to a cached channel. The only difference on using this method over a simple if statement is to easily update all the invite properties typing definitions based on the channel it belongs to. */
161
- inCachedChannel() {
162
- return this.channel instanceof Channel_1.default;
163
- }
164
- toJSON() {
165
- return {
166
- approximateMemberCount: this.approximateMemberCount,
167
- approximatePresenceCount: this.approximatePresenceCount,
168
- channelID: this.channelID ?? undefined,
169
- code: this.code,
170
- createdAt: this.createdAt?.getTime(),
171
- expiresAt: this.expiresAt?.getTime(),
172
- guild: this.guild?.toJSON(),
173
- guildID: this.guildID ?? undefined,
174
- guildScheduledEvent: this.guildScheduledEvent?.toJSON(),
175
- inviter: this.inviter?.id,
176
- maxAge: this.maxAge,
177
- maxUses: this.maxUses,
178
- stageInstance: this.stageInstance ? {
179
- members: this.stageInstance.members.map(member => member.id),
180
- participantCount: this.stageInstance.participantCount,
181
- speakerCount: this.stageInstance.speakerCount,
182
- topic: this.stageInstance.topic
183
- } : undefined,
184
- targetApplication: this.targetApplication?.toJSON(),
185
- targetType: this.targetType,
186
- targetUser: this.targetUser?.id,
187
- temporary: this.temporary,
188
- uses: this.uses
189
- };
190
- }
191
- }
192
- exports.default = Invite;
193
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW52aX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QyxPQUFPLEVBQW1CLElBQUksQ0FBQyxPQUFPO1lBQ3RDLGFBQWEsRUFBYSxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztnQkFDM0MsT0FBTyxFQUFXLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7Z0JBQ3JFLGdCQUFnQixFQUFFLElBQUksQ0FBQyxhQUFhLENBQUMsZ0JBQWdCO2dCQUNyRCxZQUFZLEVBQU0sSUFBSSxDQUFDLGFBQWEsQ0FBQyxZQUFZO2dCQUNqRCxLQUFLLEVBQWEsSUFBSSxDQUFDLGFBQWEsQ0FBQyxLQUFLO2FBQzdDLENBQUMsQ0FBQyxDQUFDLFNBQVM7WUFDYixpQkFBaUIsRUFBRSxJQUFJLENBQUMsaUJBQWlCLEVBQUUsTUFBTSxFQUFFO1lBQ25ELFVBQVUsRUFBUyxJQUFJLENBQUMsVUFBVTtZQUNsQyxVQUFVLEVBQVMsSUFBSSxDQUFDLFVBQVUsRUFBRSxFQUFFO1lBQ3RDLFNBQVMsRUFBVSxJQUFJLENBQUMsU0FBUztZQUNqQyxJQUFJLEVBQWUsSUFBSSxDQUFDLElBQUk7U0FDL0IsQ0FBQztJQUNOLENBQUM7Q0FDSjtBQS9MRCx5QkErTEMifQ==
@@ -1,52 +0,0 @@
1
- /** @module InviteGuild */
2
- import Base from "./Base";
3
- import type Guild from "./Guild";
4
- import type { GuildFeature, GuildNSFWLevels, ImageFormat, VerificationLevels } from "../Constants";
5
- import type { JSONInviteGuild, RawInviteGuild } from "../types";
6
- import type Client from "../Client";
7
- /** Represents a guild received via an invite. */
8
- export default class InviteGuild extends Base {
9
- private _cachedCompleteGuild?;
10
- /** The hash of this guild's banner. */
11
- banner: string | null;
12
- /** The description of this guild. */
13
- description: string | null;
14
- /** The [features](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) this guild has. */
15
- features: Array<GuildFeature>;
16
- /** The icon hash of this guild. */
17
- icon: string | null;
18
- /** The name of this guild. */
19
- name: string;
20
- /** The [nsfw level](https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level) of this guild. */
21
- nsfwLevel: GuildNSFWLevels;
22
- /** The number of nitro boosts this guild has. */
23
- premiumSubscriptionCount?: number;
24
- /** The invite splash hash of this guild. */
25
- splash: string | null;
26
- /** The vanity url of this guild. Only present in guilds with the `VANITY_URL` feature. */
27
- vanityURLCode: string | null;
28
- /** The [verification level](https://discord.com/developers/docs/resources/guild#guild-object-verification-level) of this guild. */
29
- verificationLevel: VerificationLevels;
30
- constructor(data: RawInviteGuild, client: Client);
31
- /** The complete guild this InviteGuild represents, if cached. */
32
- get completeGuild(): Guild | undefined;
33
- /**
34
- * The url of this guild's banner.
35
- * @param format The format the url should be.
36
- * @param size The dimensions of the image.
37
- */
38
- bannerURL(format?: ImageFormat, size?: number): string | null;
39
- /**
40
- * The url of this guild's icon.
41
- * @param format The format the url should be.
42
- * @param size The dimensions of the image.
43
- */
44
- iconURL(format?: ImageFormat, size?: number): string | null;
45
- /**
46
- * The url of this guild's invite splash.
47
- * @param format The format the url should be.
48
- * @param size The dimensions of the image.
49
- */
50
- splashURL(format?: ImageFormat, size?: number): string | null;
51
- toJSON(): JSONInviteGuild;
52
- }
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /** @module InviteGuild */
5
- const Base_1 = tslib_1.__importDefault(require("./Base"));
6
- const Routes = tslib_1.__importStar(require("../util/Routes"));
7
- /** Represents a guild received via an invite. */
8
- class InviteGuild extends Base_1.default {
9
- _cachedCompleteGuild;
10
- /** The hash of this guild's banner. */
11
- banner;
12
- /** The description of this guild. */
13
- description;
14
- /** The [features](https://discord.com/developers/docs/resources/guild#guild-object-guild-features) this guild has. */
15
- features;
16
- /** The icon hash of this guild. */
17
- icon;
18
- /** The name of this guild. */
19
- name;
20
- /** The [nsfw level](https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level) of this guild. */
21
- nsfwLevel;
22
- /** The number of nitro boosts this guild has. */
23
- premiumSubscriptionCount;
24
- /** The invite splash hash of this guild. */
25
- splash;
26
- /** The vanity url of this guild. Only present in guilds with the `VANITY_URL` feature. */
27
- vanityURLCode;
28
- /** The [verification level](https://discord.com/developers/docs/resources/guild#guild-object-verification-level) of this guild. */
29
- verificationLevel;
30
- constructor(data, client) {
31
- super(data.id, client);
32
- this.banner = data.banner;
33
- this.description = data.description;
34
- this.features = data.features;
35
- this.name = data.name;
36
- this.nsfwLevel = data.nsfw_level;
37
- this.icon = data.icon;
38
- this.premiumSubscriptionCount = data.premium_subscription_count;
39
- this.splash = data.splash;
40
- this.vanityURLCode = data.vanity_url_code;
41
- this.verificationLevel = data.verification_level;
42
- }
43
- /** The complete guild this InviteGuild represents, if cached. */
44
- get completeGuild() {
45
- return this._cachedCompleteGuild ??= this.client.guilds.get(this.id);
46
- }
47
- /**
48
- * The url of this guild's banner.
49
- * @param format The format the url should be.
50
- * @param size The dimensions of the image.
51
- */
52
- bannerURL(format, size) {
53
- return this.banner === null ? null : this.client.util.formatImage(Routes.BANNER(this.id, this.banner), format, size);
54
- }
55
- /**
56
- * The url of this guild's icon.
57
- * @param format The format the url should be.
58
- * @param size The dimensions of the image.
59
- */
60
- iconURL(format, size) {
61
- return this.icon === null ? null : this.client.util.formatImage(Routes.GUILD_ICON(this.id, this.icon), format, size);
62
- }
63
- /**
64
- * The url of this guild's invite splash.
65
- * @param format The format the url should be.
66
- * @param size The dimensions of the image.
67
- */
68
- splashURL(format, size) {
69
- return this.splash === null ? null : this.client.util.formatImage(Routes.GUILD_SPLASH(this.id, this.splash), format, size);
70
- }
71
- toJSON() {
72
- return {
73
- ...super.toJSON(),
74
- banner: this.banner,
75
- description: this.description,
76
- features: this.features,
77
- icon: this.icon,
78
- name: this.name,
79
- nsfwLevel: this.nsfwLevel,
80
- premiumSubscriptionCount: this.premiumSubscriptionCount,
81
- splash: this.splash,
82
- vanityURLCode: this.vanityURLCode,
83
- verificationLevel: this.verificationLevel
84
- };
85
- }
86
- }
87
- exports.default = InviteGuild;
88
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW52aXRlR3VpbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvc3RydWN0dXJlcy9JbnZpdGVHdWlsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQkFBMEI7QUFDMUIsMERBQTBCO0FBSzFCLCtEQUF5QztBQUV6QyxpREFBaUQ7QUFDakQsTUFBcUIsV0FBWSxTQUFRLGNBQUk7SUFDakMsb0JBQW9CLENBQVM7SUFDckMsdUNBQXVDO0lBQ3ZDLE1BQU0sQ0FBZ0I7SUFDdEIscUNBQXFDO0lBQ3JDLFdBQVcsQ0FBZ0I7SUFDM0Isc0hBQXNIO0lBQ3RILFFBQVEsQ0FBc0I7SUFDOUIsbUNBQW1DO0lBQ25DLElBQUksQ0FBZ0I7SUFDcEIsOEJBQThCO0lBQzlCLElBQUksQ0FBUztJQUNiLHlIQUF5SDtJQUN6SCxTQUFTLENBQWtCO0lBQzNCLGlEQUFpRDtJQUNqRCx3QkFBd0IsQ0FBVTtJQUNsQyw0Q0FBNEM7SUFDNUMsTUFBTSxDQUFnQjtJQUN0QiwwRkFBMEY7SUFDMUYsYUFBYSxDQUFnQjtJQUM3QixtSUFBbUk7SUFDbkksaUJBQWlCLENBQXFCO0lBQ3RDLFlBQVksSUFBb0IsRUFBRSxNQUFjO1FBQzVDLEtBQUssQ0FBQyxJQUFJLENBQUMsRUFBRSxFQUFFLE1BQU0sQ0FBQyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQztRQUMxQixJQUFJLENBQUMsV0FBVyx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UMsd0JBQXdCO1lBQ3ZELE1BQU0sRUFBb0IsSUFBSSxDQUFDLE1BQU07WUFDckMsYUFBYSxFQUFhLElBQUksQ0FBQyxhQUFhO1lBQzVDLGlCQUFpQixFQUFTLElBQUksQ0FBQyxpQkFBaUI7U0FDbkQsQ0FBQztJQUNOLENBQUM7Q0FDSjtBQW5GRCw4QkFtRkMifQ==
@@ -1,11 +0,0 @@
1
- /** @module MediaChannel */
2
- import ThreadOnlyChannel from "./ThreadOnlyChannel";
3
- import type Client from "../Client";
4
- import type { ChannelTypes } from "../Constants";
5
- import type { JSONMediaChannel, RawMediaChannel } from "../types";
6
- /** Represents a media channel. */
7
- export default class MediaChannel extends ThreadOnlyChannel {
8
- type: ChannelTypes.GUILD_MEDIA;
9
- constructor(data: RawMediaChannel, client: Client);
10
- toJSON(): JSONMediaChannel;
11
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- /** @module MediaChannel */
5
- const ThreadOnlyChannel_1 = tslib_1.__importDefault(require("./ThreadOnlyChannel"));
6
- /** Represents a media channel. */
7
- class MediaChannel extends ThreadOnlyChannel_1.default {
8
- constructor(data, client) {
9
- super(data, client);
10
- }
11
- toJSON() {
12
- return {
13
- ...super.toJSON(),
14
- type: this.type
15
- };
16
- }
17
- }
18
- exports.default = MediaChannel;
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWVkaWFDaGFubmVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3N0cnVjdHVyZXMvTWVkaWFDaGFubmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJCQUEyQjtBQUMzQixvRkFBb0Q7QUFLcEQsa0NBQWtDO0FBQ2xDLE1BQXFCLFlBQWEsU0FBUSwyQkFBaUI7SUFFdkQsWUFBWSxJQUFxQixFQUFFLE1BQWM7UUFDN0MsS0FBSyxDQUFDLElBQUksRUFBRSxNQUFNLENBQUMsQ0FBQztJQUN4QixDQUFDO0lBRVEsTUFBTTtRQUNYLE9BQU87WUFDSCxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUU7WUFDakIsSUFBSSxFQUFFLElBQUksQ0FBQyxJQUFJO1NBQ2xCLENBQUM7SUFDTixDQUFDO0NBQ0o7QUFaRCwrQkFZQyJ9
@@ -1,122 +0,0 @@
1
- /** @module Member */
2
- import Base from "./Base";
3
- import type User from "./User";
4
- import type Guild from "./Guild";
5
- import type Permission from "./Permission";
6
- import type VoiceState from "./VoiceState";
7
- import { type ImageFormat } from "../Constants";
8
- import type Client from "../Client";
9
- import type { CreateBanOptions, EditMemberOptions, EditUserVoiceStateOptions, RawMember, RESTMember, Presence } from "../types/guilds";
10
- import type { JSONMember } from "../types/json";
11
- /** Represents a member of a guild. */
12
- export default class Member extends Base {
13
- private _cachedGuild?;
14
- /** The member's avatar hash, if they have set a guild avatar. */
15
- avatar: string | null;
16
- /** When the member's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire, if active. */
17
- communicationDisabledUntil: Date | null;
18
- /** If this member is server deafened. */
19
- deaf: boolean;
20
- /** The member's [flags](https://discord.com/developers/docs/resources/guild#guild-member-object-flags). */
21
- flags: number;
22
- /** The id of the guild this member is for. */
23
- guildID: string;
24
- /** Undocumented. */
25
- isPending?: boolean;
26
- /** The date at which this member joined the guild. */
27
- joinedAt: Date | null;
28
- /** If this member is server muted. */
29
- mute: boolean;
30
- /** This member's nickname, if any. */
31
- nick: string | null;
32
- /** If this member has not passed the guild's [membership screening](https://discord.com/developers/docs/resources/guild#membership-screening-object) requirements. */
33
- pending: boolean;
34
- /** The date at which this member started boosting the guild, if applicable. */
35
- premiumSince: Date | null;
36
- /** The presence of this member. */
37
- presence?: Presence;
38
- /** The roles this member has. */
39
- roles: Array<string>;
40
- /** The user associated with this member. */
41
- user: User;
42
- constructor(data: (RawMember | RESTMember) & {
43
- id?: string;
44
- }, client: Client, guildID: string);
45
- private toggleFlag;
46
- protected update(data: Partial<RawMember | RESTMember>): void;
47
- /** If the member associated with the user is a bot. */
48
- get bot(): boolean;
49
- /** The Discord-tag of the user associated with this member. */
50
- get discriminator(): string;
51
- /** The nick of this member if set, the display name of this member's user if set, or their username. */
52
- get displayName(): string;
53
- /** The guild this member is for. This will throw an error if the guild is not cached. */
54
- get guild(): Guild;
55
- /** A string that will mention this member. */
56
- get mention(): string;
57
- /** The permissions of this member. */
58
- get permissions(): Permission;
59
- /** The user associated with this member's public [flags](https://discord.com/developers/docs/resources/user#user-object-user-flags). */
60
- get publicFlags(): number;
61
- /** If this user associated with this member is an official discord system user. */
62
- get system(): boolean;
63
- /** The 4 digits after this user's username, if they have not been migrated. If migrated, this will be a single "0". */
64
- get tag(): string;
65
- /** The username associated with this member's user. */
66
- get username(): string;
67
- /** The voice state of this member. */
68
- get voiceState(): VoiceState | null;
69
- /**
70
- * Add a role to this member.
71
- * @param roleID The ID of the role to add.
72
- */
73
- addRole(roleID: string, reason?: string): Promise<void>;
74
- /**
75
- * The url of this user's guild avatar (or their user avatar if no guild avatar is set, or their default avatar if none apply).
76
- * @param format The format the url should be.
77
- * @param size The dimensions of the image.
78
- */
79
- avatarURL(format?: ImageFormat, size?: number): string;
80
- /**
81
- * Create a ban for this member.
82
- * @param options The options for the ban.
83
- */
84
- ban(options?: CreateBanOptions): Promise<void>;
85
- /**
86
- * Disable the `BYPASSES_VERIFICATION` flag for this member. Requires the **Manage Guild** permission.
87
- * @param reason The reason for disabling the flag.
88
- */
89
- disableVerificationBypass(reason?: string): Promise<void>;
90
- /**
91
- * Edit this member. Use {@link Guild#editCurrentMember | Guild#editCurrentMember} if you wish to update the nick of this client using the `CHANGE_NICKNAME` permission.
92
- * @param options The options for editing the member.
93
- */
94
- edit(options: EditMemberOptions): Promise<Member>;
95
- /**
96
- * Edit this guild member's voice state. `channelID` is required, and the user must already be in that channel. See [Discord's docs](https://discord.com/developers/docs/resources/guild#modify-user-voice-state) for more information.
97
- * @param options The options for editing the voice state.
98
- */
99
- editVoiceState(options: EditUserVoiceStateOptions): Promise<void>;
100
- /**
101
- * Enable the `BYPASSES_VERIFICATION` flag for this member. Requires the **Manage Guild** permission.
102
- * @param reason The reason for enabling the flag.
103
- */
104
- enableVerificationBypass(reason?: string): Promise<void>;
105
- /**
106
- * Remove a member from the guild.
107
- * @param reason The reason for the kick.
108
- */
109
- kick(reason?: string): Promise<void>;
110
- /**
111
- * Remove a role from this member.
112
- * @param roleID The ID of the role to remove.
113
- * @param reason The reason for removing the role.
114
- */
115
- removeRole(roleID: string, reason?: string): Promise<void>;
116
- toJSON(): JSONMember;
117
- /**
118
- * Remove a ban for this member.
119
- * @param reason The reason for removing the ban.
120
- */
121
- unban(reason?: string): Promise<void>;
122
- }