dfx 0.66.1 → 0.66.3
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/Cache/prelude.d.ts +7 -7
- package/DiscordGateway/Shard.d.ts +2 -2
- package/DiscordGateway/Sharder.d.ts +2 -2
- package/DiscordGateway/WS.d.ts +1 -0
- package/DiscordGateway/WS.d.ts.map +1 -1
- package/DiscordGateway.d.ts +1 -1
- package/DiscordREST.d.ts +1 -1
- package/Interactions/gateway.d.ts +1 -1
- package/Interactions/webhook.d.ts +1 -1
- package/RateLimit.d.ts +2 -2
- package/gateway.d.ts +1 -1
- package/mjs/types.mjs +57 -13
- package/mjs/types.mjs.map +1 -1
- package/mjs/version.mjs +1 -1
- package/package.json +4 -4
- package/src/types.ts +220 -71
- package/src/version.ts +1 -1
- package/types.d.ts +159 -55
- package/types.d.ts.map +1 -1
- package/types.js +58 -14
- package/types.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/webhooks.d.ts +1 -1
package/types.d.ts
CHANGED
|
@@ -147,54 +147,60 @@ export declare enum AllowedMentionType {
|
|
|
147
147
|
EVERYONE_MENTIONS = "everyone"
|
|
148
148
|
}
|
|
149
149
|
export interface Application {
|
|
150
|
-
/**
|
|
150
|
+
/** ID of the app */
|
|
151
151
|
readonly id: Snowflake;
|
|
152
|
-
/**
|
|
152
|
+
/** Name of the app */
|
|
153
153
|
readonly name: string;
|
|
154
|
-
/**
|
|
154
|
+
/** Icon hash of the app */
|
|
155
155
|
readonly icon?: string | null;
|
|
156
|
-
/**
|
|
156
|
+
/** Description of the app */
|
|
157
157
|
readonly description: string;
|
|
158
|
-
/**
|
|
158
|
+
/** List of RPC origin URLs, if RPC is enabled */
|
|
159
159
|
readonly rpc_origins?: Array<string>;
|
|
160
|
-
/**
|
|
160
|
+
/** When false, only the app owner can add the app to guilds */
|
|
161
161
|
readonly bot_public: boolean;
|
|
162
|
-
/**
|
|
162
|
+
/** When true, the app's bot will only join upon completion of the full OAuth2 code grant flow */
|
|
163
163
|
readonly bot_require_code_grant: boolean;
|
|
164
|
-
/**
|
|
164
|
+
/** Partial user object for the bot user associated with the app */
|
|
165
|
+
readonly bot?: User;
|
|
166
|
+
/** URL of the app's Terms of Service */
|
|
165
167
|
readonly terms_of_service_url?: string;
|
|
166
|
-
/**
|
|
168
|
+
/** URL of the app's Privacy Policy */
|
|
167
169
|
readonly privacy_policy_url?: string;
|
|
168
|
-
/**
|
|
170
|
+
/** Partial user object for the owner of the app */
|
|
169
171
|
readonly owner?: User;
|
|
170
172
|
/** deprecated and will be removed in v11. An empty string. */
|
|
171
173
|
readonly summary: string;
|
|
172
|
-
/**
|
|
174
|
+
/** Hex encoded key for verification in interactions and the GameSDK's GetTicket */
|
|
173
175
|
readonly verify_key: string;
|
|
174
|
-
/**
|
|
176
|
+
/** If the app belongs to a team, this will be a list of the members of that team */
|
|
175
177
|
readonly team?: Team | null;
|
|
176
|
-
/**
|
|
178
|
+
/** Guild associated with the app. For example, a developer support server. */
|
|
177
179
|
readonly guild_id?: Snowflake;
|
|
178
|
-
/**
|
|
180
|
+
/** Partial object of the associated guild */
|
|
179
181
|
readonly guild?: Guild;
|
|
180
|
-
/**
|
|
182
|
+
/** If this app is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */
|
|
181
183
|
readonly primary_sku_id?: Snowflake;
|
|
182
|
-
/**
|
|
184
|
+
/** If this app is a game sold on Discord, this field will be the URL slug that links to the store page */
|
|
183
185
|
readonly slug?: string;
|
|
184
|
-
/**
|
|
186
|
+
/** App's default rich presence invite cover image hash */
|
|
185
187
|
readonly cover_image?: string;
|
|
186
|
-
/**
|
|
188
|
+
/** App's public flags */
|
|
187
189
|
readonly flags?: number;
|
|
188
|
-
/**
|
|
190
|
+
/** Approximate count of guilds the app has been added to */
|
|
189
191
|
readonly approximate_guild_count?: number;
|
|
190
|
-
/**
|
|
192
|
+
/** Array of redirect URIs for the app */
|
|
193
|
+
readonly redirect_uris?: Array<string>;
|
|
194
|
+
/** Interactions endpoint URL for the app */
|
|
195
|
+
readonly interactions_endpoint_url?: string;
|
|
196
|
+
/** Role connection verification URL for the app */
|
|
197
|
+
readonly role_connections_verification_url?: string;
|
|
198
|
+
/** List of tags describing the content and functionality of the app. Max of 5 tags. */
|
|
191
199
|
readonly tags?: Array<string>;
|
|
192
|
-
/**
|
|
200
|
+
/** Settings for the app's default in-app authorization link, if enabled */
|
|
193
201
|
readonly install_params?: InstallParam;
|
|
194
|
-
/**
|
|
202
|
+
/** Default custom authorization URL for the app, if enabled */
|
|
195
203
|
readonly custom_install_url?: string;
|
|
196
|
-
/** the application's role connection verification entry point, which when configured will render the app as a verification method in the guild role verification configuration */
|
|
197
|
-
readonly role_connections_verification_url?: string;
|
|
198
204
|
}
|
|
199
205
|
export interface ApplicationCommand {
|
|
200
206
|
/** Unique ID of command */
|
|
@@ -1032,6 +1038,8 @@ export interface CreateGuildChannelParams {
|
|
|
1032
1038
|
readonly default_sort_order: SortOrderType;
|
|
1033
1039
|
/** the default forum layout view used to display posts in GUILD_FORUM channels */
|
|
1034
1040
|
readonly default_forum_layout: ForumLayoutType;
|
|
1041
|
+
/** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
|
|
1042
|
+
readonly default_thread_rate_limit_per_user: number;
|
|
1035
1043
|
}
|
|
1036
1044
|
export interface CreateGuildEmojiParams {
|
|
1037
1045
|
/** name of the emoji */
|
|
@@ -1116,7 +1124,7 @@ export interface CreateGuildStickerParams {
|
|
|
1116
1124
|
readonly description: string;
|
|
1117
1125
|
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
1118
1126
|
readonly tags: string;
|
|
1119
|
-
/** the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512
|
|
1127
|
+
/** the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KiB */
|
|
1120
1128
|
readonly file: string;
|
|
1121
1129
|
}
|
|
1122
1130
|
export interface CreateGuildTemplateParams {
|
|
@@ -1161,6 +1169,8 @@ export interface CreateStageInstanceParams {
|
|
|
1161
1169
|
readonly privacy_level?: PrivacyLevel;
|
|
1162
1170
|
/** Notify @everyone that a Stage instance has started */
|
|
1163
1171
|
readonly send_start_notification?: boolean;
|
|
1172
|
+
/** The guild scheduled event associated with this Stage instance */
|
|
1173
|
+
readonly guild_scheduled_event_id?: Snowflake;
|
|
1164
1174
|
}
|
|
1165
1175
|
export interface CreateWebhookParams {
|
|
1166
1176
|
/** name of the webhook (1-80 characters) */
|
|
@@ -1196,6 +1206,26 @@ export interface EditChannelPermissionParams {
|
|
|
1196
1206
|
/** 0 for a role or 1 for a member */
|
|
1197
1207
|
readonly type: number;
|
|
1198
1208
|
}
|
|
1209
|
+
export interface EditCurrentApplicationParams {
|
|
1210
|
+
/** Default custom authorization URL for the app, if enabled */
|
|
1211
|
+
readonly custom_install_url: string;
|
|
1212
|
+
/** Description of the app */
|
|
1213
|
+
readonly description: string;
|
|
1214
|
+
/** Role connection verification URL for the app */
|
|
1215
|
+
readonly role_connections_verification_url: string;
|
|
1216
|
+
/** Settings for the app's default in-app authorization link, if enabled */
|
|
1217
|
+
readonly install_params: InstallParam;
|
|
1218
|
+
/** App's public flags */
|
|
1219
|
+
readonly flags: number;
|
|
1220
|
+
/** Icon for the app */
|
|
1221
|
+
readonly icon?: string | null;
|
|
1222
|
+
/** Default rich presence invite cover image for the app */
|
|
1223
|
+
readonly cover_image?: string | null;
|
|
1224
|
+
/** Interactions endpoint URL for the app */
|
|
1225
|
+
readonly interactions_endpoint_url: string;
|
|
1226
|
+
/** List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags. */
|
|
1227
|
+
readonly tags: Array<string>;
|
|
1228
|
+
}
|
|
1199
1229
|
export interface EditGlobalApplicationCommandParams {
|
|
1200
1230
|
/** Name of command, 1-32 characters */
|
|
1201
1231
|
readonly name?: string;
|
|
@@ -1444,6 +1474,8 @@ export interface Endpoints<O> {
|
|
|
1444
1474
|
createReaction: (channelId: string, messageId: string, emoji: string, options?: O) => RestResponse<any>;
|
|
1445
1475
|
/** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. Fires a Stage Instance Create Gateway event. */
|
|
1446
1476
|
createStageInstance: (params?: Partial<CreateStageInstanceParams>, options?: O) => RestResponse<StageInstance>;
|
|
1477
|
+
/** Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering. */
|
|
1478
|
+
createTestEntitlement: (applicationId: string, options?: O) => RestResponse<any>;
|
|
1447
1479
|
/** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. Fires a Webhooks Update Gateway event. */
|
|
1448
1480
|
createWebhook: (channelId: string, params?: Partial<CreateWebhookParams>, options?: O) => RestResponse<Webhook>;
|
|
1449
1481
|
/** Crosspost a message in an Announcement Channel to following channels. This endpoint requires the SEND_MESSAGES permission, if the current user sent the message, or additionally the MANAGE_MESSAGES permission, for all other messages, to be present for the current user. */
|
|
@@ -1490,6 +1522,8 @@ export interface Endpoints<O> {
|
|
|
1490
1522
|
deleteOwnReaction: (channelId: string, messageId: string, emoji: string, options?: O) => RestResponse<any>;
|
|
1491
1523
|
/** Deletes the Stage instance. Returns 204 No Content. Fires a Stage Instance Delete Gateway event. */
|
|
1492
1524
|
deleteStageInstance: (channelId: string, options?: O) => RestResponse<any>;
|
|
1525
|
+
/** Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering. */
|
|
1526
|
+
deleteTestEntitlement: (applicationId: string, entitlementId: string, options?: O) => RestResponse<any>;
|
|
1493
1527
|
/** Deletes another user's reaction. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
1494
1528
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
1495
1529
|
deleteUserReaction: (channelId: string, messageId: string, emoji: string, userId: string, options?: O) => RestResponse<any>;
|
|
@@ -1502,6 +1536,8 @@ export interface Endpoints<O> {
|
|
|
1502
1536
|
editApplicationCommandPermissions: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditApplicationCommandPermissionParams>, options?: O) => RestResponse<GuildApplicationCommandPermission>;
|
|
1503
1537
|
/** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions. */
|
|
1504
1538
|
editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: O) => RestResponse<any>;
|
|
1539
|
+
/** Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. Returns the updated application object on success. */
|
|
1540
|
+
editCurrentApplication: (params?: Partial<EditCurrentApplicationParams>, options?: O) => RestResponse<Application>;
|
|
1505
1541
|
/** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
|
|
1506
1542
|
editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1507
1543
|
editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<EditGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
@@ -1544,9 +1580,13 @@ export interface Endpoints<O> {
|
|
|
1544
1580
|
getCurrentBotApplicationInformation: (options?: O) => RestResponse<Application>;
|
|
1545
1581
|
/** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email. */
|
|
1546
1582
|
getCurrentUser: (options?: O) => RestResponse<User>;
|
|
1583
|
+
/** Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path. */
|
|
1584
|
+
getCurrentUserApplicationRoleConnection: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
1585
|
+
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
1586
|
+
getCurrentUserConnections: (options?: O) => RestResponse<Array<Connection>>;
|
|
1547
1587
|
/** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
|
|
1548
1588
|
getCurrentUserGuildMember: (guildId: string, options?: O) => RestResponse<GuildMember>;
|
|
1549
|
-
/** Returns a list of partial guild objects the current user is a member of.
|
|
1589
|
+
/** Returns a list of partial guild objects the current user is a member of. For OAuth2, requires the guilds scope. */
|
|
1550
1590
|
getCurrentUserGuilds: (params?: Partial<GetCurrentUserGuildParams>, options?: O) => RestResponse<Array<Guild>>;
|
|
1551
1591
|
/** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
|
|
1552
1592
|
getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
@@ -1605,7 +1645,7 @@ export interface Endpoints<O> {
|
|
|
1605
1645
|
getGuildWebhooks: (guildId: string, options?: O) => RestResponse<Array<Webhook>>;
|
|
1606
1646
|
/** Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required. */
|
|
1607
1647
|
getGuildWelcomeScreen: (guildId: string, options?: O) => RestResponse<WelcomeScreen>;
|
|
1608
|
-
/** Returns the widget for the guild. */
|
|
1648
|
+
/** Returns the widget for the guild. Fires an Invite Create Gateway event if an invite channel is defined on the Guild Widget. */
|
|
1609
1649
|
getGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidget>;
|
|
1610
1650
|
/** Returns a PNG image widget for the guild. Requires no permissions or authentication. */
|
|
1611
1651
|
getGuildWidgetImage: (guildId: string, params?: Partial<GetGuildWidgetImageParams>, options?: O) => RestResponse<any>;
|
|
@@ -1628,10 +1668,6 @@ export interface Endpoints<O> {
|
|
|
1628
1668
|
getThreadMember: (channelId: string, userId: string, params?: Partial<GetThreadMemberParams>, options?: O) => RestResponse<ThreadMember>;
|
|
1629
1669
|
/** Returns a user object for a given user ID. */
|
|
1630
1670
|
getUser: (userId: string, options?: O) => RestResponse<User>;
|
|
1631
|
-
/** Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path. */
|
|
1632
|
-
getUserApplicationRoleConnection: (applicationId: string, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
1633
|
-
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
1634
|
-
getUserConnections: (options?: O) => RestResponse<Array<Connection>>;
|
|
1635
1671
|
/** Returns the new webhook object for the given id. */
|
|
1636
1672
|
getWebhook: (webhookId: string, options?: O) => RestResponse<Webhook>;
|
|
1637
1673
|
/** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
@@ -1652,6 +1688,8 @@ export interface Endpoints<O> {
|
|
|
1652
1688
|
listActiveGuildThreads: (guildId: string, options?: O) => RestResponse<ListActiveGuildThreadResponse>;
|
|
1653
1689
|
/** Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild. */
|
|
1654
1690
|
listAutoModerationRulesForGuild: (guildId: string, options?: O) => RestResponse<Array<AutoModerationRule>>;
|
|
1691
|
+
/** Returns all entitlements for a given app, active and expired. */
|
|
1692
|
+
listEntitlements: (applicationId: string, options?: O) => RestResponse<any>;
|
|
1655
1693
|
/** Returns a list of emoji objects for the given guild. */
|
|
1656
1694
|
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Array<Emoji>>;
|
|
1657
1695
|
/** Returns a list of guild member objects that are members of the guild. */
|
|
@@ -1666,6 +1704,8 @@ export interface Endpoints<O> {
|
|
|
1666
1704
|
listPublicArchivedThreads: (channelId: string, params?: Partial<ListPublicArchivedThreadParams>, options?: O) => RestResponse<ListPublicArchivedThreadResponse>;
|
|
1667
1705
|
/** Returns a list of guild scheduled event objects for the given guild. */
|
|
1668
1706
|
listScheduledEventsForGuild: (guildId: string, params?: Partial<ListScheduledEventsForGuildParams>, options?: O) => RestResponse<Array<GuildScheduledEvent>>;
|
|
1707
|
+
/** Returns all SKUs for a given application. Because of how our SKU and subscription systems work, you will see two SKUs for your premium offering. For integration and testing entitlements, you should use the SKU with type: 5. */
|
|
1708
|
+
listSkUs: (applicationId: string, options?: O) => RestResponse<any>;
|
|
1669
1709
|
/** Returns a list of available sticker packs. */
|
|
1670
1710
|
listStickerPacks: (options?: O) => RestResponse<any>;
|
|
1671
1711
|
listThreadMembers: (channelId: string, params?: Partial<ListThreadMemberParams>, options?: O) => RestResponse<Array<ThreadMember>>;
|
|
@@ -1706,7 +1746,7 @@ export interface Endpoints<O> {
|
|
|
1706
1746
|
modifyGuildTemplate: (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
|
|
1707
1747
|
/** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event. */
|
|
1708
1748
|
modifyGuildWelcomeScreen: (guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: O) => RestResponse<WelcomeScreen>;
|
|
1709
|
-
/** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget settings object. */
|
|
1749
|
+
/** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget settings object. Fires a Guild Update Gateway event. */
|
|
1710
1750
|
modifyGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidgetSetting>;
|
|
1711
1751
|
/** Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event. */
|
|
1712
1752
|
modifyStageInstance: (channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: O) => RestResponse<StageInstance>;
|
|
@@ -1736,14 +1776,38 @@ export interface Endpoints<O> {
|
|
|
1736
1776
|
startThreadWithoutMessage: (channelId: string, params?: Partial<StartThreadWithoutMessageParams>, options?: O) => RestResponse<Channel>;
|
|
1737
1777
|
/** Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
1738
1778
|
syncGuildTemplate: (guildId: string, templateCode: string, options?: O) => RestResponse<GuildTemplate>;
|
|
1739
|
-
/** Post a typing indicator for the specified channel
|
|
1779
|
+
/** Post a typing indicator for the specified channel, which expires after 10 seconds. Returns a 204 empty response on success. Fires a Typing Start Gateway event. */
|
|
1740
1780
|
triggerTypingIndicator: (channelId: string, options?: O) => RestResponse<any>;
|
|
1741
1781
|
/** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
1742
1782
|
unpinMessage: (channelId: string, messageId: string, options?: O) => RestResponse<any>;
|
|
1743
1783
|
/** Updates and returns a list of application role connection metadata objects for the given application. */
|
|
1744
1784
|
updateApplicationRoleConnectionMetadataRecords: (applicationId: string, options?: O) => RestResponse<Array<ApplicationRoleConnectionMetadatum>>;
|
|
1745
1785
|
/** Updates and returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path. */
|
|
1746
|
-
|
|
1786
|
+
updateCurrentUserApplicationRoleConnection: (applicationId: string, params?: Partial<UpdateCurrentUserApplicationRoleConnectionParams>, options?: O) => RestResponse<ApplicationRoleConnection>;
|
|
1787
|
+
}
|
|
1788
|
+
export interface Entitlement {
|
|
1789
|
+
/** ID of the entitlement */
|
|
1790
|
+
readonly id: Snowflake;
|
|
1791
|
+
/** ID of the SKU */
|
|
1792
|
+
readonly sku_id: Snowflake;
|
|
1793
|
+
/** ID of the user that is granted access to the entitlement's sku */
|
|
1794
|
+
readonly user_id?: Snowflake;
|
|
1795
|
+
/** ID of the guild that is granted access to the entitlement's sku */
|
|
1796
|
+
readonly guild_id?: Snowflake;
|
|
1797
|
+
/** ID of the parent application */
|
|
1798
|
+
readonly application_id: Snowflake;
|
|
1799
|
+
/** Type of entitlement */
|
|
1800
|
+
readonly type: EntitlementType;
|
|
1801
|
+
/** Not applicable for App Subscriptions. Subscriptions are not consumed and will be false */
|
|
1802
|
+
readonly consumed: boolean;
|
|
1803
|
+
/** Start date at which the entitlement is valid. Not present when using test entitlements. */
|
|
1804
|
+
readonly starts_at?: string;
|
|
1805
|
+
/** Date at which the entitlement is no longer valid. Not present when using test entitlements. */
|
|
1806
|
+
readonly ends_at?: string;
|
|
1807
|
+
}
|
|
1808
|
+
export declare enum EntitlementType {
|
|
1809
|
+
/** Entitlement was purchased as an app subscription */
|
|
1810
|
+
APPLICATION_SUBSCRIPTION = 8
|
|
1747
1811
|
}
|
|
1748
1812
|
export declare enum EventType {
|
|
1749
1813
|
/** when a member sends or edits a message in the guild */
|
|
@@ -1796,7 +1860,7 @@ export interface FollowedChannel {
|
|
|
1796
1860
|
export interface ForumAndMediaThreadMessageParam {
|
|
1797
1861
|
/** Message contents (up to 2000 characters) */
|
|
1798
1862
|
readonly content?: string;
|
|
1799
|
-
/**
|
|
1863
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
1800
1864
|
readonly embeds?: Array<Embed>;
|
|
1801
1865
|
/** Allowed mentions for the message */
|
|
1802
1866
|
readonly allowed_mentions?: AllowedMention;
|
|
@@ -1804,13 +1868,9 @@ export interface ForumAndMediaThreadMessageParam {
|
|
|
1804
1868
|
readonly components?: Array<Component>;
|
|
1805
1869
|
/** IDs of up to 3 stickers in the server to send in the message */
|
|
1806
1870
|
readonly sticker_ids?: Array<Snowflake>;
|
|
1807
|
-
/** Contents of the file being sent. See Uploading Files */
|
|
1808
|
-
readonly files: string;
|
|
1809
|
-
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
1810
|
-
readonly payload_json?: string;
|
|
1811
1871
|
/** Attachment objects with filename and description. See Uploading Files */
|
|
1812
1872
|
readonly attachments?: Array<Attachment>;
|
|
1813
|
-
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS
|
|
1873
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1814
1874
|
readonly flags?: number;
|
|
1815
1875
|
}
|
|
1816
1876
|
export declare enum ForumLayoutType {
|
|
@@ -2529,9 +2589,9 @@ export interface IdentifyConnectionProperty {
|
|
|
2529
2589
|
readonly device: string;
|
|
2530
2590
|
}
|
|
2531
2591
|
export interface InstallParam {
|
|
2532
|
-
/**
|
|
2592
|
+
/** Scopes to add the application to the server with */
|
|
2533
2593
|
readonly scopes: Array<OAuth2Scope>;
|
|
2534
|
-
/**
|
|
2594
|
+
/** Permissions to request for the bot role */
|
|
2535
2595
|
readonly permissions: string;
|
|
2536
2596
|
}
|
|
2537
2597
|
export interface Integration {
|
|
@@ -2639,6 +2699,8 @@ export interface Interaction {
|
|
|
2639
2699
|
readonly locale?: string;
|
|
2640
2700
|
/** Guild's preferred locale, if invoked in a guild */
|
|
2641
2701
|
readonly guild_locale?: string;
|
|
2702
|
+
/** For monetized apps, any entitlements for the invoking user, representing access to premium SKUs */
|
|
2703
|
+
readonly entitlements: Array<Entitlement>;
|
|
2642
2704
|
}
|
|
2643
2705
|
export interface InteractionCallbackAutocomplete {
|
|
2644
2706
|
/** autocomplete choices (max of 25 choices) */
|
|
@@ -2683,7 +2745,9 @@ export declare enum InteractionCallbackType {
|
|
|
2683
2745
|
/** respond to an autocomplete interaction with suggested choices */
|
|
2684
2746
|
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
2685
2747
|
/** respond to an interaction with a popup modal */
|
|
2686
|
-
MODAL = 9
|
|
2748
|
+
MODAL = 9,
|
|
2749
|
+
/** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
2750
|
+
PREMIUM_REQUIRED = 10
|
|
2687
2751
|
}
|
|
2688
2752
|
export type InteractionCreateEvent = Interaction;
|
|
2689
2753
|
export type InteractionDatum = ApplicationCommandDatum | MessageComponentDatum | ModalSubmitDatum;
|
|
@@ -2990,6 +3054,8 @@ export interface Message {
|
|
|
2990
3054
|
readonly position?: number;
|
|
2991
3055
|
/** data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message */
|
|
2992
3056
|
readonly role_subscription_data?: RoleSubscriptionDatum;
|
|
3057
|
+
/** data for users, members, channels, and roles in the message's auto-populated select menus */
|
|
3058
|
+
readonly resolved?: ResolvedDatum;
|
|
2993
3059
|
}
|
|
2994
3060
|
export interface MessageActivity {
|
|
2995
3061
|
/** type of message activity */
|
|
@@ -3010,6 +3076,8 @@ export interface MessageComponentDatum {
|
|
|
3010
3076
|
readonly component_type: ComponentType;
|
|
3011
3077
|
/** values the user selected in a select menu component */
|
|
3012
3078
|
readonly values?: Array<SelectOption>;
|
|
3079
|
+
/** resolved entities from selected options */
|
|
3080
|
+
readonly resolved?: ResolvedDatum;
|
|
3013
3081
|
}
|
|
3014
3082
|
export type MessageCreateEvent = Message & MessageCreateExtra;
|
|
3015
3083
|
export interface MessageCreateExtra {
|
|
@@ -3462,13 +3530,13 @@ export declare enum MutableGuildFeature {
|
|
|
3462
3530
|
export declare enum OAuth2Scope {
|
|
3463
3531
|
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list — not currently available for apps */
|
|
3464
3532
|
ACTIVITIES_READ = "activities.read",
|
|
3465
|
-
/** allows your app to update a user's activity -
|
|
3533
|
+
/** allows your app to update a user's activity - not currently available for apps (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
|
|
3466
3534
|
ACTIVITIES_WRITE = "activities.write",
|
|
3467
3535
|
/** allows your app to read build data for a user's applications */
|
|
3468
3536
|
APPLICATIONS_BUILDS_READ = "applications.builds.read",
|
|
3469
3537
|
/** allows your app to upload/update builds for a user's applications - requires Discord approval */
|
|
3470
3538
|
APPLICATIONS_BUILDS_UPLOAD = "applications.builds.upload",
|
|
3471
|
-
/** allows your app to
|
|
3539
|
+
/** allows your app to add commands to a guild - included by default with the bot scope */
|
|
3472
3540
|
APPLICATIONS_COMMANDS = "applications.commands",
|
|
3473
3541
|
/** allows your app to update its commands using a Bearer token - client credentials grant only */
|
|
3474
3542
|
APPLICATIONS_COMMANDS_UPDATE = "applications.commands.update",
|
|
@@ -3918,6 +3986,12 @@ export interface SearchGuildMemberParams {
|
|
|
3918
3986
|
/** max number of members to return (1-1000) */
|
|
3919
3987
|
readonly limit: number;
|
|
3920
3988
|
}
|
|
3989
|
+
export interface SelectDefaultValue {
|
|
3990
|
+
/** ID of a user, role, or channel */
|
|
3991
|
+
readonly id: Snowflake;
|
|
3992
|
+
/** Type of value that id represents. Either "user", "role", or "channel" */
|
|
3993
|
+
readonly type: string;
|
|
3994
|
+
}
|
|
3921
3995
|
export interface SelectMenu {
|
|
3922
3996
|
/** Type of select menu component (text: 3, user: 5, role: 6, mentionable: 7, channels: 8) */
|
|
3923
3997
|
readonly type: ComponentType;
|
|
@@ -3929,6 +4003,8 @@ export interface SelectMenu {
|
|
|
3929
4003
|
readonly channel_types?: Array<ChannelType>;
|
|
3930
4004
|
/** Placeholder text if nothing is selected; max 150 characters */
|
|
3931
4005
|
readonly placeholder?: string;
|
|
4006
|
+
/** List of default values for auto-populated select menu components; number of default values must be in the range defined by min_values and max_values */
|
|
4007
|
+
readonly default_values?: Array<SelectDefaultValue>;
|
|
3932
4008
|
/** Minimum number of items that must be chosen (defaults to 1); min 0, max 25 */
|
|
3933
4009
|
readonly min_values?: number;
|
|
3934
4010
|
/** Maximum number of items that can be chosen (defaults to 1); max 25 */
|
|
@@ -3967,6 +4043,30 @@ export interface SessionStartLimit {
|
|
|
3967
4043
|
/** Number of identify requests allowed per 5 seconds */
|
|
3968
4044
|
readonly max_concurrency: number;
|
|
3969
4045
|
}
|
|
4046
|
+
export interface Sku {
|
|
4047
|
+
/** ID of SKU */
|
|
4048
|
+
readonly id: Snowflake;
|
|
4049
|
+
/** Type of SKU */
|
|
4050
|
+
readonly type: SkuType;
|
|
4051
|
+
/** ID of the parent application */
|
|
4052
|
+
readonly application_id: Snowflake;
|
|
4053
|
+
/** Customer-facing name of your premium offering */
|
|
4054
|
+
readonly name: string;
|
|
4055
|
+
/** System-generated URL slug based on the SKU's name */
|
|
4056
|
+
readonly slug: string;
|
|
4057
|
+
/** SKU flags combined as a bitfield */
|
|
4058
|
+
readonly flags: number;
|
|
4059
|
+
}
|
|
4060
|
+
export declare const SkuFlag: {
|
|
4061
|
+
readonly GUILD_SUBSCRIPTION: number;
|
|
4062
|
+
readonly USER_SUBSCRIPTION: number;
|
|
4063
|
+
};
|
|
4064
|
+
export declare enum SkuType {
|
|
4065
|
+
/** Represents a recurring subscription */
|
|
4066
|
+
SUBSCRIPTION = 5,
|
|
4067
|
+
/** System-generated group for each SUBSCRIPTION SKU created */
|
|
4068
|
+
SUBSCRIPTION_GROUP = 6
|
|
4069
|
+
}
|
|
3970
4070
|
export type Snowflake = `${bigint}`;
|
|
3971
4071
|
export declare enum SortOrderType {
|
|
3972
4072
|
/** Sort forum posts by activity */
|
|
@@ -4008,10 +4108,14 @@ export interface StartThreadInForumOrMediaChannelParams {
|
|
|
4008
4108
|
readonly auto_archive_duration?: number;
|
|
4009
4109
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
4010
4110
|
readonly rate_limit_per_user?: number | null;
|
|
4011
|
-
/** contents of the first message in the forum
|
|
4111
|
+
/** contents of the first message in the forum thread */
|
|
4012
4112
|
readonly message: Message;
|
|
4013
|
-
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM
|
|
4113
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
4014
4114
|
readonly applied_tags?: Array<Snowflake>;
|
|
4115
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
4116
|
+
readonly files?: string;
|
|
4117
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
4118
|
+
readonly payload_json?: string;
|
|
4015
4119
|
}
|
|
4016
4120
|
export interface StartThreadWithoutMessageParams {
|
|
4017
4121
|
/** 1-100 character channel name */
|
|
@@ -4269,6 +4373,14 @@ export interface UnavailableGuild {
|
|
|
4269
4373
|
/** */
|
|
4270
4374
|
readonly unavailable: boolean;
|
|
4271
4375
|
}
|
|
4376
|
+
export interface UpdateCurrentUserApplicationRoleConnectionParams {
|
|
4377
|
+
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
4378
|
+
readonly platform_name?: string;
|
|
4379
|
+
/** the username on the platform a bot has connected (max 100 characters) */
|
|
4380
|
+
readonly platform_username?: string;
|
|
4381
|
+
/** object mapping application role connection metadata keys to their string-ified value (max 100 characters) for the user on the platform a bot has connected */
|
|
4382
|
+
readonly metadata?: ApplicationRoleConnectionMetadatum;
|
|
4383
|
+
}
|
|
4272
4384
|
export interface UpdatePresence {
|
|
4273
4385
|
/** Unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
|
|
4274
4386
|
readonly since?: number | null;
|
|
@@ -4279,14 +4391,6 @@ export interface UpdatePresence {
|
|
|
4279
4391
|
/** Whether or not the client is afk */
|
|
4280
4392
|
readonly afk: boolean;
|
|
4281
4393
|
}
|
|
4282
|
-
export interface UpdateUserApplicationRoleConnectionParams {
|
|
4283
|
-
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
4284
|
-
readonly platform_name?: string;
|
|
4285
|
-
/** the username on the platform a bot has connected (max 100 characters) */
|
|
4286
|
-
readonly platform_username?: string;
|
|
4287
|
-
/** object mapping application role connection metadata keys to their string-ified value (max 100 characters) for the user on the platform a bot has connected */
|
|
4288
|
-
readonly metadata?: ApplicationRoleConnectionMetadatum;
|
|
4289
|
-
}
|
|
4290
4394
|
export interface UpdateVoiceState {
|
|
4291
4395
|
/** ID of the guild */
|
|
4292
4396
|
readonly guild_id: Snowflake;
|