disgroove 1.3.0-dev.19adbb0 → 1.3.0-dev.3af784e

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 (71) hide show
  1. package/dist/Client.d.ts +4 -4
  2. package/dist/Client.js +1 -1
  3. package/dist/Client.js.map +1 -1
  4. package/dist/gateway/Shard.js +2 -2
  5. package/dist/gateway/Shard.js.map +1 -1
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/rest/Endpoints.d.ts +1 -1
  10. package/dist/rest/Endpoints.js +3 -3
  11. package/dist/rest/RequestsManager.js +1 -1
  12. package/dist/structures/Application.d.ts +3 -3
  13. package/dist/structures/Application.js.map +1 -1
  14. package/dist/structures/AuditLog.d.ts +20 -0
  15. package/dist/structures/AuditLog.js +76 -0
  16. package/dist/structures/AuditLog.js.map +1 -0
  17. package/dist/structures/AutoModerationRule.d.ts +5 -5
  18. package/dist/structures/AutoModerationRule.js.map +1 -1
  19. package/dist/structures/Channel.d.ts +14 -14
  20. package/dist/structures/Channel.js +11 -11
  21. package/dist/structures/Channel.js.map +1 -1
  22. package/dist/structures/ClientApplication.d.ts +324 -0
  23. package/dist/structures/ClientApplication.js +241 -0
  24. package/dist/structures/ClientApplication.js.map +1 -0
  25. package/dist/structures/Guild.d.ts +17 -17
  26. package/dist/structures/Guild.js +7 -45
  27. package/dist/structures/Guild.js.map +1 -1
  28. package/dist/structures/GuildMember.d.ts +1 -1
  29. package/dist/structures/GuildScheduledEvent.js +2 -2
  30. package/dist/structures/GuildScheduledEvent.js.map +1 -1
  31. package/dist/structures/GuildTemplate.js +1 -3
  32. package/dist/structures/GuildTemplate.js.map +1 -1
  33. package/dist/structures/Integration.d.ts +1 -1
  34. package/dist/structures/Interaction.d.ts +3 -18
  35. package/dist/structures/Interaction.js +23 -63
  36. package/dist/structures/Interaction.js.map +1 -1
  37. package/dist/structures/Invite.d.ts +2 -1
  38. package/dist/structures/Invite.js.map +1 -1
  39. package/dist/structures/Message.d.ts +3 -3
  40. package/dist/structures/Message.js +8 -169
  41. package/dist/structures/Message.js.map +1 -1
  42. package/dist/structures/SKU.d.ts +1 -1
  43. package/dist/structures/SKU.js +3 -3
  44. package/dist/structures/StageInstance.d.ts +1 -1
  45. package/dist/structures/StageInstance.js.map +1 -1
  46. package/dist/structures/UnavailableGuild.d.ts +2 -487
  47. package/dist/structures/UnavailableGuild.js +0 -915
  48. package/dist/structures/UnavailableGuild.js.map +1 -1
  49. package/dist/structures/User.d.ts +2 -2
  50. package/dist/structures/User.js +1 -1
  51. package/dist/structures/User.js.map +1 -1
  52. package/dist/structures/Webhook.js +2 -2
  53. package/dist/structures/Webhook.js.map +1 -1
  54. package/dist/structures/index.d.ts +2 -1
  55. package/dist/structures/index.js +2 -1
  56. package/dist/structures/index.js.map +1 -1
  57. package/dist/types/application.d.ts +3 -3
  58. package/dist/types/auto-moderation.d.ts +3 -3
  59. package/dist/types/channel.d.ts +36 -21
  60. package/dist/types/gateway-events.d.ts +12 -12
  61. package/dist/types/guild.d.ts +5 -5
  62. package/dist/types/interaction.d.ts +45 -28
  63. package/dist/types/invite.d.ts +3 -2
  64. package/dist/types/sku.d.ts +1 -1
  65. package/dist/types/stage-instance.d.ts +3 -2
  66. package/dist/types/team.d.ts +1 -1
  67. package/dist/types/user.d.ts +3 -3
  68. package/dist/utils/Util.d.ts +5 -2
  69. package/dist/utils/Util.js +168 -9
  70. package/dist/utils/Util.js.map +1 -1
  71. package/package.json +1 -1
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientApplication = void 0;
4
+ const _1 = require(".");
5
+ const rest_1 = require("../rest");
6
+ class ClientApplication extends _1.Base {
7
+ raw;
8
+ flags;
9
+ constructor(data, client) {
10
+ super(data.id, client);
11
+ this.raw = data;
12
+ this.patch(data);
13
+ }
14
+ patch(data) {
15
+ if (data.flags !== undefined)
16
+ this.flags = data.flags;
17
+ }
18
+ /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands */
19
+ async bulkEditGlobalApplicationCommands(commands) {
20
+ return this.client.rest
21
+ .put(rest_1.Endpoints.applicationCommands(this.id), {
22
+ json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
23
+ })
24
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
25
+ }
26
+ /** https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands */
27
+ async bulkEditGuildApplicationCommands(guildId, commands) {
28
+ return this.client.rest
29
+ .put(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
30
+ json: commands.map((command) => this.client.util.applicationCommandToRaw(command)),
31
+ })
32
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
33
+ }
34
+ /** https://discord.com/developers/docs/interactions/application-commands#create-global-application-command */
35
+ async createGlobalApplicationCommand(options) {
36
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationCommands(this.id), {
37
+ json: this.client.util.applicationCommandToRaw(options),
38
+ }), this.client);
39
+ }
40
+ /** https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command */
41
+ async createGuildApplicationCommand(guildId, options) {
42
+ return new _1.ApplicationCommand(await this.client.rest.post(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
43
+ json: this.client.util.applicationCommandToRaw(options),
44
+ }), this.client);
45
+ }
46
+ /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
47
+ async createTestEntitlement(options) {
48
+ return new _1.TestEntitlement(await this.client.rest.post(rest_1.Endpoints.applicationEntitlements(this.id), {
49
+ json: {
50
+ sku_id: options.skuId,
51
+ owner_id: options.ownerId,
52
+ owner_type: options.ownerType,
53
+ },
54
+ }), this.client);
55
+ }
56
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command */
57
+ deleteGlobalApplicationCommand(commandId) {
58
+ this.client.rest.delete(rest_1.Endpoints.applicationCommand(this.id, commandId));
59
+ }
60
+ /** https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command */
61
+ deleteGuildApplicationCommand(guildId, commandId) {
62
+ this.client.rest.delete(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId));
63
+ }
64
+ /** https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement */
65
+ deleteTestEntitlement(entitlementId) {
66
+ this.client.rest.delete(rest_1.Endpoints.applicationEntitlement(this.id, entitlementId));
67
+ }
68
+ /** https://discord.com/developers/docs/resources/application#edit-current-application */
69
+ async edit(options) {
70
+ return new _1.Application(await this.client.rest.patch(rest_1.Endpoints.applicationCurrentUser(), {
71
+ json: {
72
+ custom_install_url: options.customInstallURL,
73
+ description: options.description,
74
+ role_connections_verification_url: options.roleConnectionsVerificationURL,
75
+ install_params: options.installParams,
76
+ flags: options.flags,
77
+ icon: options.icon,
78
+ cover_image: options.coverImage,
79
+ interactions_endpoint_url: options.interactionsEndpointURL,
80
+ tags: options.tags,
81
+ },
82
+ }), this.client);
83
+ }
84
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
85
+ async editApplicationCommandPermissions(guildId, commandId, options) {
86
+ return this.client.rest
87
+ .put(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId), {
88
+ json: {
89
+ permissions: options.permissions.map((option) => ({
90
+ id: option.id,
91
+ application_id: option.applicationId,
92
+ guild_id: option.guildId,
93
+ permissions: option.permissions.map((permission) => ({
94
+ id: permission.id,
95
+ type: permission.type,
96
+ permission: permission.permission,
97
+ })),
98
+ })),
99
+ },
100
+ })
101
+ .then((response) => ({
102
+ id: response.id,
103
+ applicationId: response.application_id,
104
+ guildId: response.guild_id,
105
+ permissions: response.permissions.map((permission) => ({
106
+ id: permission.id,
107
+ type: permission.type,
108
+ permission: permission.permission,
109
+ })),
110
+ }));
111
+ }
112
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command */
113
+ async editGlobalApplicationCommand(commandId, options) {
114
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationCommand(this.id, commandId), {
115
+ json: this.client.util.applicationCommandToRaw(options),
116
+ }), this.client);
117
+ }
118
+ /** https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command */
119
+ async editGuildApplicationCommand(guildId, commandId, options) {
120
+ return new _1.ApplicationCommand(await this.client.rest.patch(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId), {
121
+ json: this.client.util.applicationCommandToRaw(options),
122
+ }), this.client);
123
+ }
124
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
125
+ async getApplicationCommandPermissions(guildId, commandId) {
126
+ return this.client.rest
127
+ .get(rest_1.Endpoints.applicationCommandPermissions(this.id, guildId, commandId))
128
+ .then((response) => response.map((permissions) => ({
129
+ id: permissions.id,
130
+ applicationId: permissions.application_id,
131
+ guildId: permissions.guild_id,
132
+ permissions: permissions.permissions.map((permission) => ({
133
+ id: permission.id,
134
+ type: permission.type,
135
+ permission: permission.permission,
136
+ })),
137
+ })));
138
+ }
139
+ /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
140
+ async getEntitlements(options) {
141
+ return this.client.rest
142
+ .get(rest_1.Endpoints.applicationEntitlements(this.id), {
143
+ query: {
144
+ user_id: options?.userId,
145
+ sku_ids: options?.skuIds,
146
+ before: options?.before,
147
+ after: options?.after,
148
+ limit: options?.limit,
149
+ guild_id: options?.guildId,
150
+ exclude_ended: options?.excludeEnded,
151
+ },
152
+ })
153
+ .then((response) => response.map((data) => new _1.Entitlement(data, this.client)));
154
+ }
155
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-command */
156
+ async getGlobalApplicationCommand(commandId) {
157
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationCommand(this.id, commandId)), this.client);
158
+ }
159
+ /** https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands */
160
+ async getGlobalApplicationCommands(options) {
161
+ return this.client.rest
162
+ .get(rest_1.Endpoints.applicationCommands(this.id), {
163
+ query: {
164
+ with_localizations: options.withLocalizations,
165
+ },
166
+ })
167
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
168
+ }
169
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
170
+ async getGuildApplicationCommand(guildId, commandId) {
171
+ return new _1.ApplicationCommand(await this.client.rest.get(rest_1.Endpoints.applicationGuildCommand(this.id, guildId, commandId)), this.client);
172
+ }
173
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
174
+ async getGuildApplicationCommands(guildId, options) {
175
+ return this.client.rest
176
+ .get(rest_1.Endpoints.applicationGuildCommands(this.id, guildId), {
177
+ query: {
178
+ with_localizations: options?.withLocalizations,
179
+ },
180
+ })
181
+ .then((response) => response.map((data) => new _1.ApplicationCommand(data, this.client)));
182
+ }
183
+ /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions */
184
+ async getGuildApplicationCommandPermissions(guildId) {
185
+ return this.client.rest
186
+ .get(rest_1.Endpoints.guildApplicationCommandsPermissions(this.id, guildId))
187
+ .then((response) => response.map((permissions) => ({
188
+ id: permissions.id,
189
+ applicationId: permissions.application_id,
190
+ guildId: permissions.guild_id,
191
+ permissions: permissions.permissions.map((permission) => ({
192
+ id: permission.id,
193
+ type: permission.type,
194
+ permission: permission.permission,
195
+ })),
196
+ })));
197
+ }
198
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
199
+ async getApplicationRoleConnectionMetadataRecords() {
200
+ return this.client.rest
201
+ .get(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
202
+ .then((response) => response.map((data) => ({
203
+ type: data.type,
204
+ key: data.key,
205
+ name: data.name,
206
+ nameLocalizations: data.name_localizations,
207
+ description: data.description,
208
+ descriptionLocalizations: data.description_localizations,
209
+ })));
210
+ }
211
+ /** https://discord.com/developers/docs/monetization/skus#list-skus */
212
+ async getSKUs() {
213
+ return this.client.rest
214
+ .get(rest_1.Endpoints.applicationSKUs(this.id))
215
+ .then((response) => response.map((data) => new _1.SKU(data, this.client)));
216
+ }
217
+ /** https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records */
218
+ async updateApplicationRoleConnectionMetadataRecords() {
219
+ return this.client.rest
220
+ .put(rest_1.Endpoints.applicationRoleConnectionMetadata(this.id))
221
+ .then((response) => response.map((data) => ({
222
+ type: data.type,
223
+ key: data.key,
224
+ name: data.name,
225
+ nameLocalizations: data.name_localizations,
226
+ description: data.description,
227
+ descriptionLocalizations: data.description_localizations,
228
+ })));
229
+ }
230
+ toRaw() {
231
+ return this.raw;
232
+ }
233
+ toJSON() {
234
+ return {
235
+ ...super.toJSON(),
236
+ flags: this.flags,
237
+ };
238
+ }
239
+ }
240
+ exports.ClientApplication = ClientApplication;
241
+ //# sourceMappingURL=ClientApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientApplication.js","sourceRoot":"","sources":["../../src/structures/ClientApplication.ts"],"names":[],"mappings":";;;AAAA,wBAOW;AAeX,kCAAoC;AASpC,MAAa,iBAAkB,SAAQ,OAAI;IACtB,GAAG,CAAuC;IAC7D,KAAK,CAAoB;IAEzB,YAAY,IAA0C,EAAE,MAAc;QACpE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAEhB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAEkB,KAAK,CAAC,IAA0C;QACjE,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACxD,CAAC;IAED,uHAAuH;IACvH,KAAK,CAAC,iCAAiC,CACrC,QAyCE;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;aACpB,GAAG,CACF,gBAAS,CAAC,mBAAmB,C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SACzD,CAAC,CAAC,CACJ,CAAC;IACN,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AAnpBD,8CAmpBC"}
@@ -1,8 +1,8 @@
1
- import { ApplicationCommand, AutoModerationRule, Base, Channel, Emoji, GuildMember, GuildScheduledEvent, GuildTemplate, Integration, Invite, Role, StageInstance, Sticker, VoiceState, Webhook } from ".";
1
+ import { ApplicationCommand, AuditLog, AutoModerationRule, Base, Channel, Emoji, GuildMember, GuildScheduledEvent, GuildTemplate, Integration, Invite, Role, StageInstance, Sticker, VoiceState, Webhook } from ".";
2
2
  import type { Client } from "../Client";
