dfx 0.45.10 → 0.46.1
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/Helpers/permissions.d.ts +2 -2
- package/Helpers/permissions.d.ts.map +1 -1
- package/Interactions/utils.d.ts +0 -1
- package/Interactions/utils.d.ts.map +1 -1
- package/Interactions/utils.js +0 -37
- package/Interactions/utils.js.map +1 -1
- package/Interactions/webhook.d.ts +22 -2
- package/Interactions/webhook.d.ts.map +1 -1
- package/Interactions/webhook.js +24 -27
- package/Interactions/webhook.js.map +1 -1
- package/package.json +9 -9
- package/src/Interactions/utils.ts +0 -38
- package/src/Interactions/webhook.ts +31 -16
- package/src/package.json +9 -9
- package/src/types.ts +37 -7
- package/types.d.ts +17 -6
- package/types.d.ts.map +1 -1
- package/types.js +12 -5
- package/types.js.map +1 -1
package/types.d.ts
CHANGED
|
@@ -1391,7 +1391,7 @@ export interface Endpoints<O> {
|
|
|
1391
1391
|
/** Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead). */
|
|
1392
1392
|
createDm: (params?: Partial<CreateDmParams>, options?: O) => RestResponse<Channel>;
|
|
1393
1393
|
/** Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups. */
|
|
1394
|
-
createFollowupMessage: (applicationId: string, interactionToken: string, options?: O) => RestResponse<any>;
|
|
1394
|
+
createFollowupMessage: (applicationId: string, interactionToken: string, params?: Partial<ExecuteWebhookParams>, options?: O) => RestResponse<any>;
|
|
1395
1395
|
createGlobalApplicationCommand: (applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1396
1396
|
/** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a Channel Create Gateway event. */
|
|
1397
1397
|
createGroupDm: (params?: Partial<CreateGroupDmParams>, options?: O) => RestResponse<Channel>;
|
|
@@ -1481,13 +1481,13 @@ export interface Endpoints<O> {
|
|
|
1481
1481
|
/** 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. */
|
|
1482
1482
|
editChannelPermissions: (channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: O) => RestResponse<any>;
|
|
1483
1483
|
/** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
|
|
1484
|
-
editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => RestResponse<
|
|
1484
|
+
editFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1485
1485
|
editGlobalApplicationCommand: (applicationId: string, commandId: string, params?: Partial<EditGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1486
1486
|
editGuildApplicationCommand: (applicationId: string, guildId: string, commandId: string, params?: Partial<EditGuildApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1487
1487
|
/** Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). */
|
|
1488
1488
|
editMessage: (channelId: string, messageId: string, params?: Partial<EditMessageParams>, options?: O) => RestResponse<Message>;
|
|
1489
1489
|
/** Edits the initial Interaction response. Functions the same as Edit Webhook Message. */
|
|
1490
|
-
editOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => RestResponse<
|
|
1490
|
+
editOriginalInteractionResponse: (applicationId: string, interactionToken: string, params?: Partial<EditWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1491
1491
|
/** Edits a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
1492
1492
|
editWebhookMessage: (webhookId: string, webhookToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1493
1493
|
/** Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. */
|
|
@@ -1525,7 +1525,7 @@ export interface Endpoints<O> {
|
|
|
1525
1525
|
/** Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope. */
|
|
1526
1526
|
getCurrentUserGuilds: (params?: Partial<GetCurrentUserGuildParams>, options?: O) => RestResponse<Guild[]>;
|
|
1527
1527
|
/** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
|
|
1528
|
-
getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, options?: O) => RestResponse<
|
|
1528
|
+
getFollowupMessage: (applicationId: string, interactionToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1529
1529
|
getGateway: (options?: O) => RestResponse<any>;
|
|
1530
1530
|
getGatewayBot: (options?: O) => RestResponse<GetGatewayBotResponse>;
|
|
1531
1531
|
/** Fetch a global command for your application. Returns an application command object. */
|
|
@@ -1589,7 +1589,7 @@ export interface Endpoints<O> {
|
|
|
1589
1589
|
/** Returns an invite object for the given code. */
|
|
1590
1590
|
getInvite: (inviteCode: string, params?: Partial<GetInviteParams>, options?: O) => RestResponse<Invite>;
|
|
1591
1591
|
/** Returns the initial Interaction response. Functions the same as Get Webhook Message. */
|
|
1592
|
-
getOriginalInteractionResponse: (applicationId: string, interactionToken: string, options?: O) => RestResponse<
|
|
1592
|
+
getOriginalInteractionResponse: (applicationId: string, interactionToken: string, params?: Partial<GetWebhookMessageParams>, options?: O) => RestResponse<Message>;
|
|
1593
1593
|
/** Returns all pinned messages in the channel as an array of message objects. */
|
|
1594
1594
|
getPinnedMessages: (channelId: string, options?: O) => RestResponse<Message[]>;
|
|
1595
1595
|
/** Get a list of users that reacted with this emoji. Returns an array of user objects on success.
|
|
@@ -2074,6 +2074,8 @@ export interface Guild {
|
|
|
2074
2074
|
readonly stickers?: Sticker[];
|
|
2075
2075
|
/** whether the guild has the boost progress bar enabled */
|
|
2076
2076
|
readonly premium_progress_bar_enabled: boolean;
|
|
2077
|
+
/** the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */
|
|
2078
|
+
readonly safety_alerts_channel_id?: Snowflake | null;
|
|
2077
2079
|
}
|
|
2078
2080
|
export interface GuildApplicationCommandPermission {
|
|
2079
2081
|
/** ID of the command or the application ID */
|
|
@@ -2167,6 +2169,8 @@ export declare const enum GuildFeature {
|
|
|
2167
2169
|
PARTNERED = "PARTNERED",
|
|
2168
2170
|
/** guild can be previewed before joining via Membership Screening or the directory */
|
|
2169
2171
|
PREVIEW_ENABLED = "PREVIEW_ENABLED",
|
|
2172
|
+
/** guild has disabled alerts for join raids in the configured safety alerts channel */
|
|
2173
|
+
RAID_ALERTS_DISABLED = "RAID_ALERTS_DISABLED",
|
|
2170
2174
|
/** guild is able to set role icons */
|
|
2171
2175
|
ROLE_ICONS = "ROLE_ICONS",
|
|
2172
2176
|
/** guild has role subscriptions that can be purchased */
|
|
@@ -3317,6 +3321,8 @@ export interface ModifyGuildParams {
|
|
|
3317
3321
|
readonly description?: string | null;
|
|
3318
3322
|
/** whether the guild's boost progress bar should be enabled */
|
|
3319
3323
|
readonly premium_progress_bar_enabled: boolean;
|
|
3324
|
+
/** the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */
|
|
3325
|
+
readonly safety_alerts_channel_id?: Snowflake | null;
|
|
3320
3326
|
}
|
|
3321
3327
|
export interface ModifyGuildRoleParams {
|
|
3322
3328
|
/** name of the role, max 100 characters */
|
|
@@ -3406,8 +3412,9 @@ export interface ModifyWebhookParams {
|
|
|
3406
3412
|
}
|
|
3407
3413
|
export declare const enum MutableGuildFeature {
|
|
3408
3414
|
COMMUNITY = "COMMUNITY",
|
|
3415
|
+
DISCOVERABLE = "DISCOVERABLE",
|
|
3409
3416
|
INVITES_DISABLED = "INVITES_DISABLED",
|
|
3410
|
-
|
|
3417
|
+
RAID_ALERTS_DISABLED = "RAID_ALERTS_DISABLED"
|
|
3411
3418
|
}
|
|
3412
3419
|
export declare const enum OAuth2Scope {
|
|
3413
3420
|
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list — not currently available for apps */
|
|
@@ -3580,6 +3587,8 @@ export declare const PermissionFlag: {
|
|
|
3580
3587
|
readonly VIEW_CREATOR_MONETIZATION_ANALYTICS: bigint;
|
|
3581
3588
|
/** Allows for using soundboard in a voice channel */
|
|
3582
3589
|
readonly USE_SOUNDBOARD: bigint;
|
|
3590
|
+
/** Allows the usage of custom soundboard sounds from other servers */
|
|
3591
|
+
readonly USE_EXTERNAL_SOUNDS: bigint;
|
|
3583
3592
|
/** Allows sending voice messages */
|
|
3584
3593
|
readonly SEND_VOICE_MESSAGES: bigint;
|
|
3585
3594
|
};
|
|
@@ -4172,6 +4181,8 @@ export interface TriggerMetadatum {
|
|
|
4172
4181
|
readonly allow_list: string[];
|
|
4173
4182
|
/** MENTION_SPAM */
|
|
4174
4183
|
readonly mention_total_limit: number;
|
|
4184
|
+
/** MENTION_SPAM */
|
|
4185
|
+
readonly mention_raid_protection_enabled: boolean;
|
|
4175
4186
|
}
|
|
4176
4187
|
export declare const enum TriggerType {
|
|
4177
4188
|
/** check if content contains words from a user defined list of keywords */
|