disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.281727f

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 (98) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +48 -48
  3. package/dist/lib/Client.d.ts +334 -301
  4. package/dist/lib/Client.js +580 -475
  5. package/dist/lib/constants.d.ts +36 -24
  6. package/dist/lib/constants.js +40 -27
  7. package/dist/lib/gateway/Dispatcher.d.ts +104 -0
  8. package/dist/lib/gateway/Dispatcher.js +471 -0
  9. package/dist/lib/gateway/Shard.d.ts +12 -21
  10. package/dist/lib/gateway/Shard.js +121 -570
  11. package/dist/lib/gateway/Transmitter.d.ts +22 -0
  12. package/dist/lib/gateway/Transmitter.js +93 -0
  13. package/dist/lib/gateway/WebSocketManager.d.ts +22 -0
  14. package/dist/lib/gateway/WebSocketManager.js +93 -0
  15. package/dist/lib/index.d.ts +5 -1
  16. package/dist/lib/index.js +5 -1
  17. package/dist/lib/rest/Endpoints.d.ts +96 -91
  18. package/dist/lib/rest/Endpoints.js +115 -104
  19. package/dist/lib/rest/RequestManager.d.ts +1 -3
  20. package/dist/lib/rest/RequestManager.js +17 -7
  21. package/dist/lib/rest/index.js +17 -7
  22. package/dist/lib/transformers/ApplicationCommands.js +4 -4
  23. package/dist/lib/transformers/Applications.d.ts +2 -0
  24. package/dist/lib/transformers/Applications.js +110 -4
  25. package/dist/lib/transformers/AuditLogs.js +10 -10
  26. package/dist/lib/transformers/AutoModeration.js +6 -6
  27. package/dist/lib/transformers/Channels.js +16 -16
  28. package/dist/lib/transformers/Components.d.ts +15 -3
  29. package/dist/lib/transformers/Components.js +309 -156
  30. package/dist/lib/transformers/Entitlements.d.ts +2 -2
  31. package/dist/lib/transformers/Entitlements.js +16 -16
  32. package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
  33. package/dist/lib/transformers/GuildTemplates.js +4 -4
  34. package/dist/lib/transformers/Guilds.js +28 -28
  35. package/dist/lib/transformers/Interactions.js +330 -55
  36. package/dist/lib/transformers/Lobbies.d.ts +7 -0
  37. package/dist/lib/transformers/Lobbies.js +38 -0
  38. package/dist/lib/transformers/Messages.d.ts +4 -3
  39. package/dist/lib/transformers/Messages.js +38 -52
  40. package/dist/lib/transformers/Polls.js +2 -2
  41. package/dist/lib/transformers/Presences.d.ts +3 -3
  42. package/dist/lib/transformers/Presences.js +6 -6
  43. package/dist/lib/transformers/Roles.js +8 -8
  44. package/dist/lib/transformers/SKUs.js +2 -2
  45. package/dist/lib/transformers/Soundboards.js +6 -6
  46. package/dist/lib/transformers/StageInstances.js +6 -6
  47. package/dist/lib/transformers/Stickers.js +3 -3
  48. package/dist/lib/transformers/Subscriptions.js +8 -8
  49. package/dist/lib/transformers/Teams.js +4 -4
  50. package/dist/lib/transformers/Users.js +6 -6
  51. package/dist/lib/transformers/Voice.js +8 -8
  52. package/dist/lib/transformers/Webhooks.js +6 -6
  53. package/dist/lib/transformers/index.d.ts +2 -1
  54. package/dist/lib/transformers/index.js +2 -1
  55. package/dist/lib/types/application-command.d.ts +9 -4
  56. package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
  57. package/dist/lib/types/application.d.ts +12 -7
  58. package/dist/lib/types/audit-log.d.ts +9 -5
  59. package/dist/lib/types/auto-moderation.d.ts +7 -3
  60. package/dist/lib/types/channel.d.ts +17 -23
  61. package/dist/lib/types/common.d.ts +2 -0
  62. package/dist/lib/types/components.d.ts +510 -0
  63. package/dist/lib/types/emoji.d.ts +1 -0
  64. package/dist/lib/types/entitlements.d.ts +5 -4
  65. package/dist/lib/types/gateway-events.d.ts +406 -207
  66. package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
  67. package/dist/lib/types/guild-template.d.ts +3 -2
  68. package/dist/lib/types/guild.d.ts +40 -22
  69. package/dist/lib/types/interaction.d.ts +35 -18
  70. package/dist/lib/types/invite.d.ts +5 -2
  71. package/dist/lib/types/lobby.d.ts +31 -0
  72. package/dist/lib/types/lobby.js +2 -0
  73. package/dist/lib/types/message.d.ts +32 -20
  74. package/dist/lib/types/poll.d.ts +7 -1
  75. package/dist/lib/types/role.d.ts +8 -5
  76. package/dist/lib/types/sku.d.ts +2 -1
  77. package/dist/lib/types/soundboard.d.ts +4 -3
  78. package/dist/lib/types/stage-instance.d.ts +4 -3
  79. package/dist/lib/types/sticker.d.ts +8 -5
  80. package/dist/lib/types/subscription.d.ts +6 -5
  81. package/dist/lib/types/team.d.ts +4 -2
  82. package/dist/lib/types/user.d.ts +10 -3
  83. package/dist/lib/types/voice.d.ts +6 -4
  84. package/dist/lib/types/webhook.d.ts +4 -3
  85. package/dist/lib/utils/CDN.d.ts +22 -22
  86. package/dist/lib/utils/CDN.js +22 -22
  87. package/dist/lib/utils/errors.d.ts +3 -1
  88. package/dist/lib/utils/errors.js +4 -0
  89. package/dist/lib/utils/formatters.d.ts +7 -7
  90. package/dist/lib/utils/formatters.js +28 -29
  91. package/dist/lib/utils/index.d.ts +1 -0
  92. package/dist/lib/utils/index.js +18 -7
  93. package/dist/lib/utils/permissions.d.ts +2 -0
  94. package/dist/lib/utils/permissions.js +7 -0
  95. package/dist/package.json +4 -4
  96. package/package.json +4 -4
  97. package/dist/lib/types/message-components.d.ts +0 -234
  98. /package/dist/lib/types/{message-components.js → components.js} +0 -0
