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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dfx",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.3",
|
|
4
4
|
"description": "Effect-TS discord library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"ws": "^8.14.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@effect/platform": "^0.
|
|
43
|
-
"effect": "2.0.0-next.
|
|
42
|
+
"@effect/platform": "^0.18.6",
|
|
43
|
+
"effect": "2.0.0-next.41"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
46
|
"bufferutil": "^4.0.7",
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"utf-8-validate": "^6.0.3",
|
|
49
49
|
"zlib-sync": "^0.1.8"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "90882a2d81a1e402e8477551f3034be49c872824",
|
|
52
52
|
"main": "./index.js"
|
|
53
53
|
}
|
package/src/types.ts
CHANGED
|
@@ -148,54 +148,60 @@ export enum AllowedMentionType {
|
|
|
148
148
|
EVERYONE_MENTIONS = "everyone",
|
|
149
149
|
}
|
|
150
150
|
export interface Application {
|
|
151
|
-
/**
|
|
151
|
+
/** ID of the app */
|
|
152
152
|
readonly id: Snowflake
|
|
153
|
-
/**
|
|
153
|
+
/** Name of the app */
|
|
154
154
|
readonly name: string
|
|
155
|
-
/**
|
|
155
|
+
/** Icon hash of the app */
|
|
156
156
|
readonly icon?: string | null
|
|
157
|
-
/**
|
|
157
|
+
/** Description of the app */
|
|
158
158
|
readonly description: string
|
|
159
|
-
/**
|
|
159
|
+
/** List of RPC origin URLs, if RPC is enabled */
|
|
160
160
|
readonly rpc_origins?: Array<string>
|
|
161
|
-
/**
|
|
161
|
+
/** When false, only the app owner can add the app to guilds */
|
|
162
162
|
readonly bot_public: boolean
|
|
163
|
-
/**
|
|
163
|
+
/** When true, the app's bot will only join upon completion of the full OAuth2 code grant flow */
|
|
164
164
|
readonly bot_require_code_grant: boolean
|
|
165
|
-
/**
|
|
165
|
+
/** Partial user object for the bot user associated with the app */
|
|
166
|
+
readonly bot?: User
|
|
167
|
+
/** URL of the app's Terms of Service */
|
|
166
168
|
readonly terms_of_service_url?: string
|
|
167
|
-
/**
|
|
169
|
+
/** URL of the app's Privacy Policy */
|
|
168
170
|
readonly privacy_policy_url?: string
|
|
169
|
-
/**
|
|
171
|
+
/** Partial user object for the owner of the app */
|
|
170
172
|
readonly owner?: User
|
|
171
173
|
/** deprecated and will be removed in v11. An empty string. */
|
|
172
174
|
readonly summary: string
|
|
173
|
-
/**
|
|
175
|
+
/** Hex encoded key for verification in interactions and the GameSDK's GetTicket */
|
|
174
176
|
readonly verify_key: string
|
|
175
|
-
/**
|
|
177
|
+
/** If the app belongs to a team, this will be a list of the members of that team */
|
|
176
178
|
readonly team?: Team | null
|
|
177
|
-
/**
|
|
179
|
+
/** Guild associated with the app. For example, a developer support server. */
|
|
178
180
|
readonly guild_id?: Snowflake
|
|
179
|
-
/**
|
|
181
|
+
/** Partial object of the associated guild */
|
|
180
182
|
readonly guild?: Guild
|
|
181
|
-
/**
|
|
183
|
+
/** If this app is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists */
|
|
182
184
|
readonly primary_sku_id?: Snowflake
|
|
183
|
-
/**
|
|
185
|
+
/** If this app is a game sold on Discord, this field will be the URL slug that links to the store page */
|
|
184
186
|
readonly slug?: string
|
|
185
|
-
/**
|
|
187
|
+
/** App's default rich presence invite cover image hash */
|
|
186
188
|
readonly cover_image?: string
|
|
187
|
-
/**
|
|
189
|
+
/** App's public flags */
|
|
188
190
|
readonly flags?: number
|
|
189
|
-
/**
|
|
191
|
+
/** Approximate count of guilds the app has been added to */
|
|
190
192
|
readonly approximate_guild_count?: number
|
|
191
|
-
/**
|
|
193
|
+
/** Array of redirect URIs for the app */
|
|
194
|
+
readonly redirect_uris?: Array<string>
|
|
195
|
+
/** Interactions endpoint URL for the app */
|
|
196
|
+
readonly interactions_endpoint_url?: string
|
|
197
|
+
/** Role connection verification URL for the app */
|
|
198
|
+
readonly role_connections_verification_url?: string
|
|
199
|
+
/** List of tags describing the content and functionality of the app. Max of 5 tags. */
|
|
192
200
|
readonly tags?: Array<string>
|
|
193
|
-
/**
|
|
201
|
+
/** Settings for the app's default in-app authorization link, if enabled */
|
|
194
202
|
readonly install_params?: InstallParam
|
|
195
|
-
/**
|
|
203
|
+
/** Default custom authorization URL for the app, if enabled */
|
|
196
204
|
readonly custom_install_url?: string
|
|
197
|
-
/** 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 */
|
|
198
|
-
readonly role_connections_verification_url?: string
|
|
199
205
|
}
|
|
200
206
|
export interface ApplicationCommand {
|
|
201
207
|
/** Unique ID of command */
|
|
@@ -1034,6 +1040,8 @@ export interface CreateGuildChannelParams {
|
|
|
1034
1040
|
readonly default_sort_order: SortOrderType
|
|
1035
1041
|
/** the default forum layout view used to display posts in GUILD_FORUM channels */
|
|
1036
1042
|
readonly default_forum_layout: ForumLayoutType
|
|
1043
|
+
/** 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. */
|
|
1044
|
+
readonly default_thread_rate_limit_per_user: number
|
|
1037
1045
|
}
|
|
1038
1046
|
export interface CreateGuildEmojiParams {
|
|
1039
1047
|
/** name of the emoji */
|
|
@@ -1118,7 +1126,7 @@ export interface CreateGuildStickerParams {
|
|
|
1118
1126
|
readonly description: string
|
|
1119
1127
|
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
1120
1128
|
readonly tags: string
|
|
1121
|
-
/** the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512
|
|
1129
|
+
/** the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KiB */
|
|
1122
1130
|
readonly file: string
|
|
1123
1131
|
}
|
|
1124
1132
|
export interface CreateGuildTemplateParams {
|
|
@@ -1358,6 +1366,12 @@ export function createRoutes<O = any>(
|
|
|
1358
1366
|
params,
|
|
1359
1367
|
options,
|
|
1360
1368
|
}),
|
|
1369
|
+
createTestEntitlement: (applicationId, options) =>
|
|
1370
|
+
fetch({
|
|
1371
|
+
method: "POST",
|
|
1372
|
+
url: `/applications/${applicationId}/entitlements`,
|
|
1373
|
+
options,
|
|
1374
|
+
}),
|
|
1361
1375
|
createWebhook: (channelId, params, options) =>
|
|
1362
1376
|
fetch({
|
|
1363
1377
|
method: "POST",
|
|
@@ -1505,6 +1519,12 @@ export function createRoutes<O = any>(
|
|
|
1505
1519
|
url: `/stage-instances/${channelId}`,
|
|
1506
1520
|
options,
|
|
1507
1521
|
}),
|
|
1522
|
+
deleteTestEntitlement: (applicationId, entitlementId, options) =>
|
|
1523
|
+
fetch({
|
|
1524
|
+
method: "DELETE",
|
|
1525
|
+
url: `/applications/${applicationId}/entitlements/${entitlementId}`,
|
|
1526
|
+
options,
|
|
1527
|
+
}),
|
|
1508
1528
|
deleteUserReaction: (channelId, messageId, emoji, userId, options) =>
|
|
1509
1529
|
fetch({
|
|
1510
1530
|
method: "DELETE",
|
|
@@ -1556,6 +1576,13 @@ export function createRoutes<O = any>(
|
|
|
1556
1576
|
params,
|
|
1557
1577
|
options,
|
|
1558
1578
|
}),
|
|
1579
|
+
editCurrentApplication: (params, options) =>
|
|
1580
|
+
fetch({
|
|
1581
|
+
method: "PATCH",
|
|
1582
|
+
url: `/applications/@me`,
|
|
1583
|
+
params,
|
|
1584
|
+
options,
|
|
1585
|
+
}),
|
|
1559
1586
|
editFollowupMessage: (
|
|
1560
1587
|
applicationId,
|
|
1561
1588
|
interactionToken,
|
|
@@ -1719,6 +1746,18 @@ export function createRoutes<O = any>(
|
|
|
1719
1746
|
url: `/users/@me`,
|
|
1720
1747
|
options,
|
|
1721
1748
|
}),
|
|
1749
|
+
getCurrentUserApplicationRoleConnection: (applicationId, options) =>
|
|
1750
|
+
fetch({
|
|
1751
|
+
method: "GET",
|
|
1752
|
+
url: `/users/@me/applications/${applicationId}/role-connection`,
|
|
1753
|
+
options,
|
|
1754
|
+
}),
|
|
1755
|
+
getCurrentUserConnections: options =>
|
|
1756
|
+
fetch({
|
|
1757
|
+
method: "GET",
|
|
1758
|
+
url: `/users/@me/connections`,
|
|
1759
|
+
options,
|
|
1760
|
+
}),
|
|
1722
1761
|
getCurrentUserGuildMember: (guildId, options) =>
|
|
1723
1762
|
fetch({
|
|
1724
1763
|
method: "GET",
|
|
@@ -2008,18 +2047,6 @@ export function createRoutes<O = any>(
|
|
|
2008
2047
|
url: `/users/${userId}`,
|
|
2009
2048
|
options,
|
|
2010
2049
|
}),
|
|
2011
|
-
getUserApplicationRoleConnection: (applicationId, options) =>
|
|
2012
|
-
fetch({
|
|
2013
|
-
method: "GET",
|
|
2014
|
-
url: `/users/@me/applications/${applicationId}/role-connection`,
|
|
2015
|
-
options,
|
|
2016
|
-
}),
|
|
2017
|
-
getUserConnections: options =>
|
|
2018
|
-
fetch({
|
|
2019
|
-
method: "GET",
|
|
2020
|
-
url: `/users/@me/connections`,
|
|
2021
|
-
options,
|
|
2022
|
-
}),
|
|
2023
2050
|
getWebhook: (webhookId, options) =>
|
|
2024
2051
|
fetch({
|
|
2025
2052
|
method: "GET",
|
|
@@ -2082,6 +2109,12 @@ export function createRoutes<O = any>(
|
|
|
2082
2109
|
url: `/guilds/${guildId}/auto-moderation/rules`,
|
|
2083
2110
|
options,
|
|
2084
2111
|
}),
|
|
2112
|
+
listEntitlements: (applicationId, options) =>
|
|
2113
|
+
fetch({
|
|
2114
|
+
method: "GET",
|
|
2115
|
+
url: `/applications/${applicationId}/entitlements`,
|
|
2116
|
+
options,
|
|
2117
|
+
}),
|
|
2085
2118
|
listGuildEmojis: (guildId, options) =>
|
|
2086
2119
|
fetch({
|
|
2087
2120
|
method: "GET",
|
|
@@ -2129,6 +2162,12 @@ export function createRoutes<O = any>(
|
|
|
2129
2162
|
params,
|
|
2130
2163
|
options,
|
|
2131
2164
|
}),
|
|
2165
|
+
listSkUs: (applicationId, options) =>
|
|
2166
|
+
fetch({
|
|
2167
|
+
method: "GET",
|
|
2168
|
+
url: `/applications/${applicationId}/skus`,
|
|
2169
|
+
options,
|
|
2170
|
+
}),
|
|
2132
2171
|
listStickerPacks: options =>
|
|
2133
2172
|
fetch({
|
|
2134
2173
|
method: "GET",
|
|
@@ -2399,7 +2438,11 @@ export function createRoutes<O = any>(
|
|
|
2399
2438
|
url: `/applications/${applicationId}/role-connections/metadata`,
|
|
2400
2439
|
options,
|
|
2401
2440
|
}),
|
|
2402
|
-
|
|
2441
|
+
updateCurrentUserApplicationRoleConnection: (
|
|
2442
|
+
applicationId,
|
|
2443
|
+
params,
|
|
2444
|
+
options,
|
|
2445
|
+
) =>
|
|
2403
2446
|
fetch({
|
|
2404
2447
|
method: "PUT",
|
|
2405
2448
|
url: `/users/@me/applications/${applicationId}/role-connection`,
|
|
@@ -2417,6 +2460,8 @@ export interface CreateStageInstanceParams {
|
|
|
2417
2460
|
readonly privacy_level?: PrivacyLevel
|
|
2418
2461
|
/** Notify @everyone that a Stage instance has started */
|
|
2419
2462
|
readonly send_start_notification?: boolean
|
|
2463
|
+
/** The guild scheduled event associated with this Stage instance */
|
|
2464
|
+
readonly guild_scheduled_event_id?: Snowflake
|
|
2420
2465
|
}
|
|
2421
2466
|
export interface CreateWebhookParams {
|
|
2422
2467
|
/** name of the webhook (1-80 characters) */
|
|
@@ -2452,6 +2497,26 @@ export interface EditChannelPermissionParams {
|
|
|
2452
2497
|
/** 0 for a role or 1 for a member */
|
|
2453
2498
|
readonly type: number
|
|
2454
2499
|
}
|
|
2500
|
+
export interface EditCurrentApplicationParams {
|
|
2501
|
+
/** Default custom authorization URL for the app, if enabled */
|
|
2502
|
+
readonly custom_install_url: string
|
|
2503
|
+
/** Description of the app */
|
|
2504
|
+
readonly description: string
|
|
2505
|
+
/** Role connection verification URL for the app */
|
|
2506
|
+
readonly role_connections_verification_url: string
|
|
2507
|
+
/** Settings for the app's default in-app authorization link, if enabled */
|
|
2508
|
+
readonly install_params: InstallParam
|
|
2509
|
+
/** App's public flags */
|
|
2510
|
+
readonly flags: number
|
|
2511
|
+
/** Icon for the app */
|
|
2512
|
+
readonly icon?: string | null
|
|
2513
|
+
/** Default rich presence invite cover image for the app */
|
|
2514
|
+
readonly cover_image?: string | null
|
|
2515
|
+
/** Interactions endpoint URL for the app */
|
|
2516
|
+
readonly interactions_endpoint_url: string
|
|
2517
|
+
/** List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags. */
|
|
2518
|
+
readonly tags: Array<string>
|
|
2519
|
+
}
|
|
2455
2520
|
export interface EditGlobalApplicationCommandParams {
|
|
2456
2521
|
/** Name of command, 1-32 characters */
|
|
2457
2522
|
readonly name?: string
|
|
@@ -2815,6 +2880,11 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2815
2880
|
params?: Partial<CreateStageInstanceParams>,
|
|
2816
2881
|
options?: O,
|
|
2817
2882
|
) => RestResponse<StageInstance>
|
|
2883
|
+
/** 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. */
|
|
2884
|
+
createTestEntitlement: (
|
|
2885
|
+
applicationId: string,
|
|
2886
|
+
options?: O,
|
|
2887
|
+
) => RestResponse<any>
|
|
2818
2888
|
/** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. Fires a Webhooks Update Gateway event. */
|
|
2819
2889
|
createWebhook: (
|
|
2820
2890
|
channelId: string,
|
|
@@ -2937,6 +3007,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2937
3007
|
) => RestResponse<any>
|
|
2938
3008
|
/** Deletes the Stage instance. Returns 204 No Content. Fires a Stage Instance Delete Gateway event. */
|
|
2939
3009
|
deleteStageInstance: (channelId: string, options?: O) => RestResponse<any>
|
|
3010
|
+
/** Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering. */
|
|
3011
|
+
deleteTestEntitlement: (
|
|
3012
|
+
applicationId: string,
|
|
3013
|
+
entitlementId: string,
|
|
3014
|
+
options?: O,
|
|
3015
|
+
) => RestResponse<any>
|
|
2940
3016
|
/** 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.
|
|
2941
3017
|
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. */
|
|
2942
3018
|
deleteUserReaction: (
|
|
@@ -2976,6 +3052,11 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2976
3052
|
params?: Partial<EditChannelPermissionParams>,
|
|
2977
3053
|
options?: O,
|
|
2978
3054
|
) => RestResponse<any>
|
|
3055
|
+
/** 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. */
|
|
3056
|
+
editCurrentApplication: (
|
|
3057
|
+
params?: Partial<EditCurrentApplicationParams>,
|
|
3058
|
+
options?: O,
|
|
3059
|
+
) => RestResponse<Application>
|
|
2979
3060
|
/** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
|
|
2980
3061
|
editFollowupMessage: (
|
|
2981
3062
|
applicationId: string,
|
|
@@ -3098,12 +3179,19 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3098
3179
|
) => RestResponse<Application>
|
|
3099
3180
|
/** 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. */
|
|
3100
3181
|
getCurrentUser: (options?: O) => RestResponse<User>
|
|
3182
|
+
/** 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. */
|
|
3183
|
+
getCurrentUserApplicationRoleConnection: (
|
|
3184
|
+
applicationId: string,
|
|
3185
|
+
options?: O,
|
|
3186
|
+
) => RestResponse<ApplicationRoleConnection>
|
|
3187
|
+
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
3188
|
+
getCurrentUserConnections: (options?: O) => RestResponse<Array<Connection>>
|
|
3101
3189
|
/** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
|
|
3102
3190
|
getCurrentUserGuildMember: (
|
|
3103
3191
|
guildId: string,
|
|
3104
3192
|
options?: O,
|
|
3105
3193
|
) => RestResponse<GuildMember>
|
|
3106
|
-
/** Returns a list of partial guild objects the current user is a member of.
|
|
3194
|
+
/** Returns a list of partial guild objects the current user is a member of. For OAuth2, requires the guilds scope. */
|
|
3107
3195
|
getCurrentUserGuilds: (
|
|
3108
3196
|
params?: Partial<GetCurrentUserGuildParams>,
|
|
3109
3197
|
options?: O,
|
|
@@ -3259,7 +3347,7 @@ If the user is not in the guild, then the guild must be discoverable. */
|
|
|
3259
3347
|
guildId: string,
|
|
3260
3348
|
options?: O,
|
|
3261
3349
|
) => RestResponse<WelcomeScreen>
|
|
3262
|
-
/** Returns the widget for the guild. */
|
|
3350
|
+
/** Returns the widget for the guild. Fires an Invite Create Gateway event if an invite channel is defined on the Guild Widget. */
|
|
3263
3351
|
getGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidget>
|
|
3264
3352
|
/** Returns a PNG image widget for the guild. Requires no permissions or authentication. */
|
|
3265
3353
|
getGuildWidgetImage: (
|
|
@@ -3312,13 +3400,6 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3312
3400
|
) => RestResponse<ThreadMember>
|
|
3313
3401
|
/** Returns a user object for a given user ID. */
|
|
3314
3402
|
getUser: (userId: string, options?: O) => RestResponse<User>
|
|
3315
|
-
/** 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. */
|
|
3316
|
-
getUserApplicationRoleConnection: (
|
|
3317
|
-
applicationId: string,
|
|
3318
|
-
options?: O,
|
|
3319
|
-
) => RestResponse<ApplicationRoleConnection>
|
|
3320
|
-
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
3321
|
-
getUserConnections: (options?: O) => RestResponse<Array<Connection>>
|
|
3322
3403
|
/** Returns the new webhook object for the given id. */
|
|
3323
3404
|
getWebhook: (webhookId: string, options?: O) => RestResponse<Webhook>
|
|
3324
3405
|
/** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
@@ -3364,6 +3445,8 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3364
3445
|
guildId: string,
|
|
3365
3446
|
options?: O,
|
|
3366
3447
|
) => RestResponse<Array<AutoModerationRule>>
|
|
3448
|
+
/** Returns all entitlements for a given app, active and expired. */
|
|
3449
|
+
listEntitlements: (applicationId: string, options?: O) => RestResponse<any>
|
|
3367
3450
|
/** Returns a list of emoji objects for the given guild. */
|
|
3368
3451
|
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Array<Emoji>>
|
|
3369
3452
|
/** Returns a list of guild member objects that are members of the guild. */
|
|
@@ -3401,6 +3484,8 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3401
3484
|
params?: Partial<ListScheduledEventsForGuildParams>,
|
|
3402
3485
|
options?: O,
|
|
3403
3486
|
) => RestResponse<Array<GuildScheduledEvent>>
|
|
3487
|
+
/** 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. */
|
|
3488
|
+
listSkUs: (applicationId: string, options?: O) => RestResponse<any>
|
|
3404
3489
|
/** Returns a list of available sticker packs. */
|
|
3405
3490
|
listStickerPacks: (options?: O) => RestResponse<any>
|
|
3406
3491
|
listThreadMembers: (
|
|
@@ -3523,7 +3608,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3523
3608
|
params?: Partial<ModifyGuildWelcomeScreenParams>,
|
|
3524
3609
|
options?: O,
|
|
3525
3610
|
) => RestResponse<WelcomeScreen>
|
|
3526
|
-
/** 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. */
|
|
3611
|
+
/** 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. */
|
|
3527
3612
|
modifyGuildWidget: (
|
|
3528
3613
|
guildId: string,
|
|
3529
3614
|
options?: O,
|
|
@@ -3615,7 +3700,7 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3615
3700
|
templateCode: string,
|
|
3616
3701
|
options?: O,
|
|
3617
3702
|
) => RestResponse<GuildTemplate>
|
|
3618
|
-
/** Post a typing indicator for the specified channel
|
|
3703
|
+
/** 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. */
|
|
3619
3704
|
triggerTypingIndicator: (channelId: string, options?: O) => RestResponse<any>
|
|
3620
3705
|
/** 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. */
|
|
3621
3706
|
unpinMessage: (
|
|
@@ -3629,12 +3714,36 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
3629
3714
|
options?: O,
|
|
3630
3715
|
) => RestResponse<Array<ApplicationRoleConnectionMetadatum>>
|
|
3631
3716
|
/** 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. */
|
|
3632
|
-
|
|
3717
|
+
updateCurrentUserApplicationRoleConnection: (
|
|
3633
3718
|
applicationId: string,
|
|
3634
|
-
params?: Partial<
|
|
3719
|
+
params?: Partial<UpdateCurrentUserApplicationRoleConnectionParams>,
|
|
3635
3720
|
options?: O,
|
|
3636
3721
|
) => RestResponse<ApplicationRoleConnection>
|
|
3637
3722
|
}
|
|
3723
|
+
export interface Entitlement {
|
|
3724
|
+
/** ID of the entitlement */
|
|
3725
|
+
readonly id: Snowflake
|
|
3726
|
+
/** ID of the SKU */
|
|
3727
|
+
readonly sku_id: Snowflake
|
|
3728
|
+
/** ID of the user that is granted access to the entitlement's sku */
|
|
3729
|
+
readonly user_id?: Snowflake
|
|
3730
|
+
/** ID of the guild that is granted access to the entitlement's sku */
|
|
3731
|
+
readonly guild_id?: Snowflake
|
|
3732
|
+
/** ID of the parent application */
|
|
3733
|
+
readonly application_id: Snowflake
|
|
3734
|
+
/** Type of entitlement */
|
|
3735
|
+
readonly type: EntitlementType
|
|
3736
|
+
/** Not applicable for App Subscriptions. Subscriptions are not consumed and will be false */
|
|
3737
|
+
readonly consumed: boolean
|
|
3738
|
+
/** Start date at which the entitlement is valid. Not present when using test entitlements. */
|
|
3739
|
+
readonly starts_at?: string
|
|
3740
|
+
/** Date at which the entitlement is no longer valid. Not present when using test entitlements. */
|
|
3741
|
+
readonly ends_at?: string
|
|
3742
|
+
}
|
|
3743
|
+
export enum EntitlementType {
|
|
3744
|
+
/** Entitlement was purchased as an app subscription */
|
|
3745
|
+
APPLICATION_SUBSCRIPTION = 8,
|
|
3746
|
+
}
|
|
3638
3747
|
export enum EventType {
|
|
3639
3748
|
/** when a member sends or edits a message in the guild */
|
|
3640
3749
|
MESSAGE_SEND = 1,
|
|
@@ -3686,7 +3795,7 @@ export interface FollowedChannel {
|
|
|
3686
3795
|
export interface ForumAndMediaThreadMessageParam {
|
|
3687
3796
|
/** Message contents (up to 2000 characters) */
|
|
3688
3797
|
readonly content?: string
|
|
3689
|
-
/**
|
|
3798
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
3690
3799
|
readonly embeds?: Array<Embed>
|
|
3691
3800
|
/** Allowed mentions for the message */
|
|
3692
3801
|
readonly allowed_mentions?: AllowedMention
|
|
@@ -3694,13 +3803,9 @@ export interface ForumAndMediaThreadMessageParam {
|
|
|
3694
3803
|
readonly components?: Array<Component>
|
|
3695
3804
|
/** IDs of up to 3 stickers in the server to send in the message */
|
|
3696
3805
|
readonly sticker_ids?: Array<Snowflake>
|
|
3697
|
-
/** Contents of the file being sent. See Uploading Files */
|
|
3698
|
-
readonly files: string
|
|
3699
|
-
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
3700
|
-
readonly payload_json?: string
|
|
3701
3806
|
/** Attachment objects with filename and description. See Uploading Files */
|
|
3702
3807
|
readonly attachments?: Array<Attachment>
|
|
3703
|
-
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS
|
|
3808
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
3704
3809
|
readonly flags?: number
|
|
3705
3810
|
}
|
|
3706
3811
|
export enum ForumLayoutType {
|
|
@@ -4419,9 +4524,9 @@ export interface IdentifyConnectionProperty {
|
|
|
4419
4524
|
readonly device: string
|
|
4420
4525
|
}
|
|
4421
4526
|
export interface InstallParam {
|
|
4422
|
-
/**
|
|
4527
|
+
/** Scopes to add the application to the server with */
|
|
4423
4528
|
readonly scopes: Array<OAuth2Scope>
|
|
4424
|
-
/**
|
|
4529
|
+
/** Permissions to request for the bot role */
|
|
4425
4530
|
readonly permissions: string
|
|
4426
4531
|
}
|
|
4427
4532
|
export interface Integration {
|
|
@@ -4531,6 +4636,8 @@ export interface Interaction {
|
|
|
4531
4636
|
readonly locale?: string
|
|
4532
4637
|
/** Guild's preferred locale, if invoked in a guild */
|
|
4533
4638
|
readonly guild_locale?: string
|
|
4639
|
+
/** For monetized apps, any entitlements for the invoking user, representing access to premium SKUs */
|
|
4640
|
+
readonly entitlements: Array<Entitlement>
|
|
4534
4641
|
}
|
|
4535
4642
|
export interface InteractionCallbackAutocomplete {
|
|
4536
4643
|
/** autocomplete choices (max of 25 choices) */
|
|
@@ -4579,6 +4686,8 @@ export enum InteractionCallbackType {
|
|
|
4579
4686
|
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
4580
4687
|
/** respond to an interaction with a popup modal */
|
|
4581
4688
|
MODAL = 9,
|
|
4689
|
+
/** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
4690
|
+
PREMIUM_REQUIRED = 10,
|
|
4582
4691
|
}
|
|
4583
4692
|
export type InteractionCreateEvent = Interaction
|
|
4584
4693
|
export type InteractionDatum =
|
|
@@ -4888,6 +4997,8 @@ export interface Message {
|
|
|
4888
4997
|
readonly position?: number
|
|
4889
4998
|
/** data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message */
|
|
4890
4999
|
readonly role_subscription_data?: RoleSubscriptionDatum
|
|
5000
|
+
/** data for users, members, channels, and roles in the message's auto-populated select menus */
|
|
5001
|
+
readonly resolved?: ResolvedDatum
|
|
4891
5002
|
}
|
|
4892
5003
|
export interface MessageActivity {
|
|
4893
5004
|
/** type of message activity */
|
|
@@ -4908,6 +5019,8 @@ export interface MessageComponentDatum {
|
|
|
4908
5019
|
readonly component_type: ComponentType
|
|
4909
5020
|
/** values the user selected in a select menu component */
|
|
4910
5021
|
readonly values?: Array<SelectOption>
|
|
5022
|
+
/** resolved entities from selected options */
|
|
5023
|
+
readonly resolved?: ResolvedDatum
|
|
4911
5024
|
}
|
|
4912
5025
|
export type MessageCreateEvent = Message & MessageCreateExtra
|
|
4913
5026
|
export interface MessageCreateExtra {
|
|
@@ -5363,13 +5476,13 @@ export enum MutableGuildFeature {
|
|
|
5363
5476
|
export enum OAuth2Scope {
|
|
5364
5477
|
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list — not currently available for apps */
|
|
5365
5478
|
ACTIVITIES_READ = "activities.read",
|
|
5366
|
-
/** allows your app to update a user's activity -
|
|
5479
|
+
/** allows your app to update a user's activity - not currently available for apps (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
|
|
5367
5480
|
ACTIVITIES_WRITE = "activities.write",
|
|
5368
5481
|
/** allows your app to read build data for a user's applications */
|
|
5369
5482
|
APPLICATIONS_BUILDS_READ = "applications.builds.read",
|
|
5370
5483
|
/** allows your app to upload/update builds for a user's applications - requires Discord approval */
|
|
5371
5484
|
APPLICATIONS_BUILDS_UPLOAD = "applications.builds.upload",
|
|
5372
|
-
/** allows your app to
|
|
5485
|
+
/** allows your app to add commands to a guild - included by default with the bot scope */
|
|
5373
5486
|
APPLICATIONS_COMMANDS = "applications.commands",
|
|
5374
5487
|
/** allows your app to update its commands using a Bearer token - client credentials grant only */
|
|
5375
5488
|
APPLICATIONS_COMMANDS_UPDATE = "applications.commands.update",
|
|
@@ -5883,6 +5996,12 @@ export interface SearchGuildMemberParams {
|
|
|
5883
5996
|
/** max number of members to return (1-1000) */
|
|
5884
5997
|
readonly limit: number
|
|
5885
5998
|
}
|
|
5999
|
+
export interface SelectDefaultValue {
|
|
6000
|
+
/** ID of a user, role, or channel */
|
|
6001
|
+
readonly id: Snowflake
|
|
6002
|
+
/** Type of value that id represents. Either "user", "role", or "channel" */
|
|
6003
|
+
readonly type: string
|
|
6004
|
+
}
|
|
5886
6005
|
export interface SelectMenu {
|
|
5887
6006
|
/** Type of select menu component (text: 3, user: 5, role: 6, mentionable: 7, channels: 8) */
|
|
5888
6007
|
readonly type: ComponentType
|
|
@@ -5894,6 +6013,8 @@ export interface SelectMenu {
|
|
|
5894
6013
|
readonly channel_types?: Array<ChannelType>
|
|
5895
6014
|
/** Placeholder text if nothing is selected; max 150 characters */
|
|
5896
6015
|
readonly placeholder?: string
|
|
6016
|
+
/** 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 */
|
|
6017
|
+
readonly default_values?: Array<SelectDefaultValue>
|
|
5897
6018
|
/** Minimum number of items that must be chosen (defaults to 1); min 0, max 25 */
|
|
5898
6019
|
readonly min_values?: number
|
|
5899
6020
|
/** Maximum number of items that can be chosen (defaults to 1); max 25 */
|
|
@@ -5938,6 +6059,30 @@ export interface SessionStartLimit {
|
|
|
5938
6059
|
/** Number of identify requests allowed per 5 seconds */
|
|
5939
6060
|
readonly max_concurrency: number
|
|
5940
6061
|
}
|
|
6062
|
+
export interface Sku {
|
|
6063
|
+
/** ID of SKU */
|
|
6064
|
+
readonly id: Snowflake
|
|
6065
|
+
/** Type of SKU */
|
|
6066
|
+
readonly type: SkuType
|
|
6067
|
+
/** ID of the parent application */
|
|
6068
|
+
readonly application_id: Snowflake
|
|
6069
|
+
/** Customer-facing name of your premium offering */
|
|
6070
|
+
readonly name: string
|
|
6071
|
+
/** System-generated URL slug based on the SKU's name */
|
|
6072
|
+
readonly slug: string
|
|
6073
|
+
/** SKU flags combined as a bitfield */
|
|
6074
|
+
readonly flags: number
|
|
6075
|
+
}
|
|
6076
|
+
export const SkuFlag = {
|
|
6077
|
+
GUILD_SUBSCRIPTION: 1 << 7,
|
|
6078
|
+
USER_SUBSCRIPTION: 1 << 8,
|
|
6079
|
+
} as const
|
|
6080
|
+
export enum SkuType {
|
|
6081
|
+
/** Represents a recurring subscription */
|
|
6082
|
+
SUBSCRIPTION = 5,
|
|
6083
|
+
/** System-generated group for each SUBSCRIPTION SKU created */
|
|
6084
|
+
SUBSCRIPTION_GROUP = 6,
|
|
6085
|
+
}
|
|
5941
6086
|
export type Snowflake = `${bigint}`
|
|
5942
6087
|
export enum SortOrderType {
|
|
5943
6088
|
/** Sort forum posts by activity */
|
|
@@ -5979,10 +6124,14 @@ export interface StartThreadInForumOrMediaChannelParams {
|
|
|
5979
6124
|
readonly auto_archive_duration?: number
|
|
5980
6125
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
5981
6126
|
readonly rate_limit_per_user?: number | null
|
|
5982
|
-
/** contents of the first message in the forum
|
|
6127
|
+
/** contents of the first message in the forum thread */
|
|
5983
6128
|
readonly message: Message
|
|
5984
|
-
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM
|
|
6129
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
5985
6130
|
readonly applied_tags?: Array<Snowflake>
|
|
6131
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
6132
|
+
readonly files?: string
|
|
6133
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
6134
|
+
readonly payload_json?: string
|
|
5986
6135
|
}
|
|
5987
6136
|
export interface StartThreadWithoutMessageParams {
|
|
5988
6137
|
/** 1-100 character channel name */
|
|
@@ -6240,6 +6389,14 @@ export interface UnavailableGuild {
|
|
|
6240
6389
|
/** */
|
|
6241
6390
|
readonly unavailable: boolean
|
|
6242
6391
|
}
|
|
6392
|
+
export interface UpdateCurrentUserApplicationRoleConnectionParams {
|
|
6393
|
+
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
6394
|
+
readonly platform_name?: string
|
|
6395
|
+
/** the username on the platform a bot has connected (max 100 characters) */
|
|
6396
|
+
readonly platform_username?: string
|
|
6397
|
+
/** 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 */
|
|
6398
|
+
readonly metadata?: ApplicationRoleConnectionMetadatum
|
|
6399
|
+
}
|
|
6243
6400
|
export interface UpdatePresence {
|
|
6244
6401
|
/** Unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
|
|
6245
6402
|
readonly since?: number | null
|
|
@@ -6250,14 +6407,6 @@ export interface UpdatePresence {
|
|
|
6250
6407
|
/** Whether or not the client is afk */
|
|
6251
6408
|
readonly afk: boolean
|
|
6252
6409
|
}
|
|
6253
|
-
export interface UpdateUserApplicationRoleConnectionParams {
|
|
6254
|
-
/** the vanity name of the platform a bot has connected (max 50 characters) */
|
|
6255
|
-
readonly platform_name?: string
|
|
6256
|
-
/** the username on the platform a bot has connected (max 100 characters) */
|
|
6257
|
-
readonly platform_username?: string
|
|
6258
|
-
/** 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 */
|
|
6259
|
-
readonly metadata?: ApplicationRoleConnectionMetadatum
|
|
6260
|
-
}
|
|
6261
6410
|
export interface UpdateVoiceState {
|
|
6262
6411
|
/** ID of the guild */
|
|
6263
6412
|
readonly guild_id: Snowflake
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.66.
|
|
1
|
+
export const LIB_VERSION = "0.66.3";
|