3
3
  import { type File } from "../rest";
4
- import type { JSONApplicationCommandOptionChoice, JSONAuditLog, JSONAutoModerationAction, JSONBan, JSONDefaultReaction, JSONForumTag, JSONGuild, JSONGuildApplicationCommandPermissions, JSONGuildOnboarding, JSONGuildPreview, JSONGuildScheduledEventEntityMetadata, JSONGuildScheduledEventUser, JSONGuildTemplate, JSONGuildWidget, JSONGuildWidgetSettings, JSONOnboardingPrompt, JSONOverwrite, PresenceUpdateEventFields, JSONThreadMember, JSONVoiceRegion, JSONWelcomeScreen, JSONWelcomeScreenChannel, RawGuild, RawGuildCreateEventExtraFields, JSONGuildCreateEventExtraFields } from "../types";
5
- import type { ApplicationCommandOptionType, ApplicationCommandTypes, ChannelTypes, DefaultMessageNotificationLevel, ExplicitContentFilterLevel, GuildFeatures, GuildMemberFlags, GuildNSFWLevel, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, ImageWidgetStyleOptions, Locale, MFALevel, OnboardingMode, PremiumTier, SystemChannelFlags, VerificationLevel } from "../constants";
4
+ import type { JSONApplicationCommandOptionChoice, JSONAutoModerationAction, JSONBan, JSONDefaultReaction, JSONForumTag, JSONGuild, JSONGuildApplicationCommandPermissions, JSONGuildOnboarding, JSONGuildPreview, JSONGuildScheduledEventEntityMetadata, JSONGuildScheduledEventUser, JSONGuildTemplate, JSONGuildWidget, JSONGuildWidgetSettings, JSONOnboardingPrompt, JSONOverwrite, PresenceUpdateEventFields, JSONThreadMember, JSONVoiceRegion, JSONWelcomeScreen, JSONWelcomeScreenChannel, RawGuild, RawGuildCreateEventExtraFields, JSONGuildCreateEventExtraFields, JSONTriggerMetadata } from "../types";
5
+ import type { ActionTypes, ApplicationCommandOptionType, ApplicationCommandTypes, ChannelTypes, DefaultMessageNotificationLevel, EventTypes, ExplicitContentFilterLevel, ForumLayoutTypes, GuildFeatures, GuildMemberFlags, GuildNSFWLevel, GuildScheduledEventEntityTypes, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, ImageWidgetStyleOptions, Locale, MFALevel, OnboardingMode, PremiumTier, SortOrderTypes, SystemChannelFlags, TriggerTypes, VerificationLevel, VideoQualityModes } from "../constants";
6
6
  /** https://discord.com/developers/docs/resources/guild */