@@ -1,215 +1,217 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.guildSoundboardSounds = exports.guildSoundboardSound = 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.guildIncidentsActions = 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.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = 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.applicationActivityInstance = 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 = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = void 0;
5
- exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = void 0;
3
+ 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.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = 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.guildIncidentsActions = 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.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = 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.applicationActivityInstance = 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 = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = void 0;
5
+ exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = void 0;
6
6
  // Guilds
7
- const guild = (guildID) => `guilds/${guildID}`;
7
+ const guild = (guildId) => `guilds/${guildId}`;
8
8
  exports.guild = guild;
9
9
  const guilds = () => "guilds";
10
10
  exports.guilds = guilds;
11
- const guildActiveThreads = (guildID) => `guilds/${guildID}/threads/active`;
11
+ const guildActiveThreads = (guildId) => `guilds/${guildId}/threads/active`;
12
12
  exports.guildActiveThreads = guildActiveThreads;
13
- const guildAuditLog = (guildID) => `guilds/${guildID}/audit-logs`;
13
+ const guildAuditLog = (guildId) => `guilds/${guildId}/audit-logs`;
14
14
  exports.guildAuditLog = guildAuditLog;
15
- const guildAutoModerationRule = (guildID, ruleID) => `guilds/${guildID}/auto-moderation/rules/${ruleID}`;
15
+ const guildAutoModerationRule = (guildId, ruleId) => `guilds/${guildId}/auto-moderation/rules/${ruleId}`;
16
16
  exports.guildAutoModerationRule = guildAutoModerationRule;
17
- const guildAutoModerationRules = (guildID) => `guilds/${guildID}/auto-moderation/rules`;
17
+ const guildAutoModerationRules = (guildId) => `guilds/${guildId}/auto-moderation/rules`;
18
18
  exports.guildAutoModerationRules = guildAutoModerationRules;
19
- const guildBan = (guildID, userID) => `guilds/${guildID}/bans/${userID}`;
19
+ const guildBan = (guildId, userId) => `guilds/${guildId}/bans/${userId}`;
20
20
  exports.guildBan = guildBan;
21
- const guildBans = (guildID) => `guilds/${guildID}/bans`;
21
+ const guildBans = (guildId) => `guilds/${guildId}/bans`;
22
22
  exports.guildBans = guildBans;
23
- const guildBulkBan = (guildID) => `guilds/${guildID}/bulk-ban`;
23
+ const guildBulkBan = (guildId) => `guilds/${guildId}/bulk-ban`;
24
24
  exports.guildBulkBan = guildBulkBan;
25
- const guildChannels = (guildID) => `guilds/${guildID}/channels`;
25
+ const guildChannels = (guildId) => `guilds/${guildId}/channels`;
26
26
  exports.guildChannels = guildChannels;
27
- const guildMemberNickname = (guildID) => `guilds/${guildID}/members/@me/nick`;
27
+ const guildMemberNickname = (guildId) => `guilds/${guildId}/members/@me/nick`;
28
28
  exports.guildMemberNickname = guildMemberNickname;
29
- const guildEmoji = (guildID, emojiID) => `guilds/${guildID}/emojis/${emojiID}`;
29
+ const guildEmoji = (guildId, emojiId) => `guilds/${guildId}/emojis/${emojiId}`;
30
30
  exports.guildEmoji = guildEmoji;
31
- const guildEmojis = (guildID) => `guilds/${guildID}/emojis`;
31
+ const guildEmojis = (guildId) => `guilds/${guildId}/emojis`;
32
32
  exports.guildEmojis = guildEmojis;
33
- const guildIncidentsActions = (guildID) => `guilds/${guildID}/incidents-actions`;
33
+ const guildIncidentsActions = (guildId) => `guilds/${guildId}/incidents-actions`;
34
34
  exports.guildIncidentsActions = guildIncidentsActions;
35
- const guildIntegration = (guildID, integrationID) => `guilds/${guildID}/integrations/${integrationID}`;
35
+ const guildIntegration = (guildId, integrationId) => `guilds/${guildId}/integrations/${integrationId}`;
36
36
  exports.guildIntegration = guildIntegration;
