disgroove 2.2.3-dev.f471c4a → 2.2.4-dev.194edcf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
4
- exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
4
+ exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = void 0;
5
+ exports.voiceRegions = void 0;
5
6
  // Guilds
6
7
  const guild = (guildID) => `guilds/${guildID}`;
7
8
  exports.guild = guild;
@@ -160,6 +161,10 @@ const applicationCommandPermissions = (applicationID, guildID, commandID) => `ap
160
161
  exports.applicationCommandPermissions = applicationCommandPermissions;
161
162
  const applicationUser = () => "applications/@me";
162
163
  exports.applicationUser = applicationUser;
164
+ const applicationEmoji = (applicationID, emojiID) => `applications/${applicationID}/emojis/${emojiID}`;
165
+ exports.applicationEmoji = applicationEmoji;
166
+ const applicationEmojis = (applicationID) => `applications/${applicationID}/emojis`;
167
+ exports.applicationEmojis = applicationEmojis;
163
168
  const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
164
169
  exports.applicationEntitlement = applicationEntitlement;
165
170
  const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
@@ -185,6 +190,11 @@ const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `we
185
190
  exports.webhookMessage = webhookMessage;
186
191
  const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
187
192
  exports.webhookPlatform = webhookPlatform;
193
+ // Sticker packs
194
+ const stickerPack = (packID) => `sticker-packs/${packID}`;
195
+ exports.stickerPack = stickerPack;
196
+ const stickerPacks = () => "sticker-packs";
197
+ exports.stickerPacks = stickerPacks;
188
198
  // Gateway
189
199
  const gateway = () => "gateway";
190
200
  exports.gateway = gateway;
@@ -212,7 +222,5 @@ const stageInstances = () => "stage-instances";
212
222
  exports.stageInstances = stageInstances;
213
223
  const sticker = (stickerID) => `stickers/${stickerID}`;
214
224
  exports.sticker = sticker;
215
- const stickerPacks = () => "sticker-packs";
216
- exports.stickerPacks = stickerPacks;
217
225
  const voiceRegions = () => "voice/regions";
218
226
  exports.voiceRegions = voiceRegions;