7
7
  export declare class Guild extends Base {
8
8
  protected raw: RawGuild & Partial<RawGuildCreateEventExtraFields>;
@@ -28,7 +28,7 @@ export declare class Guild extends Base {
28
28
  mfaLevel: MFALevel;
29
29
  applicationId: string | null;
30
30
  systemChannelId: string | null;
31
- systemChannelFlags: number;
31
+ systemChannelFlags: SystemChannelFlags;
32
32
  rulesChannelId: string | null;
33
33
  maxPresences?: number | null;
34
34
  maxMembers?: number;
@@ -48,7 +48,7 @@ export declare class Guild extends Base {
48
48
  stickers?: Array<Sticker>;
49
49
  premiumProgressBarEnabled: boolean;
50
50
  safetyAlertsChannelId: string | null;
51
- joinedAt?: number;
51
+ joinedAt?: string;
52
52
  large?: boolean;
53
53
  unavailable?: boolean;
54
54
  memberCount?: number;
@@ -166,9 +166,9 @@ export declare class Guild extends Base {
166
166
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
167
167
  createAutoModerationRule(options: {
168
168
  name: string;
169
- eventType: number;
170
- triggerType: number;
171
- triggerMetadata?: object;
169
+ eventType: EventTypes;
170
+ triggerType: TriggerTypes;
171
+ triggerMetadata?: JSONTriggerMetadata;
172
172
  actions: Array<JSONAutoModerationAction>;
173
173
  enabled?: boolean;
174
174
  exemptRoles?: Array<string>;
@@ -192,12 +192,12 @@ export declare class Guild extends Base {
192
192
  parentId?: string | null;
193
193
  nsfw?: boolean;
194
194
  rtcRegion?: string | null;
195
- videoQualityMode?: number;
195
+ videoQualityMode?: VideoQualityModes;
196
196
  defaultAutoArchiveDuration?: number;
197
197
  defaultReactionEmoji?: JSONDefaultReaction | null;
198
198
  availableTags?: Array<JSONForumTag>;
199
- defaultSortOrder?: number | null;
200
- defaultForumLayout?: number;
199
+ defaultSortOrder?: SortOrderTypes | null;
200
+ defaultForumLayout?: ForumLayoutTypes;
201
201
  defaultThreadRateLimitPerUser?: number;
202
202
  }, reason?: string): Promise<Channel>;
203
203
  /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
@@ -326,9 +326,9 @@ export declare class Guild extends Base {
326
326
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
327
327
  editAutoModerationRule(ruleId: string, options: {
328
328
  name?: string;
329
- eventType?: number;
330
- triggerType?: number;
331
- triggerMetadata?: object;
329
+ eventType?: EventTypes;
330
+ triggerType?: TriggerTypes;
331
+ triggerMetadata?: JSONTriggerMetadata;
332
332
  actions?: Array<JSONAutoModerationAction>;
333
333
  enabled?: boolean;
334
334
  exemptRoles?: Array<string>;
@@ -451,11 +451,11 @@ export declare class Guild extends Base {
451
451
  /** https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */
452
452
  getAuditLog(options?: {
453
453
  userId?: string;
454
- actionType?: number;
454
+ actionType?: ActionTypes;
455
455
  before?: string;
456
456
  after?: string;
457
457
  limit?: number;
458
- }): Promise<JSONAuditLog>;
458
+ }): Promise<AuditLog>;
459
459
  /** https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */
460
460
  getAutoModerationRule(ruleId: string): Promise<AutoModerationRule>;
461
461
  /** https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */
@@ -533,7 +533,7 @@ export declare class Guild extends Base {
533
533
  getWidgetSettings(): Promise<JSONGuildWidgetSettings>;
534
534
  /** https://discord.com/developers/docs/resources/guild#remove-guild-ban */
535
535
  removeBan(userId: string, reason?: string): void;
536
- /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
536
+ /** https://discord.com/developers/docs/resources/guild#remove-guild-member */
537
537
  removeMember(userId: string, reason?: string): void;
538
538
  /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
539
539
  removeMemberRole(userId: string, roleId: string, reason?: string): void;
@@ -743,8 +743,7 @@ class Guild extends _1.Base {
743
743
  }
744
744
  /** https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log */
745
745
  async getAuditLog(options) {
746
- return this.client.rest
747
- .get(rest_1.Endpoints.guildAuditLog(this.id), {
746
+ return new _1.AuditLog(await this.client.rest.get(rest_1.Endpoints.guildAuditLog(this.id), {
748
747
  query: {
749
748
  user_id: options?.userId,
750
749
  action_type: options?.actionType,
@@ -752,44 +751,7 @@ class Guild extends _1.Base {
752
751
  after: options?.after,
753
752
  limit: options?.limit,
754
753
  },
755
- })
756
- .then((response) => ({
757
- applicationCommands: response.application_commands.map((applicationCommand) => new _1.ApplicationCommand(applicationCommand, this.client)),
758
- auditLogEntries: response.audit_log_entries.map((auditLogEntry) => ({
759
- targetId: auditLogEntry.target_id,
760
- changes: auditLogEntry.changes?.map((change) => ({
761
- newValue: change.new_value,
762
- oldValue: change.old_value,
763
- key: change.key,
764
- })),
765
- userId: auditLogEntry.user_id,
766
- id: auditLogEntry.id,
767
- actionType: auditLogEntry.action_type,
768
- options: auditLogEntry.options !== undefined
769
- ? {
770
- applicationId: auditLogEntry.options.application_id,
771
- autoModerationRuleName: auditLogEntry.options.auto_moderation_rule_name,
772
- autoModerationRuleTriggerType: auditLogEntry.options.auto_moderation_rule_trigger_type,
773
- channelId: auditLogEntry.options.channel_id,
774
- count: auditLogEntry.options.count,
775
- deleteMemberDays: auditLogEntry.options.delete_member_days,
776
- id: auditLogEntry.options.id,
777
- membersRemoved: auditLogEntry.options.members_removed,
778
- messageId: auditLogEntry.options.message_id,
779
- roleName: auditLogEntry.options.role_name,
780
- type: auditLogEntry.options.type,
781
- integrationType: auditLogEntry.options.integration_type,
782
- }
783
- : undefined,
784
- reason: auditLogEntry.reason,
785
- })),
786
- autoModerationRules: response.auto_moderation_rules.map((autoModerationRule) => new _1.AutoModerationRule(autoModerationRule, this.client)),
787
- guildScheduledEvents: response.guild_scheduled_events.map((guildScheduledEvent) => new _1.GuildScheduledEvent(guildScheduledEvent, this.client)),
788
- integrations: response.integrations.map((integration) => new _1.Integration(integration, this.client)),
789
- threads: response.threads.map((thread) => new _1.Channel(thread, this.client)),
790
- users: response.users.map((user) => new _1.User(user, this.client)),
791
- webhooks: response.webhooks.map((webhook) => new _1.Webhook(webhook, this.client)),
792
- }));
754
+ }), this.client);
793
755
  }
794
756
  /** https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */
795
757
  async getAutoModerationRule(ruleId) {
@@ -822,7 +784,7 @@ class Guild extends _1.Base {
822
784
  })
823
785
  .then((response) => response.map((data) => ({
824
786
  reason: data.reason,
825
- user: new _1.User(data.user, this.client),
787
+ user: new _1.User(data.user, this.client).toJSON(),
826
788
  })));
827
789
  }
828
790
  /** https://discord.com/developers/docs/resources/guild#get-guild-channels */
@@ -966,9 +928,9 @@ class Guild extends _1.Base {
966
928
  })
967
929
  .then((response) => response.map((data) => ({
968
930
  guildScheduledEventId: data.guild_scheduled_event_id,
969
- user: new _1.User(data.user, this.client),
931
+ user: new _1.User(data.user, this.client).toJSON(),
970
932
  member: data.member !== undefined
971
- ? new _1.GuildMember(data.member, this.client)
933
+ ? new _1.GuildMember(data.member, this.client).toJSON()
972
934
  : undefined,
973
935
  })));
974
936
  }
@@ -996,7 +958,7 @@ class Guild extends _1.Base {
996
958
  }
997
959
  /** https://discord.com/developers/docs/resources/guild#get-guild-vanity-url */
998
960
  getVanityURL() {
999
- return this.client.rest.get(rest_1.Endpoints.guildVanityUrl(this.id));
961
+ return this.client.rest.get(rest_1.Endpoints.guildVanityURL(this.id));
1000
962
  }
1001
963
  /** https://discord.com/developers/docs/resources/guild#get-guild-voice-regions */
1002
964
  async getVoiceRegions() {
@@ -1066,7 +1028,7 @@ class Guild extends _1.Base {
1066
1028
  reason,
1067
1029
  });
1068
1030
  }
1069
- /** https://discord.com/developers/docs/resources/guild#remove-guild-member-role */
1031
+ /** https://discord.com/developers/docs/resources/guild#remove-guild-member */
1070
1032
  removeMember(userId, reason) {
1071
1033
  this.client.rest.delete(rest_1.Endpoints.guildMember(this.id, userId), {
1072
1034
  reason,