37
- const guildIntegrations = (guildID) => `guilds/${guildID}/integrations`;
37
+ const guildIntegrations = (guildId) => `guilds/${guildId}/integrations`;
38
38
  exports.guildIntegrations = guildIntegrations;
39
- const guildInvites = (guildID) => `guilds/${guildID}/invites`;
39
+ const guildInvites = (guildId) => `guilds/${guildId}/invites`;
40
40
  exports.guildInvites = guildInvites;
41
- const guildMFA = (guildID) => `guilds/${guildID}/mfa`;
41
+ const guildMFA = (guildId) => `guilds/${guildId}/mfa`;
42
42
  exports.guildMFA = guildMFA;
43
- const guildMember = (guildID, userID = "@me") => `guilds/${guildID}/members/${userID}`;
43
+ const guildMember = (guildId, userId = "@me") => `guilds/${guildId}/members/${userId}`;
44
44
  exports.guildMember = guildMember;
45
- const guildMemberRole = (guildID, memberID, roleID) => `guilds/${guildID}/members/${memberID}/roles/${roleID}`;
45
+ const guildMemberRole = (guildId, memberId, roleId) => `guilds/${guildId}/members/${memberId}/roles/${roleId}`;
46
46
  exports.guildMemberRole = guildMemberRole;
47
- const guildMembers = (guildID) => `guilds/${guildID}/members`;
47
+ const guildMembers = (guildId) => `guilds/${guildId}/members`;
48
48
  exports.guildMembers = guildMembers;
49
- const guildMembersSearch = (guildID) => `guilds/${guildID}/members/search`;
49
+ const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
50
50
  exports.guildMembersSearch = guildMembersSearch;
51
- const guildMemberVerification = (guildID) => `guilds/${guildID}/member-verification`;
51
+ const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
52
52
  exports.guildMemberVerification = guildMemberVerification;
53
- const guildOnboarding = (guildID) => `guilds/${guildID}/onboarding`;
53
+ const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
54
54
  exports.guildOnboarding = guildOnboarding;
55
- const guildPreview = (guildID) => `guilds/${guildID}/preview`;
55
+ const guildPreview = (guildId) => `guilds/${guildId}/preview`;
56
56
  exports.guildPreview = guildPreview;
57
- const guildPrune = (guildID) => `guilds/${guildID}/prune`;
57
+ const guildPrune = (guildId) => `guilds/${guildId}/prune`;
58
58
  exports.guildPrune = guildPrune;
59
- const guildRole = (guildID, roleID) => `guilds/${guildID}/roles/${roleID}`;
59
+ const guildRole = (guildId, roleId) => `guilds/${guildId}/roles/${roleId}`;
60
60
  exports.guildRole = guildRole;
61
- const guildRoles = (guildID) => `guilds/${guildID}/roles`;
61
+ const guildRoleMemberCounts = (guildId) => `guilds/${guildId}/roles/member-counts`;
62
+ exports.guildRoleMemberCounts = guildRoleMemberCounts;
63
+ const guildRoles = (guildId) => `guilds/${guildId}/roles`;
62
64
  exports.guildRoles = guildRoles;
63
- const guildScheduledEvent = (guildID, guildScheduledEventID) => `guilds/${guildID}/scheduled-events/${guildScheduledEventID}`;
65
+ const guildScheduledEvent = (guildId, guildScheduledEventId) => `guilds/${guildId}/scheduled-events/${guildScheduledEventId}`;
64
66
  exports.guildScheduledEvent = guildScheduledEvent;
65
- const guildScheduledEvents = (guildID) => `guilds/${guildID}/scheduled-events`;
67
+ const guildScheduledEvents = (guildId) => `guilds/${guildId}/scheduled-events`;
66
68
  exports.guildScheduledEvents = guildScheduledEvents;
67
- const guildScheduledEventUsers = (guildID, guildScheduledEventID) => `guilds/${guildID}/scheduled-events/${guildScheduledEventID}/users`;
69
+ const guildScheduledEventUsers = (guildId, guildScheduledEventId) => `guilds/${guildId}/scheduled-events/${guildScheduledEventId}/users`;
68
70
  exports.guildScheduledEventUsers = guildScheduledEventUsers;
69
- const guildSoundboardSound = (guildID, soundID) => `guilds/${guildID}/soundboard-sounds/${soundID}`;
71
+ const guildSoundboardSound = (guildId, soundId) => `guilds/${guildId}/soundboard-sounds/${soundId}`;
70
72
  exports.guildSoundboardSound = guildSoundboardSound;
71
- const guildSoundboardSounds = (guildID) => `guilds/${guildID}/soundboard-sounds`;
73
+ const guildSoundboardSounds = (guildId) => `guilds/${guildId}/soundboard-sounds`;
72
74
  exports.guildSoundboardSounds = guildSoundboardSounds;
73
- const guildSticker = (guildID, stickerID) => `guilds/${guildID}/stickers/${stickerID}`;
75
+ const guildSticker = (guildId, stickerId) => `guilds/${guildId}/stickers/${stickerId}`;
74
76
  exports.guildSticker = guildSticker;
75
- const guildStickers = (guildID) => `guilds/${guildID}/stickers`;
77
+ const guildStickers = (guildId) => `guilds/${guildId}/stickers`;
76
78
  exports.guildStickers = guildStickers;
