disgroove 3.0.1-dev.6e60c8d → 3.0.1-dev.7231e6e
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.
- package/LICENSE +1 -1
- package/dist/lib/Client.d.ts +95 -11
- package/dist/lib/Client.js +133 -23
- package/dist/lib/constants.d.ts +89 -9
- package/dist/lib/constants.js +95 -5
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +25 -1
- package/dist/lib/gateway/Shard.js +1 -0
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +8 -0
- package/dist/lib/rest/Endpoints.d.ts +7 -1
- package/dist/lib/rest/Endpoints.js +15 -3
- package/dist/lib/rest/RequestManager.d.ts +1 -0
- package/dist/lib/rest/RequestManager.js +2 -3
- package/dist/lib/transformers/ApplicationCommands.js +2 -0
- package/dist/lib/transformers/Applications.js +2 -0
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Channels.d.ts +3 -0
- package/dist/lib/transformers/Channels.js +24 -0
- package/dist/lib/transformers/Components.d.ts +1 -1
- package/dist/lib/transformers/Components.js +10 -0
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Lobbies.d.ts +3 -1
- package/dist/lib/transformers/Lobbies.js +31 -0
- package/dist/lib/transformers/Messages.d.ts +1 -1
- package/dist/lib/transformers/Messages.js +78 -20
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +16 -10
- package/dist/lib/types/application-command.d.ts +2 -0
- package/dist/lib/types/application.d.ts +4 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/channel.d.ts +4 -2
- package/dist/lib/types/components.d.ts +11 -3
- package/dist/lib/types/gateway-events.d.ts +66 -2
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/lobby.d.ts +38 -1
- package/dist/lib/types/message.d.ts +86 -1
- package/dist/package.json +4 -3
- package/package.json +5 -4
|
@@ -22,6 +22,7 @@ export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake,
|
|
|
22
22
|
export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
|
|
23
23
|
export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
|
|
24
24
|
export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
|
|
25
|
+
export declare const guildMessagesSearch: (guildId: snowflake) => `guilds/${string}/messages/search`;
|
|
25
26
|
export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
|
|
26
27
|
export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
|
|
27
28
|
export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
|
|
@@ -59,13 +60,14 @@ export declare const channelPermission: (channelId: snowflake, overwriteId: snow
|
|
|
59
60
|
export declare const channelPin: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/pins/${string}`;
|
|
60
61
|
export declare const channelPins: (channelId: snowflake) => `channels/${string}/messages/pins`;
|
|
61
62
|
export declare const channelRecipient: (channelId: snowflake, userId: snowflake) => `channels/${string}/recipients/${string}`;
|
|
62
|
-
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/
|
|
63
|
+
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/public` | `channels/${string}/threads/archived/private`;
|
|
63
64
|
export declare const channelTyping: (channelId: snowflake) => `channels/${string}/typing`;
|
|
64
65
|
export declare const channelWebhooks: (channelId: snowflake) => `channels/${string}/webhooks`;
|
|
65
66
|
export declare const threads: (channelId: snowflake, messageId?: snowflake) => `channels/${string}/threads`;
|
|
66
67
|
export declare const threadMembers: (threadId: snowflake, userId?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
|
67
68
|
export declare const pollAnswerVoters: (channelId: snowflake, messageId: snowflake, answerId: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
|
68
69
|
export declare const pollExpire: (channelId: snowflake, messageId: snowflake) => `channels/${string}/polls/${string}/expire`;
|
|
70
|
+
export declare const channelVoiceStatus: (channelId: snowflake) => `channels/${string}/voice-status`;
|
|
69
71
|
export declare const user: (userId?: snowflake | "@me") => `users/${string}`;
|
|
70
72
|
export declare const userApplicationRoleConnection: (applicationId: snowflake) => `users/@me/applications/${string}/role-connection`;
|
|
71
73
|
export declare const userChannels: () => "users/@me/channels";
|
|
@@ -111,7 +113,11 @@ export declare const sticker: (stickerId: snowflake) => `stickers/${string}`;
|
|
|
111
113
|
export declare const voiceRegions: () => "voice/regions";
|
|
112
114
|
export declare const lobbies: () => "lobbies";
|
|
113
115
|
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
116
|
+
export declare const lobbyMessages: (lobbyId: snowflake) => `lobbies/${string}/messages`;
|
|
114
117
|
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
118
|
+
export declare const lobbyChannelInvite: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}/invites`;
|
|
115
119
|
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|
|
120
|
+
export declare const lobbyMembersBulk: (lobbyId: snowflake) => `lobbies/${string}/members/bulk`;
|
|
121
|
+
export declare const lobbyMessageModerationMetadata: (lobbyId: snowflake, messageId: snowflake) => `lobbies/${string}/messages/${string}/moderation-metadata`;
|
|
116
122
|
export declare const inviteTargetUsers: (inviteCode: string) => `invites/${string}/target-users`;
|
|
117
123
|
export declare const inviteTargetUsersJobStatus: (inviteCode: string) => `invites/${string}/target-users/job-status`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = 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;
|
|
3
|
+
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.guildMessagesSearch = 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.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.channelVoiceStatus = 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 = exports.channelFollowers = void 0;
|
|
5
|
+
exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyMessageModerationMetadata = exports.lobbyMembersBulk = exports.lobbyChannelLinking = exports.lobbyChannelInvite = exports.lobbyMember = exports.lobbyMessages = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = void 0;
|
|
6
6
|
// Guilds
|
|
7
7
|
const guild = (guildId) => `guilds/${guildId}`;
|
|
8
8
|
exports.guild = guild;
|
|
@@ -50,6 +50,8 @@ const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
|
|
|
50
50
|
exports.guildMembersSearch = guildMembersSearch;
|
|
51
51
|
const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
|
|
52
52
|
exports.guildMemberVerification = guildMemberVerification;
|
|
53
|
+
const guildMessagesSearch = (guildId) => `guilds/${guildId}/messages/search`;
|
|
54
|
+
exports.guildMessagesSearch = guildMessagesSearch;
|
|
53
55
|
const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
|
|
54
56
|
exports.guildOnboarding = guildOnboarding;
|
|
55
57
|
const guildPreview = (guildId) => `guilds/${guildId}/preview`;
|
|
@@ -147,6 +149,8 @@ const pollAnswerVoters = (channelId, messageId, answerId) => `channels/${channel
|
|
|
147
149
|
exports.pollAnswerVoters = pollAnswerVoters;
|
|
148
150
|
const pollExpire = (channelId, messageId) => `channels/${channelId}/polls/${messageId}/expire`;
|
|
149
151
|
exports.pollExpire = pollExpire;
|
|
152
|
+
const channelVoiceStatus = (channelId) => `channels/${channelId}/voice-status`;
|
|
153
|
+
exports.channelVoiceStatus = channelVoiceStatus;
|
|
150
154
|
// Users
|
|
151
155
|
const user = (userId = "@me") => `users/${userId}`;
|
|
152
156
|
exports.user = user;
|
|
@@ -249,10 +253,18 @@ const lobbies = () => "lobbies";
|
|
|
249
253
|
exports.lobbies = lobbies;
|
|
250
254
|
const lobby = (lobbyId) => `lobbies/${lobbyId}`;
|
|
251
255
|
exports.lobby = lobby;
|
|
256
|
+
const lobbyMessages = (lobbyId) => `lobbies/${lobbyId}/messages`;
|
|
257
|
+
exports.lobbyMessages = lobbyMessages;
|
|
252
258
|
const lobbyMember = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}`;
|
|
253
259
|
exports.lobbyMember = lobbyMember;
|
|
260
|
+
const lobbyChannelInvite = (lobbyId, userId = "@me") => `lobbies/${lobbyId}/members/${userId}/invites`;
|
|
261
|
+
exports.lobbyChannelInvite = lobbyChannelInvite;
|
|
254
262
|
const lobbyChannelLinking = (lobbyId) => `lobbies/${lobbyId}/channel-linking`;
|
|
255
263
|
exports.lobbyChannelLinking = lobbyChannelLinking;
|
|
264
|
+
const lobbyMembersBulk = (lobbyId) => `lobbies/${lobbyId}/members/bulk`;
|
|
265
|
+
exports.lobbyMembersBulk = lobbyMembersBulk;
|
|
266
|
+
const lobbyMessageModerationMetadata = (lobbyId, messageId) => `lobbies/${lobbyId}/messages/${messageId}/moderation-metadata`;
|
|
267
|
+
exports.lobbyMessageModerationMetadata = lobbyMessageModerationMetadata;
|
|
256
268
|
// Invites
|
|
257
269
|
const inviteTargetUsers = (inviteCode) => `invites/${inviteCode}/target-users`;
|
|
258
270
|
exports.inviteTargetUsers = inviteTargetUsers;
|
|
@@ -123,9 +123,8 @@ class RequestManager {
|
|
|
123
123
|
resolve(null);
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
resolve(blob);
|
|
126
|
+
if (data?.returnsBlob) {
|
|
127
|
+
resolve((await response.blob));
|
|
129
128
|
}
|
|
130
129
|
resolve((await response.json()));
|
|
131
130
|
}
|
|
@@ -64,6 +64,7 @@ class ApplicationCommands {
|
|
|
64
64
|
min_length: option.minLength,
|
|
65
65
|
max_length: option.maxLength,
|
|
66
66
|
autocomplete: option.autocomplete,
|
|
67
|
+
file_types: option.fileTypes,
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
static optionFromRaw(option) {
|
|
@@ -86,6 +87,7 @@ class ApplicationCommands {
|
|
|
86
87
|
minLength: option.min_length,
|
|
87
88
|
maxLength: option.max_length,
|
|
88
89
|
autocomplete: option.autocomplete,
|
|
90
|
+
fileTypes: option.file_types,
|
|
89
91
|
};
|
|
90
92
|
}
|
|
91
93
|
}
|
|
@@ -29,6 +29,7 @@ class Applications {
|
|
|
29
29
|
slug: application.slug,
|
|
30
30
|
coverImage: application.cover_image,
|
|
31
31
|
flags: application.flags,
|
|
32
|
+
flagsNew: application.flags_new,
|
|
32
33
|
approximateGuildCount: application.approximate_guild_count,
|
|
33
34
|
approximateUserInstallCount: application.approximate_user_install_count,
|
|
34
35
|
approximateUserAuthorizationCount: application.approximate_user_authorization_count,
|
|
@@ -79,6 +80,7 @@ class Applications {
|
|
|
79
80
|
slug: application.slug,
|
|
80
81
|
cover_image: application.coverImage,
|
|
81
82
|
flags: application.flags,
|
|
83
|
+
flags_new: application.flagsNew,
|
|
82
84
|
approximate_guild_count: application.approximateGuildCount,
|
|
83
85
|
approximate_user_install_count: application.approximateUserInstallCount,
|
|
84
86
|
approximate_user_authorization_count: application.approximateUserAuthorizationCount,
|
|
@@ -34,6 +34,7 @@ class AuditLogs {
|
|
|
34
34
|
roleName: auditLogEntry.options.role_name,
|
|
35
35
|
type: auditLogEntry.options.type,
|
|
36
36
|
integrationType: auditLogEntry.options.integration_type,
|
|
37
|
+
status: auditLogEntry.options.status
|
|
37
38
|
}
|
|
38
39
|
: undefined,
|
|
39
40
|
reason: auditLogEntry.reason,
|
|
@@ -64,6 +65,7 @@ class AuditLogs {
|
|
|
64
65
|
role_name: auditLogEntry.options.roleName,
|
|
65
66
|
type: auditLogEntry.options.type,
|
|
66
67
|
integration_type: auditLogEntry.options.integrationType,
|
|
68
|
+
status: auditLogEntry.options.status
|
|
67
69
|
}
|
|
68
70
|
: undefined,
|
|
69
71
|
reason: auditLogEntry.reason,
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { RawChannel, Channel, RawThreadMember, ThreadMember } from "../types/channel";
|
|
2
|
+
import { AttachmentRequest, RawAttachmentRequest } from "../types/message";
|
|
2
3
|
export declare class Channels {
|
|
3
4
|
static channelFromRaw(channel: RawChannel): Channel;
|
|
4
5
|
static channelToRaw(channel: Channel): RawChannel;
|
|
5
6
|
static threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
|
|
6
7
|
static threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
|
|
8
|
+
static attachmentRequestFromRaw(attachmentRequest: RawAttachmentRequest): AttachmentRequest;
|
|
9
|
+
static attachmentRequestToRaw(attachmentRequest: AttachmentRequest): RawAttachmentRequest;
|
|
7
10
|
}
|
|
@@ -49,6 +49,7 @@ class Channels {
|
|
|
49
49
|
: undefined,
|
|
50
50
|
defaultAutoArchiveDuration: channel.default_auto_archive_duration,
|
|
51
51
|
permissions: channel.permissions,
|
|
52
|
+
appPermissions: channel.app_permissions,
|
|
52
53
|
flags: channel.flags,
|
|
53
54
|
totalMessageSent: channel.total_message_sent,
|
|
54
55
|
availableTags: channel.available_tags?.map((availableTag) => ({
|
|
@@ -117,6 +118,7 @@ class Channels {
|
|
|
117
118
|
: undefined,
|
|
118
119
|
default_auto_archive_duration: channel.defaultAutoArchiveDuration,
|
|
119
120
|
permissions: channel.permissions,
|
|
121
|
+
app_permissions: channel.appPermissions,
|
|
120
122
|
flags: channel.flags,
|
|
121
123
|
total_message_sent: channel.totalMessageSent,
|
|
122
124
|
available_tags: channel.availableTags?.map((availableTag) => ({
|
|
@@ -162,5 +164,27 @@ class Channels {
|
|
|
162
164
|
: undefined,
|
|
163
165
|
};
|
|
164
166
|
}
|
|
167
|
+
static attachmentRequestFromRaw(attachmentRequest) {
|
|
168
|
+
return {
|
|
169
|
+
id: attachmentRequest.id,
|
|
170
|
+
filename: attachmentRequest.filename,
|
|
171
|
+
title: attachmentRequest.title,
|
|
172
|
+
description: attachmentRequest.description,
|
|
173
|
+
durationSecs: attachmentRequest.duration_secs,
|
|
174
|
+
waveform: attachmentRequest.waveform,
|
|
175
|
+
isSpoiler: attachmentRequest.is_spoiler,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
static attachmentRequestToRaw(attachmentRequest) {
|
|
179
|
+
return {
|
|
180
|
+
id: attachmentRequest.id,
|
|
181
|
+
filename: attachmentRequest.filename,
|
|
182
|
+
title: attachmentRequest.title,
|
|
183
|
+
description: attachmentRequest.description,
|
|
184
|
+
duration_secs: attachmentRequest.durationSecs,
|
|
185
|
+
waveform: attachmentRequest.waveform,
|
|
186
|
+
is_spoiler: attachmentRequest.isSpoiler,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
165
189
|
}
|
|
166
190
|
exports.Channels = Channels;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
1
|
+
import type { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
|
|
2
2
|
export declare class Components {
|
|
3
3
|
static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
|
|
4
4
|
static actionRowToRaw(actionRow: ActionRow): RawActionRow;
|
|
@@ -229,6 +229,7 @@ class Components {
|
|
|
229
229
|
minValues: fileUpload.min_values,
|
|
230
230
|
maxValues: fileUpload.max_values,
|
|
231
231
|
required: fileUpload.required,
|
|
232
|
+
fileTypes: fileUpload.file_types,
|
|
232
233
|
};
|
|
233
234
|
}
|
|
234
235
|
static fileUploadToRaw(fileUpload) {
|
|
@@ -239,6 +240,7 @@ class Components {
|
|
|
239
240
|
min_values: fileUpload.minValues,
|
|
240
241
|
max_values: fileUpload.maxValues,
|
|
241
242
|
required: fileUpload.required,
|
|
243
|
+
file_types: fileUpload.fileTypes,
|
|
242
244
|
};
|
|
243
245
|
}
|
|
244
246
|
static labelFromRaw(label) {
|
|
@@ -584,7 +586,11 @@ class Components {
|
|
|
584
586
|
proxyURL: unfurledMediaItem.proxy_url,
|
|
585
587
|
height: unfurledMediaItem.height,
|
|
586
588
|
width: unfurledMediaItem.width,
|
|
589
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
590
|
+
placeholderVersion: unfurledMediaItem.placeholder_version,
|
|
587
591
|
contentType: unfurledMediaItem.content_type,
|
|
592
|
+
flags: unfurledMediaItem.flags,
|
|
593
|
+
attachmentId: unfurledMediaItem.attachment_id,
|
|
588
594
|
};
|
|
589
595
|
}
|
|
590
596
|
static unfurledMediaItemToRaw(unfurledMediaItem) {
|
|
@@ -593,7 +599,11 @@ class Components {
|
|
|
593
599
|
proxy_url: unfurledMediaItem.proxyURL,
|
|
594
600
|
height: unfurledMediaItem.height,
|
|
595
601
|
width: unfurledMediaItem.width,
|
|
602
|
+
placeholder: unfurledMediaItem.placeholder,
|
|
603
|
+
placeholder_version: unfurledMediaItem.placeholderVersion,
|
|
596
604
|
content_type: unfurledMediaItem.contentType,
|
|
605
|
+
flags: unfurledMediaItem.flags,
|
|
606
|
+
attachment_id: unfurledMediaItem.attachmentId,
|
|
597
607
|
};
|
|
598
608
|
}
|
|
599
609
|
static userSelectFromRaw(userSelect) {
|
|
@@ -119,6 +119,11 @@ class Guilds {
|
|
|
119
119
|
}
|
|
120
120
|
: null
|
|
121
121
|
: undefined,
|
|
122
|
+
collectibles: guildMember.collectibles !== undefined
|
|
123
|
+
? guildMember.collectibles !== null
|
|
124
|
+
? Users_1.Users.collectiblesFromRaw(guildMember.collectibles)
|
|
125
|
+
: null
|
|
126
|
+
: undefined,
|
|
122
127
|
};
|
|
123
128
|
}
|
|
124
129
|
static guildMemberToRaw(guildMember) {
|
|
@@ -145,6 +150,11 @@ class Guilds {
|
|
|
145
150
|
}
|
|
146
151
|
: null
|
|
147
152
|
: undefined,
|
|
153
|
+
collectibles: guildMember.collectibles !== undefined
|
|
154
|
+
? guildMember.collectibles !== null
|
|
155
|
+
? Users_1.Users.collectiblesToRaw(guildMember.collectibles)
|
|
156
|
+
: null
|
|
157
|
+
: undefined,
|
|
148
158
|
};
|
|
149
159
|
}
|
|
150
160
|
static guildToRaw(guild) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Lobby, LobbyMember, RawLobby, RawLobbyMember } from "../types/lobby";
|
|
1
|
+
import type { Lobby, LobbyMember, LobbyMessage, RawLobby, RawLobbyMember, RawLobbyMessage } from "../types/lobby";
|
|
2
2
|
export declare class Lobbies {
|
|
3
3
|
static lobbyFromRaw(lobby: RawLobby): Lobby;
|
|
4
4
|
static lobbyMemberFromRaw(lobbyMember: RawLobbyMember): LobbyMember;
|
|
5
5
|
static lobbyMemberToRaw(lobbyMember: LobbyMember): RawLobbyMember;
|
|
6
|
+
static lobbyMessageFromRaw(lobbyMessage: RawLobbyMessage): LobbyMessage;
|
|
7
|
+
static lobbyMessageToRaw(lobbyMessage: LobbyMessage): RawLobbyMessage;
|
|
6
8
|
static lobbyToRaw(lobby: Lobby): RawLobby;
|
|
7
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Lobbies = void 0;
|
|
4
|
+
const Users_1 = require("./Users");
|
|
4
5
|
class Lobbies {
|
|
5
6
|
static lobbyFromRaw(lobby) {
|
|
6
7
|
return {
|
|
@@ -16,6 +17,7 @@ class Lobbies {
|
|
|
16
17
|
id: lobbyMember.id,
|
|
17
18
|
metadata: lobbyMember.metadata,
|
|
18
19
|
flags: lobbyMember.flags,
|
|
20
|
+
additionalName: lobbyMember.additional_name,
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
static lobbyMemberToRaw(lobbyMember) {
|
|
@@ -23,6 +25,35 @@ class Lobbies {
|
|
|
23
25
|
id: lobbyMember.id,
|
|
24
26
|
metadata: lobbyMember.metadata,
|
|
25
27
|
flags: lobbyMember.flags,
|
|
28
|
+
additional_name: lobbyMember.additionalName,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static lobbyMessageFromRaw(lobbyMessage) {
|
|
32
|
+
return {
|
|
33
|
+
id: lobbyMessage.id,
|
|
34
|
+
type: lobbyMessage.type,
|
|
35
|
+
content: lobbyMessage.content,
|
|
36
|
+
lobbyId: lobbyMessage.lobby_id,
|
|
37
|
+
channelId: lobbyMessage.channel_id,
|
|
38
|
+
author: Users_1.Users.userFromRaw(lobbyMessage.author),
|
|
39
|
+
metadata: lobbyMessage.metadata,
|
|
40
|
+
moderationMetadata: lobbyMessage.moderation_metadata,
|
|
41
|
+
flags: lobbyMessage.flags,
|
|
42
|
+
applicationId: lobbyMessage.application_id,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static lobbyMessageToRaw(lobbyMessage) {
|
|
46
|
+
return {
|
|
47
|
+
id: lobbyMessage.id,
|
|
48
|
+
type: lobbyMessage.type,
|
|
49
|
+
content: lobbyMessage.content,
|
|
50
|
+
lobby_id: lobbyMessage.lobbyId,
|
|
51
|
+
channel_id: lobbyMessage.channelId,
|
|
52
|
+
author: Users_1.Users.userToRaw(lobbyMessage.author),
|
|
53
|
+
metadata: lobbyMessage.metadata,
|
|
54
|
+
moderation_metadata: lobbyMessage.moderationMetadata,
|
|
55
|
+
flags: lobbyMessage.flags,
|
|
56
|
+
application_id: lobbyMessage.applicationId,
|
|
26
57
|
};
|
|
27
58
|
}
|
|
28
59
|
static lobbyToRaw(lobby) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
1
|
+
import type { RawAttachment, Attachment, RawEmbed, Embed, RawMessage, Message } from "../types/message";
|
|
2
2
|
import type { ActionRow, Container, File, MediaGallery, RawActionRow, RawContainer, RawFile, RawMediaGallery, RawSection, RawSeparator, RawTextDisplay, Section, Separator, TextDisplay } from "../types/components";
|
|
3
3
|
export declare class Messages {
|
|
4
4
|
static attachmentFromRaw(attachment: RawAttachment): Attachment;
|
|
@@ -28,6 +28,13 @@ class Messages {
|
|
|
28
28
|
durationSecs: attachment.duration_secs,
|
|
29
29
|
waveform: attachment.waveform,
|
|
30
30
|
flags: attachment.flags,
|
|
31
|
+
clipParticipants: attachment.clip_participants?.map((user) => Users_1.Users.userFromRaw(user)),
|
|
32
|
+
clipCreatedAt: attachment.clip_created_at,
|
|
33
|
+
application: attachment.application !== undefined
|
|
34
|
+
? attachment.application !== null
|
|
35
|
+
? Applications_1.Applications.applicationFromRaw(attachment.application)
|
|
36
|
+
: null
|
|
37
|
+
: undefined,
|
|
31
38
|
};
|
|
32
39
|
}
|
|
33
40
|
static attachmentToRaw(attachment) {
|
|
@@ -46,6 +53,13 @@ class Messages {
|
|
|
46
53
|
duration_secs: attachment.durationSecs,
|
|
47
54
|
waveform: attachment.waveform,
|
|
48
55
|
flags: attachment.flags,
|
|
56
|
+
clip_participants: attachment.clipParticipants?.map((user) => Users_1.Users.userToRaw(user)),
|
|
57
|
+
clip_created_at: attachment.clipCreatedAt,
|
|
58
|
+
application: attachment.application !== undefined
|
|
59
|
+
? attachment.application !== null
|
|
60
|
+
? Applications_1.Applications.applicationToRaw(attachment.application)
|
|
61
|
+
: null
|
|
62
|
+
: undefined,
|
|
49
63
|
};
|
|
50
64
|
}
|
|
51
65
|
static componentsFromRaw(components) {
|
|
@@ -109,6 +123,11 @@ class Messages {
|
|
|
109
123
|
proxyURL: embed.image.proxy_url,
|
|
110
124
|
height: embed.image.height,
|
|
111
125
|
width: embed.image.width,
|
|
126
|
+
contentType: embed.image.content_type,
|
|
127
|
+
placeholder: embed.image.placeholder,
|
|
128
|
+
placeholderVersion: embed.image.placeholder_version,
|
|
129
|
+
description: embed.image.description,
|
|
130
|
+
flags: embed.image.flags,
|
|
112
131
|
}
|
|
113
132
|
: undefined,
|
|
114
133
|
thumbnail: embed.thumbnail !== undefined
|
|
@@ -119,16 +138,25 @@ class Messages {
|
|
|
119
138
|
width: embed.thumbnail.width,
|
|
120
139
|
}
|
|
121
140
|
: undefined,
|
|
122
|
-
video:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
video: embed.video !== undefined
|
|
142
|
+
? {
|
|
143
|
+
url: embed.video.url,
|
|
144
|
+
proxyURL: embed.video.proxy_url,
|
|
145
|
+
height: embed.video.height,
|
|
146
|
+
width: embed.video.width,
|
|
147
|
+
contentType: embed.video.content_type,
|
|
148
|
+
placeholder: embed.video.placeholder,
|
|
149
|
+
placeholderVersion: embed.video.placeholder_version,
|
|
150
|
+
description: embed.video.description,
|
|
151
|
+
flags: embed.video.flags,
|
|
152
|
+
}
|
|
153
|
+
: undefined,
|
|
154
|
+
provider: embed.provider !== undefined
|
|
155
|
+
? {
|
|
156
|
+
name: embed.provider.name,
|
|
157
|
+
url: embed.provider.url,
|
|
158
|
+
}
|
|
159
|
+
: undefined,
|
|
132
160
|
author: embed.author !== undefined
|
|
133
161
|
? {
|
|
134
162
|
name: embed.author.name,
|
|
@@ -161,6 +189,11 @@ class Messages {
|
|
|
161
189
|
proxy_url: embed.image.proxyURL,
|
|
162
190
|
height: embed.image.height,
|
|
163
191
|
width: embed.image.width,
|
|
192
|
+
content_type: embed.image.contentType,
|
|
193
|
+
placeholder: embed.image.placeholder,
|
|
194
|
+
placeholder_version: embed.image.placeholderVersion,
|
|
195
|
+
description: embed.image.description,
|
|
196
|
+
flags: embed.image.flags,
|
|
164
197
|
}
|
|
165
198
|
: undefined,
|
|
166
199
|
thumbnail: embed.thumbnail !== undefined
|
|
@@ -171,16 +204,25 @@ class Messages {
|
|
|
171
204
|
width: embed.thumbnail.width,
|
|
172
205
|
}
|
|
173
206
|
: undefined,
|
|
174
|
-
video:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
207
|
+
video: embed.video !== undefined
|
|
208
|
+
? {
|
|
209
|
+
url: embed.video.url,
|
|
210
|
+
proxy_url: embed.video.proxyURL,
|
|
211
|
+
height: embed.video.height,
|
|
212
|
+
width: embed.video.width,
|
|
213
|
+
content_type: embed.video.contentType,
|
|
214
|
+
placeholder: embed.video.placeholder,
|
|
215
|
+
placeholder_version: embed.video.placeholderVersion,
|
|
216
|
+
description: embed.video.description,
|
|
217
|
+
flags: embed.video.flags,
|
|
218
|
+
}
|
|
219
|
+
: undefined,
|
|
220
|
+
provider: embed.provider !== undefined
|
|
221
|
+
? {
|
|
222
|
+
name: embed.provider.name,
|
|
223
|
+
url: embed.provider.url,
|
|
224
|
+
}
|
|
225
|
+
: undefined,
|
|
184
226
|
author: embed.author !== undefined
|
|
185
227
|
? {
|
|
186
228
|
name: embed.author.name,
|
|
@@ -298,6 +340,14 @@ class Messages {
|
|
|
298
340
|
? Polls_1.Polls.pollFromRaw(message.poll)
|
|
299
341
|
: undefined,
|
|
300
342
|
call: message.call,
|
|
343
|
+
sharedClientTheme: message.shared_client_theme !== undefined
|
|
344
|
+
? {
|
|
345
|
+
colors: message.shared_client_theme.colors,
|
|
346
|
+
gradientAngle: message.shared_client_theme.gradient_angle,
|
|
347
|
+
baseMix: message.shared_client_theme.base_mix,
|
|
348
|
+
baseTheme: message.shared_client_theme.base_theme,
|
|
349
|
+
}
|
|
350
|
+
: undefined,
|
|
301
351
|
};
|
|
302
352
|
}
|
|
303
353
|
static messageToRaw(message) {
|
|
@@ -404,6 +454,14 @@ class Messages {
|
|
|
404
454
|
: undefined,
|
|
405
455
|
poll: message.poll !== undefined ? Polls_1.Polls.pollToRaw(message.poll) : undefined,
|
|
406
456
|
call: message.call,
|
|
457
|
+
shared_client_theme: message.sharedClientTheme !== undefined
|
|
458
|
+
? {
|
|
459
|
+
colors: message.sharedClientTheme.colors,
|
|
460
|
+
gradient_angle: message.sharedClientTheme.gradientAngle,
|
|
461
|
+
base_mix: message.sharedClientTheme.baseMix,
|
|
462
|
+
base_theme: message.sharedClientTheme.baseTheme,
|
|
463
|
+
}
|
|
464
|
+
: undefined,
|
|
407
465
|
};
|
|
408
466
|
}
|
|
409
467
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { Nameplate, RawNameplate, RawUser, User } from "../types/user";
|
|
1
|
+
import type { Collectibles, Nameplate, RawCollectibles, RawNameplate, RawUser, User } from "../types/user";
|
|
2
2
|
export declare class Users {
|
|
3
|
+
static collectiblesFromRaw(collectibles: RawCollectibles): Collectibles;
|
|
4
|
+
static collectiblesToRaw(collectibles: Collectibles): RawCollectibles;
|
|
3
5
|
static nameplateFromRaw(nameplate: RawNameplate): Nameplate;
|
|
4
6
|
static nameplateToRaw(nameplate: Nameplate): RawNameplate;
|
|
5
7
|
static userFromRaw(user: RawUser): User;
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Users = void 0;
|
|
4
4
|
class Users {
|
|
5
|
+
static collectiblesFromRaw(collectibles) {
|
|
6
|
+
return {
|
|
7
|
+
nameplate: collectibles.nameplate !== undefined
|
|
8
|
+
? this.nameplateFromRaw(collectibles.nameplate)
|
|
9
|
+
: undefined,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static collectiblesToRaw(collectibles) {
|
|
13
|
+
return {
|
|
14
|
+
nameplate: collectibles.nameplate !== undefined
|
|
15
|
+
? this.nameplateToRaw(collectibles.nameplate)
|
|
16
|
+
: undefined,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
5
19
|
static nameplateFromRaw(nameplate) {
|
|
6
20
|
return {
|
|
7
21
|
skuId: nameplate.sku_id,
|
|
@@ -46,11 +60,7 @@ class Users {
|
|
|
46
60
|
: undefined,
|
|
47
61
|
collectibles: user.collectibles !== undefined
|
|
48
62
|
? user.collectibles !== null
|
|
49
|
-
?
|
|
50
|
-
nameplate: user.collectibles.nameplate !== undefined
|
|
51
|
-
? this.nameplateFromRaw(user.collectibles.nameplate)
|
|
52
|
-
: undefined,
|
|
53
|
-
}
|
|
63
|
+
? this.collectiblesFromRaw(user.collectibles)
|
|
54
64
|
: null
|
|
55
65
|
: undefined,
|
|
56
66
|
primaryGuild: user.primary_guild !== undefined
|
|
@@ -93,11 +103,7 @@ class Users {
|
|
|
93
103
|
: undefined,
|
|
94
104
|
collectibles: user.collectibles !== undefined
|
|
95
105
|
? user.collectibles !== null
|
|
96
|
-
?
|
|
97
|
-
nameplate: user.collectibles.nameplate !== undefined
|
|
98
|
-
? this.nameplateToRaw(user.collectibles.nameplate)
|
|
99
|
-
: undefined,
|
|
100
|
-
}
|
|
106
|
+
? this.collectiblesToRaw(user.collectibles)
|
|
101
107
|
: null
|
|
102
108
|
: undefined,
|
|
103
109
|
primary_guild: user.primaryGuild !== undefined
|
|
@@ -36,6 +36,7 @@ export interface RawApplicationCommandOption {
|
|
|
36
36
|
min_length?: number;
|
|
37
37
|
max_length?: number;
|
|
38
38
|
autocomplete?: boolean;
|
|
39
|
+
file_types?: Array<"image" | "video" | "audio" | string>;
|
|
39
40
|
}
|
|
40
41
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
|
|
41
42
|
export interface RawApplicationCommandOptionChoice {
|
|
@@ -92,6 +93,7 @@ export interface ApplicationCommandOption {
|
|
|
92
93
|
minLength?: number;
|
|
93
94
|
maxLength?: number;
|
|
94
95
|
autocomplete?: boolean;
|
|
96
|
+
fileTypes?: Array<"image" | "video" | "audio" | string>;
|
|
95
97
|
}
|
|
96
98
|
/** https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure */
|
|
97
99
|
export interface ApplicationCommandOptionChoice {
|
|
@@ -23,6 +23,7 @@ export interface RawApplication {
|
|
|
23
23
|
slug?: string;
|
|
24
24
|
cover_image?: string;
|
|
25
25
|
flags?: ApplicationFlags;
|
|
26
|
+
flags_new?: string;
|
|
26
27
|
approximate_guild_count?: number;
|
|
27
28
|
approximate_user_install_count?: number;
|
|
28
29
|
approximate_user_authorization_count?: number;
|
|
@@ -30,7 +31,7 @@ export interface RawApplication {
|
|
|
30
31
|
interactions_endpoint_url?: string;
|
|
31
32
|
role_connections_verification_url?: string;
|
|
32
33
|
event_webhooks_url?: string | null;
|
|
33
|
-
event_webhooks_status
|
|
34
|
+
event_webhooks_status?: ApplicationEventWebhookStatus;
|
|
34
35
|
event_webhooks_types?: Array<string>;
|
|
35
36
|
tags?: Array<string>;
|
|
36
37
|
install_params?: RawInstallParams;
|
|
@@ -81,6 +82,7 @@ export interface Application {
|
|
|
81
82
|
slug?: string;
|
|
82
83
|
coverImage?: string;
|
|
83
84
|
flags?: ApplicationFlags;
|
|
85
|
+
flagsNew?: string;
|
|
84
86
|
approximateGuildCount?: number;
|
|
85
87
|
approximateUserInstallCount?: number;
|
|
86
88
|
approximateUserAuthorizationCount?: number;
|
|
@@ -88,7 +90,7 @@ export interface Application {
|
|
|
88
90
|
interactionsEndpointURL?: string;
|
|
89
91
|
roleConnectionsVerificationURL?: string;
|
|
90
92
|
eventWebhooksURL?: string | null;
|
|
91
|
-
eventWebhooksStatus
|
|
93
|
+
eventWebhooksStatus?: ApplicationEventWebhookStatus;
|
|
92
94
|
eventWebhooksTypes?: Array<string>;
|
|
93
95
|
tags?: Array<string>;
|
|
94
96
|
installParams?: InstallParams;
|
|
@@ -42,6 +42,7 @@ export interface RawOptionalAuditLogEntryInfo {
|
|
|
42
42
|
role_name: string;
|
|
43
43
|
type: string;
|
|
44
44
|
integration_type: string;
|
|
45
|
+
status: string;
|
|
45
46
|
}
|
|
46
47
|
/** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
|
|
47
48
|
export interface RawAuditLogChange {
|
|
@@ -84,6 +85,7 @@ export interface OptionalAuditLogEntryInfo {
|
|
|
84
85
|
roleName: string;
|
|
85
86
|
type: string;
|
|
86
87
|
integrationType: string;
|
|
88
|
+
status: string;
|
|
87
89
|
}
|
|
88
90
|
/** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
|
|
89
91
|
export interface AuditLogChange {
|