@@ -30,6 +30,7 @@ class Applications {
30
30
  coverImage: application.cover_image,
31
31
  flags: application.flags,
32
32
  approximateGuildCount: application.approximate_guild_count,
33
+ approximateUserInstallCount: application.approximate_user_install_count,
33
34
  redirectURIs: application.redirect_uris,
34
35
  interactionsEndpointURL: application.interactions_endpoint_url,
35
36
  roleConnectionsVerificationURL: application.role_connections_verification_url,
@@ -75,6 +76,7 @@ class Applications {
75
76
  cover_image: application.coverImage,
76
77
  flags: application.flags,
77
78
  approximate_guild_count: application.approximateGuildCount,
79
+ approximate_user_install_count: application.approximateUserInstallCount,
78
80
  redirect_uris: application.redirectURIs,
79
81
  interactions_endpoint_url: application.interactionsEndpointURL,
80
82
  role_connections_verification_url: application.roleConnectionsVerificationURL,
@@ -1,16 +1,7 @@
1
- import type { RawAttachment, Attachment, RawChannel, Channel, RawEmbed, Embed, RawMessage, Message, RawThreadMember, ThreadMember } from "../types/channel";
2
- import type { RawActionRow, ActionRow } from "../types/message-components";
1
+ import type { RawChannel, Channel, RawThreadMember, ThreadMember } from "../types/channel";
3
2
  export declare class Channels {
4
- static attachmentFromRaw(attachment: RawAttachment): Attachment;
5
- static attachmentToRaw(attachment: Attachment): RawAttachment;
6
3
  static channelFromRaw(channel: RawChannel): Channel;
7
4
  static channelToRaw(channel: Channel): RawChannel;
8
- static componentsFromRaw(components: Array<RawActionRow>): Array<ActionRow>;
9
- static componentsToRaw(components: Array<ActionRow>): Array<RawActionRow>;
10
- static embedFromRaw(embed: RawEmbed): Embed;
11
- static embedToRaw(embed: Embed): RawEmbed;
12
- static messageFromRaw(message: RawMessage): Message;
13
- static messageToRaw(message: Message): RawMessage;
14
5
  static threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
15
6
  static threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
16
7
  }
@@ -1,51 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Channels = void 0;
4
- const constants_1 = require("../constants");
5
- const Applications_1 = require("./Applications");
6
- const Emojis_1 = require("./Emojis");
7
4
  const Guilds_1 = require("./Guilds");
8
- const Interactions_1 = require("./Interactions");
9
- const Polls_1 = require("./Polls");
10
- const Stickers_1 = require("./Stickers");
11
5
  const Users_1 = require("./Users");
12
6
  class Channels {
13
- static attachmentFromRaw(attachment) {
14
- return {
15
- id: attachment.id,
16
- filename: attachment.filename,
17
- title: attachment.title,
18
- description: attachment.description,
19
- contentType: attachment.content_type,
20
- size: attachment.size,
21
- url: attachment.url,
22
- proxyURL: attachment.proxy_url,
23
- height: attachment.height,
24
- width: attachment.width,
25
- ephemeral: attachment.ephemeral,
26
- durationSecs: attachment.duration_secs,
27
- waveform: attachment.waveform,
28
- flags: attachment.flags,
29
- };
30
- }
31
- static attachmentToRaw(attachment) {
32
- return {
33
- id: attachment.id,
34
- filename: attachment.filename,
35
- title: attachment.title,
36
- description: attachment.description,
37
- content_type: attachment.contentType,
38
- size: attachment.size,
39
- url: attachment.url,
40
- proxy_url: attachment.proxyURL,
41
- height: attachment.height,
42
- width: attachment.width,
43
- ephemeral: attachment.ephemeral,
44
- duration_secs: attachment.durationSecs,
45
- waveform: attachment.waveform,
46
- flags: attachment.flags,
47
- };
48
- }
49
7
  static channelFromRaw(channel) {
50
8
  return {
51
9
  id: channel.id,
@@ -182,474 +140,6 @@ class Channels {
182
140
  default_forum_layout: channel.defaultForumLayout,
183
141
  };
184
142
  }
185
- static componentsFromRaw(components) {
186
- return components.map((component) => ({
187
- type: component.type,
188
- components: component.components.map((c) => {
189
- switch (c.type) {
190
- case constants_1.ComponentTypes.Button: {
191
- return {
192
- type: c.type,
193
- style: c.style,
194
- label: c.label,
195
- emoji: c.emoji !== undefined
196
- ? {
197
- name: c.emoji.name,
198
- id: c.emoji.id,
199
- animated: c.emoji.animated,
200
- }
201
- : undefined,
202
- customID: c.custom_id,
203
- skuID: c.sku_id,
204
- url: c.url,
205
- disabled: c.disabled,
206
- };
207
- }
208
- case constants_1.ComponentTypes.TextInput: {
209
- return {
210
- type: c.type,
211
- customID: c.custom_id,
212
- style: c.style,
213
- label: c.label,
214
- minLength: c.min_length,
215
- maxLength: c.max_length,
216
- required: c.required,
217
- value: c.value,
218
- placeholder: c.placeholder,
219
- };
220
- }
221
- case constants_1.ComponentTypes.ChannelSelect: {
222
- return {
223
- type: c.type,
224
- customID: c.custom_id,
225
- channelTypes: c.channel_types,
226
- placeholder: c.placeholder,
227
- defaultValues: c.default_values,
228
- minValues: c.min_values,
229
- maxValues: c.max_values,
230
- disabled: c.disabled,
231
- };
232
- }
233
- case constants_1.ComponentTypes.StringSelect: {
234
- return {
235
- type: c.type,
236
- customID: c.custom_id,
237
- placeholder: c.placeholder,
238
- options: c.options?.map((option) => ({
239
- label: option.label,
240
- value: option.value,
241
- description: option.description,
242
- emoji: option.emoji !== undefined
243
- ? {
244
- name: option.emoji.name,
245
- id: option.emoji.id,
246
- animated: option.emoji.animated,
247
- }
248
- : undefined,
249
- default: option.default,
250
- })),
251
- minValues: c.min_values,
252
- maxValues: c.max_values,
253
- disabled: c.disabled,
254
- };
255
- }
256
- case constants_1.ComponentTypes.MentionableSelect:
257
- case constants_1.ComponentTypes.RoleSelect:
258
- case constants_1.ComponentTypes.UserSelect: {
259
- return {
260
- type: c.type,
261
- customID: c.custom_id,
262
- placeholder: c.placeholder,
263
- defaultValues: c.default_values,
264
- minValues: c.min_values,
265
- maxValues: c.max_values,
266
- disabled: c.disabled,
267
- };
268
- }
269
- }
270
- }),
271
- }));
272
- }
273
- static componentsToRaw(components) {
274
- return components.map((component) => ({
275
- type: component.type,
276
- components: component.components.map((c) => {
277
- switch (c.type) {
278
- case constants_1.ComponentTypes.Button: {
279
- return {
280
- type: c.type,
281
- style: c.style,
282
- label: c.label,
283
- emoji: c.emoji !== undefined
284
- ? {
285
- name: c.emoji.name,
286
- id: c.emoji.id,
287
- animated: c.emoji.animated,
288
- }
289
- : undefined,
290
- custom_id: c.customID,
291
- sku_id: c.skuID,
292
- url: c.url,
293
- disabled: c.disabled,
294
- };
295
- }
296
- case constants_1.ComponentTypes.TextInput: {
297
- return {
298
- type: c.type,
299
- custom_id: c.customID,
300
- style: c.style,
301
- label: c.label,
302
- min_length: c.minLength,
303
- max_length: c.maxLength,
304
- required: c.required,
305
- value: c.value,
306
- placeholder: c.placeholder,
307
- };
308
- }
309
- case constants_1.ComponentTypes.ChannelSelect: {
310
- return {
311
- type: c.type,
312
- custom_id: c.customID,
313
- channel_types: c.channelTypes,
314
- placeholder: c.placeholder,
315
- default_values: c.defaultValues,
316
- min_values: c.minValues,
317
- max_values: c.maxValues,
318
- disabled: c.disabled,
319
- };
320
- }
321
- case constants_1.ComponentTypes.StringSelect: {
322
- return {
323
- type: c.type,
324
- custom_id: c.customID,
325
- placeholder: c.placeholder,
326
- options: c.options?.map((option) => ({
327
- label: option.label,
328
- value: option.value,
329
- description: option.description,
330
- emoji: option.emoji !== undefined
331
- ? {
332
- name: option.emoji.name,
333
- id: option.emoji.id,
334
- animated: option.emoji.animated,
335
- }
336
- : undefined,
337
- default: option.default,
338
- })),
339
- min_values: c.minValues,
340
- max_values: c.maxValues,
341
- disabled: c.disabled,
342
- };
343
- }
344
- case constants_1.ComponentTypes.MentionableSelect:
345
- case constants_1.ComponentTypes.RoleSelect:
346
- case constants_1.ComponentTypes.UserSelect: {
347
- return {
348
- type: c.type,
349
- custom_id: c.customID,
350
- placeholder: c.placeholder,
351
- default_values: c.defaultValues,
352
- min_values: c.minValues,
353
- max_values: c.maxValues,
354
- disabled: c.disabled,
355
- };
356
- }
357
- }
358
- }),
359
- }));
360
- }
361
- static embedFromRaw(embed) {
362
- return {
363
- title: embed.title,
364
- type: embed.type,
365
- description: embed.description,
366
- url: embed.url,
367
- timestamp: embed.timestamp,
368
- color: embed.color,
369
- footer: embed.footer !== undefined
370
- ? {
371
- text: embed.footer.text,
372
- iconURL: embed.footer.icon_url,
373
- proxyIconURL: embed.footer.proxy_icon_url,
374
- }
375
- : undefined,
376
- image: embed.image !== undefined
377
- ? {
378
- url: embed.image.url,
379
- proxyURL: embed.image.proxy_url,
380
- height: embed.image.height,
381
- width: embed.image.width,
382
- }
383
- : undefined,
384
- thumbnail: embed.thumbnail !== undefined
385
- ? {
386
- url: embed.thumbnail.url,
387
- proxyURL: embed.thumbnail.proxy_url,
388
- height: embed.thumbnail.height,
389
- width: embed.thumbnail.width,
390
- }
391
- : undefined,
392
- video: {
393
- url: embed.video?.url,
394
- proxyURL: embed.video?.proxy_url,
395
- height: embed.video?.height,
396
- width: embed.video?.width,
397
- },
398
- provider: {
399
- name: embed.provider?.name,
400
- url: embed.provider?.url,
401
- },
402
- author: embed.author !== undefined
403
- ? {
404
- name: embed.author.name,
405
- url: embed.author.url,
406
- iconURL: embed.author.icon_url,
407
- proxyIconURL: embed.author.proxy_icon_url,
408
- }
409
- : undefined,
410
- fields: embed.fields,
411
- };
412
- }
413
- static embedToRaw(embed) {
414
- return {
415
- title: embed.title,
416
- type: embed.type,
417
- description: embed.description,
418
- url: embed.url,
419
- timestamp: embed.timestamp,
420
- color: embed.color,
421
- footer: embed.footer !== undefined
422
- ? {
423
- text: embed.footer.text,
424
- icon_url: embed.footer.iconURL,
425
- proxy_icon_url: embed.footer.proxyIconURL,
426
- }
427
- : undefined,
428
- image: embed.image !== undefined
429
- ? {
430
- url: embed.image.url,
431
- proxy_url: embed.image.proxyURL,
432
- height: embed.image.height,
433
- width: embed.image.width,
434
- }
435
- : undefined,
436
- thumbnail: embed.thumbnail !== undefined
437
- ? {
438
- url: embed.thumbnail.url,
439
- proxy_url: embed.thumbnail.proxyURL,
440
- height: embed.thumbnail.height,
441
- width: embed.thumbnail.width,
442
- }
443
- : undefined,
444
- video: {
445
- url: embed.video?.url,
446
- proxy_url: embed.video?.proxyURL,
447
- height: embed.video?.height,
448
- width: embed.video?.width,
449
- },
450
- provider: {
451
- name: embed.provider?.name,
452
- url: embed.provider?.url,
453
- },
454
- author: embed.author !== undefined
455
- ? {
456
- name: embed.author.name,
457
- url: embed.author.url,
458
- icon_url: embed.author.iconURL,
459
- proxy_icon_url: embed.author.proxyIconURL,
460
- }
461
- : undefined,
462
- fields: embed.fields,
463
- };
464
- }
465
- static messageFromRaw(message) {
466
- return {
467
- id: message.id,
468
- channelID: message.channel_id,
469
- author: Users_1.Users.userFromRaw(message.author),
470
- content: message.content,
471
- timestamp: message.timestamp,
472
- editedTimestamp: message.edited_timestamp,
473
- tts: message.tts,
474
- mentionEveryone: message.mention_everyone,
475
- mentions: message.mentions.map((user) => Users_1.Users.userFromRaw(user)),
476
- mentionRoles: message.mention_roles,
477
- mentionChannels: message.mention_channels?.map((channelMention) => ({
478
- id: channelMention.id,
479
- guildID: channelMention.guild_id,
480
- type: channelMention.type,
481
- name: channelMention.name,
482
- })),
483
- attachments: message.attachments.map((attachment) => Channels.attachmentFromRaw(attachment)),
484
- embeds: message.embeds,
485
- reactions: message.reactions?.map((reaction) => ({
486
- count: reaction.count,
487
- countDetails: reaction.count_details,
488
- me: reaction.me,
489
- meBurst: reaction.me_burst,
490
- emoji: Emojis_1.Emojis.emojiFromRaw(reaction.emoji),
491
- burstColors: reaction.burst_colors,
492
- })),
493
- nonce: message.nonce,
494
- pinned: message.pinned,
495
- webhookID: message.webhook_id,
496
- type: message.type,
497
- activity: message.activity,
498
- application: message.application !== undefined
499
- ? Applications_1.Applications.applicationFromRaw(message.application)
500
- : undefined,
501
- applicationID: message.application_id,
502
- messageReference: message.message_reference !== undefined
503
- ? {
504
- messageID: message.message_reference.message_id,
505
- channelID: message.message_reference.channel_id,
506
- guildID: message.message_reference.guild_id,
507
- failIfNotExists: message.message_reference.fail_if_not_exists,
508
- }
509
- : undefined,
510
- flags: message.flags,
511
- referencedMessage: message.referenced_message !== undefined
512
- ? message.referenced_message !== null
513
- ? Channels.messageFromRaw(message.referenced_message)
514
- : null
515
- : undefined,
516
- interactionMetadata: message.interaction_metadata !== undefined
517
- ? Interactions_1.Interactions.interactionMetadataFromRaw(message.interaction_metadata)
518
- : undefined,
519
- interaction: message.interaction !== undefined
520
- ? {
521
- id: message.interaction.id,
522
- type: message.interaction.type,
523
- name: message.interaction.name,
524
- user: Users_1.Users.userFromRaw(message.interaction.user),
525
- member: message.interaction.member !== undefined
526
- ? Guilds_1.Guilds.guildMemberFromRaw(message.interaction.member)
527
- : undefined,
528
- }
529
- : undefined,
530
- thread: message.thread !== undefined
531
- ? Channels.channelFromRaw(message.thread)
532
- : undefined,
533
- components: message.components !== undefined
534
- ? Channels.componentsFromRaw(message.components)
535
- : undefined,
536
- stickerItems: message.sticker_items?.map((stickerItem) => ({
537
- id: stickerItem.id,
538
- name: stickerItem.name,
539
- formatType: stickerItem.format_type,
540
- })),
541
- stickers: message.stickers?.map((sticker) => Stickers_1.Stickers.stickerFromRaw(sticker)),
542
- position: message.position,
543
- roleSubscriptionData: message.role_subscription_data !== undefined
544
- ? {
545
- roleSubscriptionListingID: message.role_subscription_data.role_subscription_listing_id,
546
- tierName: message.role_subscription_data.tier_name,
547
- totalMonthsSubscribed: message.role_subscription_data.total_months_subscribed,
548
- isRenewal: message.role_subscription_data.is_renewal,
549
- }
550
- : undefined,
551
- resolved: message.resolved !== undefined
552
- ? Interactions_1.Interactions.resolvedDataFromRaw(message.resolved)
553
- : undefined,
554
- poll: message.poll !== undefined
555
- ? Polls_1.Polls.pollFromRaw(message.poll)
556
- : undefined,
557
- call: message.call,
558
- };
559
- }
560
- static messageToRaw(message) {
561
- return {
562
- id: message.id,
563
- channel_id: message.channelID,
564
- author: Users_1.Users.userToRaw(message.author),
565
- content: message.content,
566
- timestamp: message.timestamp,
567
- edited_timestamp: message.editedTimestamp,
568
- tts: message.tts,
569
- mention_everyone: message.mentionEveryone,
570
- mentions: message.mentions.map((user) => Users_1.Users.userToRaw(user)),
571
- mention_roles: message.mentionRoles,
572
- mention_channels: message.mentionChannels?.map((channelMention) => ({
573
- id: channelMention.id,
574
- guild_id: channelMention.guildID,
575
- type: channelMention.type,
576
- name: channelMention.name,
577
- })),
578
- attachments: message.attachments.map((attachment) => Channels.attachmentToRaw(attachment)),
579
- embeds: message.embeds,
580
- reactions: message.reactions?.map((reaction) => ({
581
- count: reaction.count,
582
- count_details: reaction.countDetails,
583
- me: reaction.me,
584
- me_burst: reaction.meBurst,
585
- emoji: Emojis_1.Emojis.emojiToRaw(reaction.emoji),
586
- burst_colors: reaction.burstColors,
587
- })),
588
- nonce: message.nonce,
589
- pinned: message.pinned,
590
- webhook_id: message.webhookID,
591
- type: message.type,
592
- activity: message.activity,
593
- application: message.application !== undefined
594
- ? Applications_1.Applications.applicationToRaw(message.application)
595
- : undefined,
596
- application_id: message.applicationID,
597
- message_reference: message.messageReference !== undefined
598
- ? {
599
- message_id: message.messageReference.messageID,
600
- channel_id: message.messageReference.channelID,
601
- guild_id: message.messageReference.guildID,
602
- fail_if_not_exists: message.messageReference.failIfNotExists,
603
- }
604
- : undefined,
605
- flags: message.flags,
606
- referenced_message: message.referencedMessage !== undefined
607
- ? message.referencedMessage !== null
608
- ? Channels.messageToRaw(message.referencedMessage)
609
- : null
610
- : undefined,
611
- interaction_metadata: message.interactionMetadata !== undefined
612
- ? Interactions_1.Interactions.interactionMetadataToRaw(message.interactionMetadata)
613
- : undefined,
614
- interaction: message.interaction !== undefined
615
- ? {
616
- id: message.interaction.id,
617
- type: message.interaction.type,
618
- name: message.interaction.name,
619
- user: Users_1.Users.userToRaw(message.interaction.user),
620
- member: message.interaction.member !== undefined
621
- ? Guilds_1.Guilds.guildMemberToRaw(message.interaction.member)
622
- : undefined,
623
- }
624
- : undefined,
625
- thread: message.thread !== undefined
626
- ? Channels.channelToRaw(message.thread)
627
- : undefined,
628
- components: message.components !== undefined
629
- ? Channels.componentsToRaw(message.components)
630
- : undefined,
631
- sticker_items: message.stickerItems?.map((stickerItem) => ({
632
- id: stickerItem.id,
633
- name: stickerItem.name,
634
- format_type: stickerItem.formatType,
635
- })),
636
- stickers: message.stickers?.map((sticker) => Stickers_1.Stickers.stickerToRaw(sticker)),
637
- position: message.position,
638
- role_subscription_data: message.roleSubscriptionData !== undefined
639
- ? {
640
- role_subscription_listing_id: message.roleSubscriptionData.roleSubscriptionListingID,
641
- tier_name: message.roleSubscriptionData.tierName,
642
- total_months_subscribed: message.roleSubscriptionData.totalMonthsSubscribed,
643
- is_renewal: message.roleSubscriptionData.isRenewal,
644
- }
645
- : undefined,
646
- resolved: message.resolved !== undefined
647
- ? Interactions_1.Interactions.resolvedDataToRaw(message.resolved)
648
- : undefined,
649
- poll: message.poll !== undefined ? Polls_1.Polls.pollToRaw(message.poll) : undefined,
650
- call: message.call,
651
- };
652
- }
653
143
  static threadMemberFromRaw(threadMember) {
654
144
  return {
655
145
  id: threadMember.id,
@@ -1,5 +1,7 @@
1
- import type { RawGuildScheduledEvent, GuildScheduledEvent } from "../types/guild-scheduled-event";
1
+ import type { RawGuildScheduledEvent, GuildScheduledEvent, RawGuildScheduledEventRecurrenceRule, GuildScheduledEventRecurrenceRule } from "../types/guild-scheduled-event";
2
2
  export declare class GuildScheduledEvents {
3
+ static guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEventRecurrenceRule: RawGuildScheduledEventRecurrenceRule): GuildScheduledEventRecurrenceRule;
4
+ static guildScheduledEventRecurrenceRuleToRaw(guildScheduledEventRecurrenceRule: GuildScheduledEventRecurrenceRule): RawGuildScheduledEventRecurrenceRule;
3
5
  static guildScheduledEventFromRaw(guildScheduledEvent: RawGuildScheduledEvent): GuildScheduledEvent;
4
6
  static guildScheduledEventToRaw(guildScheduledEvent: GuildScheduledEvent): RawGuildScheduledEvent;
5
7
  }
@@ -3,6 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GuildScheduledEvents = void 0;
4
4
  const Users_1 = require("./Users");
5
5
  class GuildScheduledEvents {
6
+ static guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEventRecurrenceRule) {
7
+ return {
8
+ start: guildScheduledEventRecurrenceRule.start,
9
+ end: guildScheduledEventRecurrenceRule.end,
10
+ frequency: guildScheduledEventRecurrenceRule.frequency,
11
+ interval: guildScheduledEventRecurrenceRule.interval,
12
+ byWeekday: guildScheduledEventRecurrenceRule.by_weekday,
13
+ byNWeekday: guildScheduledEventRecurrenceRule.by_n_weekday,
14
+ byMonth: guildScheduledEventRecurrenceRule.by_month,
15
+ byMonthDay: guildScheduledEventRecurrenceRule.by_month_day,
16
+ byYearDay: guildScheduledEventRecurrenceRule.by_year_day,
17
+ count: guildScheduledEventRecurrenceRule.count,
18
+ };
19
+ }
20
+ static guildScheduledEventRecurrenceRuleToRaw(guildScheduledEventRecurrenceRule) {
21
+ return {
22
+ start: guildScheduledEventRecurrenceRule.start,
23
+ end: guildScheduledEventRecurrenceRule.end,
24
+ frequency: guildScheduledEventRecurrenceRule.frequency,
25
+ interval: guildScheduledEventRecurrenceRule.interval,
26
+ by_weekday: guildScheduledEventRecurrenceRule.byWeekday,
27
+ by_n_weekday: guildScheduledEventRecurrenceRule.byNWeekday,
28
+ by_month: guildScheduledEventRecurrenceRule.byMonth,
29
+ by_month_day: guildScheduledEventRecurrenceRule.byMonthDay,
30
+ by_year_day: guildScheduledEventRecurrenceRule.byYearDay,
31
+ count: guildScheduledEventRecurrenceRule.count,
32
+ };
33
+ }
6
34
  static guildScheduledEventFromRaw(guildScheduledEvent) {
7
35
  return {
8
36
  id: guildScheduledEvent.id,
@@ -23,6 +51,9 @@ class GuildScheduledEvents {
23
51
  : undefined,
24
52
  userCount: guildScheduledEvent.user_count,
25
53
  image: guildScheduledEvent.image,
54
+ recurrenceRule: guildScheduledEvent.reccurence_rule !== null
55
+ ? GuildScheduledEvents.guildScheduledEventRecurrenceRuleFromRaw(guildScheduledEvent.reccurence_rule)
56
+ : null,
26
57
  };
27
58
  }
28
59
  static guildScheduledEventToRaw(guildScheduledEvent) {
@@ -45,6 +76,9 @@ class GuildScheduledEvents {
45
76
  : undefined,
46
77
  user_count: guildScheduledEvent.userCount,
47
78
  image: guildScheduledEvent.image,
79
+ reccurence_rule: guildScheduledEvent.recurrenceRule !== null
80
+ ? GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(guildScheduledEvent.recurrenceRule)
81
+ : null,
48
82
  };
49
83
  }
50
84
  }
@@ -1,5 +1,5 @@
1
- import type { RawMessageInteractionMetadata, MessageInteractionMetadata } from "../types/channel";
2
1
  import type { RawInteraction, Interaction, RawResolvedData, ResolvedData } from "../types/interaction";
2
+ import type { RawMessageInteractionMetadata, MessageInteractionMetadata } from "../types/message";
3
3
  export declare class Interactions {
4
4
  static interactionFromRaw(interaction: RawInteraction): Interaction;
5
5
  static interactionMetadataFromRaw(interactionMetadata: RawMessageInteractionMetadata): MessageInteractionMetadata;