77
- const guildTemplate = (guildID, code) => `guilds/${guildID}/templates/${code}`;
79
+ const guildTemplate = (guildId, code) => `guilds/${guildId}/templates/${code}`;
78
80
  exports.guildTemplate = guildTemplate;
79
- const guildTemplates = (guildID) => `guilds/${guildID}/templates`;
81
+ const guildTemplates = (guildId) => `guilds/${guildId}/templates`;
80
82
  exports.guildTemplates = guildTemplates;
81
- const guildVanityURL = (guildID) => `guilds/${guildID}/vanity-url`;
83
+ const guildVanityURL = (guildId) => `guilds/${guildId}/vanity-url`;
82
84
  exports.guildVanityURL = guildVanityURL;
83
- const guildVoiceRegions = (guildID) => `guilds/${guildID}/regions`;
85
+ const guildVoiceRegions = (guildId) => `guilds/${guildId}/regions`;
84
86
  exports.guildVoiceRegions = guildVoiceRegions;
85
- const guildVoiceState = (guildID, userID = "@me") => `guilds/${guildID}/voice-states/${userID}`;
87
+ const guildVoiceState = (guildId, userId = "@me") => `guilds/${guildId}/voice-states/${userId}`;
86
88
  exports.guildVoiceState = guildVoiceState;
87
- const guildWebhooks = (guildID) => `guilds/${guildID}/webhooks`;
89
+ const guildWebhooks = (guildId) => `guilds/${guildId}/webhooks`;
88
90
  exports.guildWebhooks = guildWebhooks;
89
- const guildWelcomeScreen = (guildID) => `guilds/${guildID}/welcome-screen`;
91
+ const guildWelcomeScreen = (guildId) => `guilds/${guildId}/welcome-screen`;
90
92
  exports.guildWelcomeScreen = guildWelcomeScreen;
91
- const guildWidgetImage = (guildID) => `guilds/${guildID}/widget.png`;
93
+ const guildWidgetImage = (guildId) => `guilds/${guildId}/widget.png`;
92
94
  exports.guildWidgetImage = guildWidgetImage;
93
- const guildWidgetJSON = (guildID) => `guilds/${guildID}/widget.json`;
95
+ const guildWidgetJSON = (guildId) => `guilds/${guildId}/widget.json`;
94
96
  exports.guildWidgetJSON = guildWidgetJSON;
95
- const guildWidgetSettings = (guildID) => `guilds/${guildID}/widget`;
97
+ const guildWidgetSettings = (guildId) => `guilds/${guildId}/widget`;
96
98
  exports.guildWidgetSettings = guildWidgetSettings;
97
99
  const template = (code) => `guilds/templates/${code}`;
98
100
  exports.template = template;
99
101
  // Channels
100
- const channel = (channelID) => `channels/${channelID}`;
102
+ const channel = (channelId) => `channels/${channelId}`;
101
103
  exports.channel = channel;
102
- const channelBulkDelete = (channelID) => `channels/${channelID}/messages/bulk-delete`;
104
+ const channelBulkDelete = (channelId) => `channels/${channelId}/messages/bulk-delete`;
103
105
  exports.channelBulkDelete = channelBulkDelete;
104
- const channelFollowers = (channelID) => `channels/${channelID}/followers`;
106
+ const channelFollowers = (channelId) => `channels/${channelId}/followers`;
105
107
  exports.channelFollowers = channelFollowers;
106
- const channelInvites = (channelID) => `channels/${channelID}/invites`;
108
+ const channelInvites = (channelId) => `channels/${channelId}/invites`;
107
109
  exports.channelInvites = channelInvites;
108
- const channelMessage = (channelID, messageID) => `channels/${channelID}/messages/${messageID}`;
110
+ const channelMessage = (channelId, messageId) => `channels/${channelId}/messages/${messageId}`;
109
111
  exports.channelMessage = channelMessage;
110
- const channelMessageAllReactions = (channelID, messageID, emoji) => emoji
111
- ? `channels/${channelID}/messages/${messageID}/reactions/${emoji}`
112
- : `channels/${channelID}/messages/${messageID}/reactions`;
112
+ const channelMessageAllReactions = (channelId, messageId, emoji) => emoji
113
+ ? `channels/${channelId}/messages/${messageId}/reactions/${emoji}`
114
+ : `channels/${channelId}/messages/${messageId}/reactions`;
113
115
  exports.channelMessageAllReactions = channelMessageAllReactions;
114
- const channelMessageCrosspost = (channelID, messageID) => `channels/${channelID}/messages/${messageID}/crosspost`;
116
+ const channelMessageCrosspost = (channelId, messageId) => `channels/${channelId}/messages/${messageId}/crosspost`;
115
117
  exports.channelMessageCrosspost = channelMessageCrosspost;
116
- const channelMessageReaction = (channelID, messageID, emoji, userID = "@me") => `channels/${channelID}/messages/${messageID}/reactions/${emoji}/${userID}`;
118
+ const channelMessageReaction = (channelId, messageId, emoji, userId = "@me") => `channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`;
117
119
  exports.channelMessageReaction = channelMessageReaction;
118
- const channelMessages = (channelID) => `channels/${channelID}/messages`;
120
+ const channelMessages = (channelId) => `channels/${channelId}/messages`;
119
121
  exports.channelMessages = channelMessages;
120
- const channelPermission = (channelID, overwriteID) => `channels/${channelID}/permissions/${overwriteID}`;
122
+ const channelPermission = (channelId, overwriteId) => `channels/${channelId}/permissions/${overwriteId}`;
121
123
  exports.channelPermission = channelPermission;
122
- const channelPin = (channelID, messageID) => `channels/${channelID}/messages/pins/${messageID}`;
124
+ const channelPin = (channelId, messageId) => `channels/${channelId}/messages/pins/${messageId}`;
123
125
  exports.channelPin = channelPin;
124
- const channelPins = (channelID) => `channels/${channelID}/messages/pins`;
126
+ const channelPins = (channelId) => `channels/${channelId}/messages/pins`;
125
127
  exports.channelPins = channelPins;
126
- const channelRecipient = (channelID, userID) => `channels/${channelID}/recipients/${userID}`;
128
+ const channelRecipient = (channelId, userId) => `channels/${channelId}/recipients/${userId}`;
127
129
  exports.channelRecipient = channelRecipient;
128
- const channelThreads = (channelID, archivedStatus, joined) => joined
129
- ? `channels/${channelID}/users/@me/threads/archived/${archivedStatus}`
130
- : `channels/${channelID}/threads/archived/${archivedStatus}`;
130
+ const channelThreads = (channelId, archivedStatus, joined) => joined
131
+ ? `channels/${channelId}/users/@me/threads/archived/${archivedStatus}`
132
+ : `channels/${channelId}/threads/archived/${archivedStatus}`;
131
133
  exports.channelThreads = channelThreads;
132
- const channelTyping = (channelID) => `channels/${channelID}/typing`;
134
+ const channelTyping = (channelId) => `channels/${channelId}/typing`;
133
135
  exports.channelTyping = channelTyping;
134
- const channelWebhooks = (channelID) => `channels/${channelID}/webhooks`;
136
+ const channelWebhooks = (channelId) => `channels/${channelId}/webhooks`;
135
137
  exports.channelWebhooks = channelWebhooks;
136
- const threads = (channelID, messageID) => messageID
137
- ? `channels/${channelID}/messages/${messageID}/threads`
138
- : `channels/${channelID}/threads`;
138
+ const threads = (channelId, messageId) => messageId
139
+ ? `channels/${channelId}/messages/${messageId}/threads`
140
+ : `channels/${channelId}/threads`;
139
141
  exports.threads = threads;
140
- const threadMembers = (threadID, userID) => userID
141
- ? `channels/${threadID}/thread-members`
142
- : `channels/${threadID}/thread-members/${userID}`;
142
+ const threadMembers = (threadId, userId) => userId
143
+ ? `channels/${threadId}/thread-members`
144
+ : `channels/${threadId}/thread-members/${userId}`;
143
145
  exports.threadMembers = threadMembers;
144
- const pollAnswerVoters = (channelID, messageID, answerID) => `channels/${channelID}/polls/${messageID}/answers/${answerID}`;
146
+ const pollAnswerVoters = (channelId, messageId, answerId) => `channels/${channelId}/polls/${messageId}/answers/${answerId}`;
145
147
  exports.pollAnswerVoters = pollAnswerVoters;
146
- const pollExpire = (channelID, messageID) => `channels/${channelID}/polls/${messageID}/expire`;
148
+ const pollExpire = (channelId, messageId) => `channels/${channelId}/polls/${messageId}/expire`;
147
149
  exports.pollExpire = pollExpire;
148
150
  // Users
149
- const user = (userID = "@me") => `users/${userID}`;
151
+ const user = (userId = "@me") => `users/${userId}`;
150
152
  exports.user = user;
151
- const userApplicationRoleConnection = (applicationID) => `users/@me/applications/${applicationID}/role-connection`;
153
+ const userApplicationRoleConnection = (applicationId) => `users/@me/applications/${applicationId}/role-connection`;
152
154
  exports.userApplicationRoleConnection = userApplicationRoleConnection;
153
155
  const userChannels = () => "users/@me/channels";
154
156
  exports.userChannels = userChannels;
155
157
  const userConnections = () => "users/@me/connections";
156
158
  exports.userConnections = userConnections;
157
- const userGuild = (guildID) => `users/@me/guilds/${guildID}`;
159
+ const userGuild = (guildId) => `users/@me/guilds/${guildId}`;
158
160
  exports.userGuild = userGuild;
159
161
  const userGuilds = () => "users/@me/guilds";
160
162
  exports.userGuilds = userGuilds;
161
163
  // Applications
162
- const applicationActivityInstance = (applicationID, instanceID) => `applications/${applicationID}/activity-instances/${instanceID}`;
164
+ const applicationActivityInstance = (applicationId, instanceId) => `applications/${applicationId}/activity-instances/${instanceId}`;
163
165
  exports.applicationActivityInstance = applicationActivityInstance;
164
- const applicationCommand = (applicationID, commandID) => `applications/${applicationID}/commands/${commandID}`;
166
+ const applicationCommand = (applicationId, commandId) => `applications/${applicationId}/commands/${commandId}`;
165
167
  exports.applicationCommand = applicationCommand;
166
- const applicationCommands = (applicationID) => `applications/${applicationID}/commands`;
168
+ const applicationCommands = (applicationId) => `applications/${applicationId}/commands`;
167
169
  exports.applicationCommands = applicationCommands;
168
- const applicationCommandPermissions = (applicationID, guildID, commandID) => `applications/${applicationID}/guilds/${guildID}/commands/${commandID}/permissions`;
170
+ const applicationCommandPermissions = (applicationId, guildId, commandId) => `applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`;
169
171
  exports.applicationCommandPermissions = applicationCommandPermissions;
170
172
  const applicationUser = () => "applications/@me";
171
173
  exports.applicationUser = applicationUser;
172
- const applicationEmoji = (applicationID, emojiID) => `applications/${applicationID}/emojis/${emojiID}`;
174
+ const applicationEmoji = (applicationId, emojiId) => `applications/${applicationId}/emojis/${emojiId}`;
173
175
  exports.applicationEmoji = applicationEmoji;
174
- const applicationEmojis = (applicationID) => `applications/${applicationID}/emojis`;
176
+ const applicationEmojis = (applicationId) => `applications/${applicationId}/emojis`;
175
177
  exports.applicationEmojis = applicationEmojis;
176
- const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
178
+ const applicationEntitlement = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}`;
177
179
  exports.applicationEntitlement = applicationEntitlement;
178
- const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
180
+ const applicationEntitlementConsume = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}/consume`;
179
181
  exports.applicationEntitlementConsume = applicationEntitlementConsume;
180
- const applicationEntitlements = (applicationID) => `applications/${applicationID}/entitlements`;
182
+ const applicationEntitlements = (applicationId) => `applications/${applicationId}/entitlements`;
181
183
  exports.applicationEntitlements = applicationEntitlements;
182
- const applicationGuildCommand = (applicationID, guildID, commandID) => `applications/${applicationID}/guilds/${guildID}/commands/${commandID}`;
184
+ const applicationGuildCommand = (applicationId, guildId, commandId) => `applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
183
185
  exports.applicationGuildCommand = applicationGuildCommand;
184
- const applicationGuildCommands = (applicationID, guildID) => `applications/${applicationID}/guilds/${guildID}/commands`;
186
+ const applicationGuildCommands = (applicationId, guildId) => `applications/${applicationId}/guilds/${guildId}/commands`;
185
187
  exports.applicationGuildCommands = applicationGuildCommands;
186
- const applicationRoleConnectionMetadata = (applicationID) => `applications/${applicationID}/role-connections/metadata`;
188
+ const applicationRoleConnectionMetadata = (applicationId) => `applications/${applicationId}/role-connections/metadata`;
187
189
  exports.applicationRoleConnectionMetadata = applicationRoleConnectionMetadata;
188
- const applicationSKUs = (applicationID) => `applications/${applicationID}/skus`;
190
+ const applicationSKUs = (applicationId) => `applications/${applicationId}/skus`;
189
191
  exports.applicationSKUs = applicationSKUs;
190
- const guildApplicationCommandsPermissions = (applicationID, guildID) => `applications/${applicationID}/guilds/${guildID}/commands/permissions`;
192
+ const guildApplicationCommandsPermissions = (applicationId, guildId) => `applications/${applicationId}/guilds/${guildId}/commands/permissions`;
191
193
  exports.guildApplicationCommandsPermissions = guildApplicationCommandsPermissions;
192
194
  // Webhooks
193
- const webhook = (webhookID, webhookToken) => webhookToken
194
- ? `webhooks/${webhookID}/${webhookToken}`
195
- : `webhooks/${webhookID}`;
195
+ const webhook = (webhookId, webhookToken) => webhookToken
196
+ ? `webhooks/${webhookId}/${webhookToken}`
197
+ : `webhooks/${webhookId}`;
196
198
  exports.webhook = webhook;
197
- const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `webhooks/${webhookID}/${webhookToken}/messages/${messageID}`;
199
+ const webhookMessage = (webhookId, webhookToken, messageId = "@original") => `webhooks/${webhookId}/${webhookToken}/messages/${messageId}`;
198
200
  exports.webhookMessage = webhookMessage;
199
- const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
201
+ const webhookPlatform = (webhookId, webhookToken, platform) => `webhooks/${webhookId}/${webhookToken}/${platform}`;
200
202
  exports.webhookPlatform = webhookPlatform;
201
203
  // Sticker packs
202
- const stickerPack = (packID) => `sticker-packs/${packID}`;
204
+ const stickerPack = (packId) => `sticker-packs/${packId}`;
203
205
  exports.stickerPack = stickerPack;
204
206
  const stickerPacks = () => "sticker-packs";
205
207
  exports.stickerPacks = stickerPacks;
206
208
  // Subscriptions
207
- const skuSubscription = (skuID, subscriptionID) => `skus/${skuID}/subscriptions/${subscriptionID}`;
209
+ const skuSubscription = (skuId, subscriptionId) => `skus/${skuId}/subscriptions/${subscriptionId}`;
208
210
  exports.skuSubscription = skuSubscription;
209
- const skuSubscriptions = (skuID) => `skus/${skuID}/subscriptions`;
211
+ const skuSubscriptions = (skuId) => `skus/${skuId}/subscriptions`;
210
212
  exports.skuSubscriptions = skuSubscriptions;
211
213
  // Soundboards
212
- const sendSoundboardSound = (channelID) => `channels/${channelID}/send-soundboard-sound`;
214
+ const sendSoundboardSound = (channelId) => `channels/${channelId}/send-soundboard-sound`;
213
215
  exports.sendSoundboardSound = sendSoundboardSound;
214
216
  const soundboardDefaultSounds = () => `soundboard-default-sounds`;
215
217
  exports.soundboardDefaultSounds = soundboardDefaultSounds;
@@ -230,15 +232,24 @@ exports.oauth2TokenExchange = oauth2TokenExchange;
230
232
  const oauth2TokenRevocation = () => "oauth2/token/revoke";
231
233
  exports.oauth2TokenRevocation = oauth2TokenRevocation;
232
234
  // Misc
233
- const interactionCallback = (interactionID, interactionToken) => `interactions/${interactionID}/${interactionToken}/callback`;
235
+ const interactionCallback = (interactionId, interactionToken) => `interactions/${interactionId}/${interactionToken}/callback`;
234
236
  exports.interactionCallback = interactionCallback;
235
237
  const invite = (code) => `invites/${code}`;
236
238
  exports.invite = invite;
237
- const stageInstance = (channelID) => `stage-instances/${channelID}`;
239
+ const stageInstance = (channelId) => `stage-instances/${channelId}`;
238
240
  exports.stageInstance = stageInstance;
239
241
  const stageInstances = () => "stage-instances";
240
242
  exports.stageInstances = stageInstances;
241
- const sticker = (stickerID) => `stickers/${stickerID}`;
243
+ const sticker = (stickerId) => `stickers/${stickerId}`;
242
244
  exports.sticker = sticker;
243
245
  const voiceRegions = () => "voice/regions";
244
246
  exports.voiceRegions = voiceRegions;
247
+ // Lobbies
248
+ const lobbies = () => "lobbies";
249
+ exports.lobbies = lobbies;
250
+ const lobby = (lobbyId) => `lobbies/${lobbyId}`;
251
+ exports.lobby = lobby;
252
+ const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}`;
253
+ exports.lobbyMember = lobbyMember;
254
+ const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
255
+ exports.lobbyChannelLinking = lobbyChannelLinking;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { type JSONErrorCodes } from "../constants";
4
2
  export declare enum RESTMethods {
5
3
  Get = "GET",
@@ -23,7 +21,7 @@ export interface ErrorResponse {
23
21
  errors: Record<string, unknown>;
24
22
  }
25
23
  export interface FileData {
26
- contents: Buffer;
24
+ contents: BlobPart;
27
25
  name: string;
28
26
  }
29
27
  export declare class RequestManager {
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.RequestManager = exports.RESTMethods = void 0;
27
37
  const constants_1 = require("../constants");
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
37
  };
@@ -6,8 +6,8 @@ class ApplicationCommands {
6
6
  return {
7
7
  id: command.id,
8
8
  type: command.type,
9
- applicationID: command.application_id,
10
- guildID: command.guild_id,
9
+ applicationId: command.application_id,
10
+ guildId: command.guild_id,
11
11
  name: command.name,
12
12
  nameLocalizations: command.name_localizations,
13
13
  description: command.description,
@@ -27,8 +27,8 @@ class ApplicationCommands {
27
27
  return {
28
28
  id: command.id,
29
29
  type: command.type,
30
- application_id: command.applicationID,
31
- guild_id: command.guildID,
30
+ application_id: command.applicationId,
31
+ guild_id: command.guildId,
32
32
  name: command.name,
33
33
  name_localizations: command.nameLocalizations,
34
34
  description: command.description,
@@ -2,4 +2,6 @@ import type { RawApplication, Application } from "../types/application";
2
2
  export declare class Applications {
3
3
  static applicationFromRaw(application: RawApplication): Application;
4
4
  static applicationToRaw(application: Application): RawApplication;
5
+ static partialApplicationFromRaw(application: Partial<RawApplication>): Partial<Application>;
6
+ static partialApplicationToRaw(application: Partial<Application>): Partial<RawApplication>;
5
7
  }
@@ -21,11 +21,11 @@ class Applications {
21
21
  : undefined,
22
22
  verifyKey: application.verify_key,
23
23
  team: application.team !== null ? Teams_1.Teams.teamFromRaw(application.team) : null,
24
- guildID: application.guild_id,
24
+ guildId: application.guild_id,
25
25
  guild: application.guild !== undefined
26
26
  ? Guilds_1.Guilds.guildFromRaw(application.guild)
27
27
  : undefined,
28
- primarySKUID: application.primary_sku_id,
28
+ primarySKUId: application.primary_sku_id,
29
29
  slug: application.slug,
30
30
  coverImage: application.cover_image,
31
31
  flags: application.flags,
@@ -71,11 +71,117 @@ class Applications {
71
71
  : undefined,
72
72
  verify_key: application.verifyKey,
73
73
  team: application.team !== null ? Teams_1.Teams.teamToRaw(application.team) : null,
74
- guild_id: application.guildID,
74
+ guild_id: application.guildId,
75
75
  guild: application.guild !== undefined
76
76
  ? Guilds_1.Guilds.guildToRaw(application.guild)
77
77
  : undefined,
78
- primary_sku_id: application.primarySKUID,
78
+ primary_sku_id: application.primarySKUId,
79
+ slug: application.slug,
80
+ cover_image: application.coverImage,
81
+ flags: application.flags,
82
+ approximate_guild_count: application.approximateGuildCount,
83
+ approximate_user_install_count: application.approximateUserInstallCount,
84
+ approximate_user_authorization_count: application.approximateUserAuthorizationCount,
85
+ redirect_uris: application.redirectURIs,
86
+ interactions_endpoint_url: application.interactionsEndpointURL,
87
+ role_connections_verification_url: application.roleConnectionsVerificationURL,
88
+ event_webhooks_url: application.eventWebhooksURL,
89
+ event_webhooks_status: application.eventWebhooksStatus,
90
+ event_webhooks_types: application.eventWebhooksTypes,
91
+ tags: application.tags,
92
+ install_params: application.installParams,
93
+ integration_types_config: application.integrationTypesConfig !== undefined
94
+ ? {
95
+ "0": {
96
+ oauth2_install_params: application.integrationTypesConfig?.[0].oauth2InstallParams,
97
+ },
98
+ "1": {
99
+ oauth2_install_params: application.integrationTypesConfig?.[1].oauth2InstallParams,
100
+ },
101
+ }
102
+ : undefined,
103
+ custom_install_url: application.customInstallURL,
104
+ };
105
+ }
106
+ static partialApplicationFromRaw(application) {
107
+ return {
108
+ id: application.id,
109
+ name: application.name,
110
+ icon: application.icon,
111
+ description: application.description,
112
+ rpcOrigins: application.rpc_origins,
113
+ botPublic: application.bot_public,
114
+ botRequireCodeGrant: application.bot_require_code_grant,
115
+ termsOfServiceURL: application.terms_of_service_url,
116
+ privacyPolicyURL: application.privacy_policy_url,
117
+ owner: application.owner !== undefined
118
+ ? Users_1.Users.userFromRaw(application.owner)
119
+ : undefined,
120
+ verifyKey: application.verify_key,
121
+ team: application.team !== undefined
122
+ ? application.team !== null
123
+ ? Teams_1.Teams.teamFromRaw(application.team)
124
+ : null
125
+ : undefined,
126
+ guildId: application.guild_id,
127
+ guild: application.guild !== undefined
128
+ ? Guilds_1.Guilds.guildFromRaw(application.guild)
129
+ : undefined,
130
+ primarySKUId: application.primary_sku_id,
131
+ slug: application.slug,
132
+ coverImage: application.cover_image,
133
+ flags: application.flags,
134
+ approximateGuildCount: application.approximate_guild_count,
135
+ approximateUserInstallCount: application.approximate_user_install_count,
136
+ approximateUserAuthorizationCount: application.approximate_user_authorization_count,
137
+ redirectURIs: application.redirect_uris,
138
+ interactionsEndpointURL: application.interactions_endpoint_url,
139
+ roleConnectionsVerificationURL: application.role_connections_verification_url,
140
+ eventWebhooksURL: application.event_webhooks_url,
141
+ eventWebhooksStatus: application.event_webhooks_status,
142
+ eventWebhooksTypes: application.event_webhooks_types,
143
+ tags: application.tags,
144
+ installParams: application.install_params,
145
+ integrationTypesConfig: application.integration_types_config !== undefined
146
+ ? {
147
+ "0": {
148
+ oauth2InstallParams: application.integration_types_config?.[0]
149
+ .oauth2_install_params,
150
+ },
151
+ "1": {
152
+ oauth2InstallParams: application.integration_types_config?.[1]
153
+ .oauth2_install_params,
154
+ },
155
+ }
156
+ : undefined,
157
+ customInstallURL: application.custom_install_url,
158
+ };
159
+ }
160
+ static partialApplicationToRaw(application) {
161
+ return {
162
+ id: application.id,
163
+ name: application.name,
164
+ icon: application.icon,
165
+ description: application.description,
166
+ rpc_origins: application.rpcOrigins,
167
+ bot_public: application.botPublic,
168
+ bot_require_code_grant: application.botRequireCodeGrant,
169
+ terms_of_service_url: application.termsOfServiceURL,
170
+ privacy_policy_url: application.privacyPolicyURL,
171
+ owner: application.owner !== undefined
172
+ ? Users_1.Users.userToRaw(application.owner)
173
+ : undefined,
174
+ verify_key: application.verifyKey,
175
+ team: application.team !== undefined
176
+ ? application.team !== null
177
+ ? Teams_1.Teams.teamToRaw(application.team)
178
+ : null
179
+ : undefined,
180
+ guild_id: application.guildId,
181
+ guild: application.guild !== undefined
182
+ ? Guilds_1.Guilds.guildToRaw(application.guild)
183
+ : undefined,
184
+ primary_sku_id: application.primarySKUId,
79
185
  slug: application.slug,
80
186
  cover_image: application.coverImage,
81
187
  flags: application.flags,