dfx 0.97.7 → 0.98.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/Cache/driver.d.ts.map +1 -1
- package/Cache/memory.d.ts.map +1 -1
- package/Cache/memoryTTL.d.ts.map +1 -1
- package/Cache/prelude.d.ts +1 -1
- package/Cache/prelude.d.ts.map +1 -1
- package/Cache.d.ts.map +1 -1
- package/DiscordConfig.d.ts +5 -5
- package/DiscordConfig.d.ts.map +1 -1
- package/DiscordConfig.js +2 -2
- package/DiscordConfig.js.map +1 -1
- package/DiscordGateway/Messaging.d.ts +2 -2
- package/DiscordGateway/Messaging.d.ts.map +1 -1
- package/DiscordGateway/Shard/heartbeats.d.ts.map +1 -1
- package/DiscordGateway/Shard/identify.d.ts.map +1 -1
- package/DiscordGateway/Shard/sendEvents.d.ts.map +1 -1
- package/DiscordGateway/Shard/utils.d.ts.map +1 -1
- package/DiscordGateway/Shard.js +2 -2
- package/DiscordGateway/Shard.js.map +1 -1
- package/DiscordGateway/Sharder.d.ts +1 -1
- package/DiscordGateway/Sharder.d.ts.map +1 -1
- package/DiscordGateway.d.ts +1 -1
- package/DiscordGateway.d.ts.map +1 -1
- package/DiscordREST/types.d.ts +6 -5
- package/DiscordREST/types.d.ts.map +1 -1
- package/DiscordREST/utils.d.ts +4 -4
- package/DiscordREST/utils.d.ts.map +1 -1
- package/DiscordREST/utils.js +3 -3
- package/DiscordREST/utils.js.map +1 -1
- package/DiscordREST.d.ts +7 -5
- package/DiscordREST.d.ts.map +1 -1
- package/DiscordREST.js +10 -9
- package/DiscordREST.js.map +1 -1
- package/Helpers/flags.d.ts.map +1 -1
- package/Helpers/intents.d.ts +2 -2
- package/Helpers/intents.d.ts.map +1 -1
- package/Helpers/interactions.d.ts.map +1 -1
- package/Helpers/members.d.ts.map +1 -1
- package/Helpers/permissions.d.ts +2 -2
- package/Helpers/permissions.d.ts.map +1 -1
- package/Helpers/ui.d.ts.map +1 -1
- package/Interactions/builder.d.ts +1 -2
- package/Interactions/builder.d.ts.map +1 -1
- package/Interactions/builder.js +2 -2
- package/Interactions/builder.js.map +1 -1
- package/Interactions/context.d.ts +3 -3
- package/Interactions/context.d.ts.map +1 -1
- package/Interactions/definitions.d.ts +5 -5
- package/Interactions/definitions.d.ts.map +1 -1
- package/Interactions/gateway.d.ts +2 -2
- package/Interactions/gateway.d.ts.map +1 -1
- package/Interactions/gateway.js +2 -2
- package/Interactions/gateway.js.map +1 -1
- package/Interactions/handlers.d.ts +1 -4
- package/Interactions/handlers.d.ts.map +1 -1
- package/Interactions/index.d.ts.map +1 -1
- package/Interactions/utils.d.ts +1 -4
- package/Interactions/utils.d.ts.map +1 -1
- package/Interactions/webhook.d.ts.map +1 -1
- package/RateLimit.d.ts.map +1 -1
- package/gateway.d.ts +2 -2
- package/gateway.d.ts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/mjs/DiscordConfig.mjs +2 -2
- package/mjs/DiscordConfig.mjs.map +1 -1
- package/mjs/DiscordGateway/Shard.mjs +2 -2
- package/mjs/DiscordGateway/Shard.mjs.map +1 -1
- package/mjs/DiscordREST/utils.mjs +3 -3
- package/mjs/DiscordREST/utils.mjs.map +1 -1
- package/mjs/DiscordREST.mjs +10 -9
- package/mjs/DiscordREST.mjs.map +1 -1
- package/mjs/Interactions/builder.mjs +2 -2
- package/mjs/Interactions/builder.mjs.map +1 -1
- package/mjs/Interactions/gateway.mjs +2 -2
- package/mjs/Interactions/gateway.mjs.map +1 -1
- package/mjs/types.mjs +2 -1
- package/mjs/types.mjs.map +1 -1
- package/mjs/version.mjs +1 -1
- package/package.json +4 -4
- package/src/Cache/prelude.ts +1 -1
- package/src/DiscordConfig.ts +7 -9
- package/src/DiscordGateway/Shard.ts +2 -2
- package/src/DiscordREST/types.ts +6 -5
- package/src/DiscordREST/utils.ts +6 -6
- package/src/DiscordREST.ts +24 -21
- package/src/Interactions/builder.ts +2 -2
- package/src/Interactions/gateway.ts +4 -3
- package/src/types.ts +22 -18
- package/src/version.ts +1 -1
- package/types.d.ts +23 -19
- package/types.d.ts.map +1 -1
- package/types.js +2 -1
- package/types.js.map +1 -1
- package/utils/Effect.d.ts.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/webhooks.d.ts +1 -1
- package/webhooks.d.ts.map +1 -1
|
@@ -6,7 +6,8 @@ import * as Effect from "effect/Effect"
|
|
|
6
6
|
import * as Layer from "effect/Layer"
|
|
7
7
|
import * as Queue from "effect/Queue"
|
|
8
8
|
import * as Ref from "effect/Ref"
|
|
9
|
-
import * as
|
|
9
|
+
import * as HttpBody from "@effect/platform/HttpBody"
|
|
10
|
+
import type * as HttpClientError from "@effect/platform/HttpClientError"
|
|
10
11
|
import { DiscordGateway } from "dfx/DiscordGateway"
|
|
11
12
|
import type { DiscordRESTError } from "dfx/DiscordREST"
|
|
12
13
|
import { DiscordREST } from "dfx/DiscordREST"
|
|
@@ -48,7 +49,7 @@ export const run =
|
|
|
48
49
|
ix: InteractionBuilder<R, E, TE>,
|
|
49
50
|
): Effect.Effect<
|
|
50
51
|
never,
|
|
51
|
-
E2 | DiscordRESTError |
|
|
52
|
+
E2 | DiscordRESTError | HttpClientError.ResponseError,
|
|
52
53
|
DiscordREST | DiscordGateway | Exclude<R2, DiscordInteraction>
|
|
53
54
|
> =>
|
|
54
55
|
Effect.gen(function* () {
|
|
@@ -77,7 +78,7 @@ export const run =
|
|
|
77
78
|
const globalSync = rest.bulkOverwriteGlobalApplicationCommands(
|
|
78
79
|
application.id,
|
|
79
80
|
{
|
|
80
|
-
body:
|
|
81
|
+
body: HttpBody.unsafeJson(
|
|
81
82
|
GlobalApplicationCommand.map(_ => _.command),
|
|
82
83
|
),
|
|
83
84
|
},
|
package/src/types.ts
CHANGED
|
@@ -234,9 +234,9 @@ export interface ApplicationCommand {
|
|
|
234
234
|
readonly default_permission?: boolean | null
|
|
235
235
|
/** Indicates whether the command is age-restricted, defaults to false */
|
|
236
236
|
readonly nsfw?: boolean
|
|
237
|
-
/**
|
|
237
|
+
/** Installation contexts where the command is available, only for globally-scoped commands. Defaults to your app's configured contexts */
|
|
238
238
|
readonly integration_types?: Array<ApplicationIntegrationType>
|
|
239
|
-
/**
|
|
239
|
+
/** Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. */
|
|
240
240
|
readonly contexts?: Array<InteractionContextType> | null
|
|
241
241
|
/** Autoincrementing version identifier updated during substantial record changes */
|
|
242
242
|
readonly version: Snowflake
|
|
@@ -416,6 +416,8 @@ export interface Attachment {
|
|
|
416
416
|
readonly id: Snowflake
|
|
417
417
|
/** name of file attached */
|
|
418
418
|
readonly filename: string
|
|
419
|
+
/** the title of the file */
|
|
420
|
+
readonly title?: string
|
|
419
421
|
/** description for the file (max 1024 characters) */
|
|
420
422
|
readonly description?: string
|
|
421
423
|
/** the attachment's media type */
|
|
@@ -759,9 +761,9 @@ export interface BulkOverwriteGuildApplicationCommandParams {
|
|
|
759
761
|
readonly dm_permission?: boolean | null
|
|
760
762
|
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true */
|
|
761
763
|
readonly default_permission?: boolean
|
|
762
|
-
/**
|
|
764
|
+
/** Installation context(s) where the command is available, defaults to GUILD_INSTALL ([0]) */
|
|
763
765
|
readonly integration_types: Array<ApplicationIntegrationType>
|
|
764
|
-
/**
|
|
766
|
+
/** Interaction context(s) where the command can be used, defaults to all contexts [0,1,2] */
|
|
765
767
|
readonly contexts: Array<InteractionContextType>
|
|
766
768
|
/** Type of command, defaults 1 if not set */
|
|
767
769
|
readonly type?: ApplicationCommandType
|
|
@@ -779,6 +781,8 @@ export interface Button {
|
|
|
779
781
|
readonly emoji?: Emoji
|
|
780
782
|
/** Developer-defined identifier for the button; max 100 characters */
|
|
781
783
|
readonly custom_id?: string
|
|
784
|
+
/** Identifier for a purchasable SKU, only available when using premium-style buttons */
|
|
785
|
+
readonly sku_id?: Snowflake
|
|
782
786
|
/** URL for link-style buttons */
|
|
783
787
|
readonly url?: string
|
|
784
788
|
/** Whether the button is disabled (defaults to false) */
|
|
@@ -790,6 +794,7 @@ export enum ButtonStyle {
|
|
|
790
794
|
SUCCESS = 3,
|
|
791
795
|
DANGER = 4,
|
|
792
796
|
LINK = 5,
|
|
797
|
+
PREMIUM = 6,
|
|
793
798
|
}
|
|
794
799
|
export interface Channel {
|
|
795
800
|
/** the id of this channel */
|
|
@@ -798,7 +803,7 @@ export interface Channel {
|
|
|
798
803
|
readonly type: ChannelType
|
|
799
804
|
/** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
|
|
800
805
|
readonly guild_id?: Snowflake
|
|
801
|
-
/** sorting position of the channel */
|
|
806
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
802
807
|
readonly position?: number
|
|
803
808
|
/** explicit permission overwrites for members and roles */
|
|
804
809
|
readonly permission_overwrites?: Array<Overwrite>
|
|
@@ -1078,7 +1083,7 @@ export interface CreateGuildChannelParams {
|
|
|
1078
1083
|
readonly user_limit: number
|
|
1079
1084
|
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
1080
1085
|
readonly rate_limit_per_user: number
|
|
1081
|
-
/** sorting position of the channel */
|
|
1086
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
1082
1087
|
readonly position: number
|
|
1083
1088
|
/** the channel's permission overwrites */
|
|
1084
1089
|
readonly permission_overwrites: Array<Overwrite>
|
|
@@ -2626,9 +2631,9 @@ export interface EditGlobalApplicationCommandParams {
|
|
|
2626
2631
|
readonly dm_permission?: boolean | null
|
|
2627
2632
|
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true */
|
|
2628
2633
|
readonly default_permission?: boolean
|
|
2629
|
-
/**
|
|
2634
|
+
/** Installation context(s) where the command is available */
|
|
2630
2635
|
readonly integration_types?: Array<ApplicationIntegrationType>
|
|
2631
|
-
/**
|
|
2636
|
+
/** Interaction context(s) where the command can be used */
|
|
2632
2637
|
readonly contexts?: Array<InteractionContextType>
|
|
2633
2638
|
/** Indicates whether the command is age-restricted */
|
|
2634
2639
|
readonly nsfw?: boolean
|
|
@@ -2886,7 +2891,6 @@ export interface Endpoints<O> {
|
|
|
2886
2891
|
params?: Partial<CreateDmParams>,
|
|
2887
2892
|
options?: O,
|
|
2888
2893
|
) => RestResponse<Channel>
|
|
2889
|
-
/** 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. */
|
|
2890
2894
|
createFollowupMessage: (
|
|
2891
2895
|
applicationId: string,
|
|
2892
2896
|
interactionToken: string,
|
|
@@ -4865,7 +4869,7 @@ export enum InteractionCallbackType {
|
|
|
4865
4869
|
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
4866
4870
|
/** respond to an interaction with a popup modal */
|
|
4867
4871
|
MODAL = 9,
|
|
4868
|
-
/** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
4872
|
+
/** Deprecated; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
4869
4873
|
PREMIUM_REQUIRED = 10,
|
|
4870
4874
|
}
|
|
4871
4875
|
export enum InteractionContextType {
|
|
@@ -5477,7 +5481,7 @@ export interface ModifyChannelGuildChannelParams {
|
|
|
5477
5481
|
readonly name: string
|
|
5478
5482
|
/** the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature */
|
|
5479
5483
|
readonly type: ChannelType
|
|
5480
|
-
/** the position of the channel in the left-hand listing */
|
|
5484
|
+
/** the position of the channel in the left-hand listing (channels with the same position are sorted by id) */
|
|
5481
5485
|
readonly position?: number | null
|
|
5482
5486
|
/** 0-1024 character channel topic (0-4096 characters for GUILD_FORUM and GUILD_MEDIA channels) */
|
|
5483
5487
|
readonly topic?: string | null
|
|
@@ -5561,7 +5565,7 @@ export interface ModifyCurrentUserVoiceStateParams {
|
|
|
5561
5565
|
export interface ModifyGuildChannelPositionParams {
|
|
5562
5566
|
/** channel id */
|
|
5563
5567
|
readonly id: Snowflake
|
|
5564
|
-
/** sorting position of the channel */
|
|
5568
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
5565
5569
|
readonly position?: number | null
|
|
5566
5570
|
/** syncs the permission overwrites with the new parent, if moving to a new category */
|
|
5567
5571
|
readonly lock_permissions?: boolean | null
|
|
@@ -5667,7 +5671,7 @@ export interface ModifyGuildRoleParams {
|
|
|
5667
5671
|
export interface ModifyGuildRolePositionParams {
|
|
5668
5672
|
/** role */
|
|
5669
5673
|
readonly id: Snowflake
|
|
5670
|
-
/** sorting position of the role */
|
|
5674
|
+
/** sorting position of the role (roles with the same position are sorted by id) */
|
|
5671
5675
|
readonly position?: number | null
|
|
5672
5676
|
}
|
|
5673
5677
|
export interface ModifyGuildScheduledEventParams {
|
|
@@ -5963,10 +5967,10 @@ export interface PollCreateRequest {
|
|
|
5963
5967
|
readonly question: PollMedia
|
|
5964
5968
|
/** Each of the answers available in the poll, up to 10 */
|
|
5965
5969
|
readonly answers: Array<PollAnswer>
|
|
5966
|
-
/** Number of hours the poll should be open for, up to
|
|
5967
|
-
readonly duration
|
|
5968
|
-
/** Whether a user can select multiple answers */
|
|
5969
|
-
readonly allow_multiselect
|
|
5970
|
+
/** Number of hours the poll should be open for, up to 32 days. Defaults to 24 */
|
|
5971
|
+
readonly duration?: number
|
|
5972
|
+
/** Whether a user can select multiple answers. Defaults to false */
|
|
5973
|
+
readonly allow_multiselect?: boolean
|
|
5970
5974
|
/** The layout type of the poll. Defaults to... DEFAULT! */
|
|
5971
5975
|
readonly layout_type?: LayoutType
|
|
5972
5976
|
}
|
|
@@ -6290,7 +6294,7 @@ export interface Role {
|
|
|
6290
6294
|
readonly icon?: string | null
|
|
6291
6295
|
/** role unicode emoji */
|
|
6292
6296
|
readonly unicode_emoji?: string | null
|
|
6293
|
-
/** position of this role */
|
|
6297
|
+
/** position of this role (roles with the same position are sorted by id) */
|
|
6294
6298
|
readonly position: number
|
|
6295
6299
|
/** permission bit set */
|
|
6296
6300
|
readonly permissions: string
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.
|
|
1
|
+
export const LIB_VERSION = "0.98.1";
|
package/types.d.ts
CHANGED
|
@@ -233,9 +233,9 @@ export interface ApplicationCommand {
|
|
|
233
233
|
readonly default_permission?: boolean | null;
|
|
234
234
|
/** Indicates whether the command is age-restricted, defaults to false */
|
|
235
235
|
readonly nsfw?: boolean;
|
|
236
|
-
/**
|
|
236
|
+
/** Installation contexts where the command is available, only for globally-scoped commands. Defaults to your app's configured contexts */
|
|
237
237
|
readonly integration_types?: Array<ApplicationIntegrationType>;
|
|
238
|
-
/**
|
|
238
|
+
/** Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. */
|
|
239
239
|
readonly contexts?: Array<InteractionContextType> | null;
|
|
240
240
|
/** Autoincrementing version identifier updated during substantial record changes */
|
|
241
241
|
readonly version: Snowflake;
|
|
@@ -414,6 +414,8 @@ export interface Attachment {
|
|
|
414
414
|
readonly id: Snowflake;
|
|
415
415
|
/** name of file attached */
|
|
416
416
|
readonly filename: string;
|
|
417
|
+
/** the title of the file */
|
|
418
|
+
readonly title?: string;
|
|
417
419
|
/** description for the file (max 1024 characters) */
|
|
418
420
|
readonly description?: string;
|
|
419
421
|
/** the attachment's media type */
|
|
@@ -757,9 +759,9 @@ export interface BulkOverwriteGuildApplicationCommandParams {
|
|
|
757
759
|
readonly dm_permission?: boolean | null;
|
|
758
760
|
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true */
|
|
759
761
|
readonly default_permission?: boolean;
|
|
760
|
-
/**
|
|
762
|
+
/** Installation context(s) where the command is available, defaults to GUILD_INSTALL ([0]) */
|
|
761
763
|
readonly integration_types: Array<ApplicationIntegrationType>;
|
|
762
|
-
/**
|
|
764
|
+
/** Interaction context(s) where the command can be used, defaults to all contexts [0,1,2] */
|
|
763
765
|
readonly contexts: Array<InteractionContextType>;
|
|
764
766
|
/** Type of command, defaults 1 if not set */
|
|
765
767
|
readonly type?: ApplicationCommandType;
|
|
@@ -777,6 +779,8 @@ export interface Button {
|
|
|
777
779
|
readonly emoji?: Emoji;
|
|
778
780
|
/** Developer-defined identifier for the button; max 100 characters */
|
|
779
781
|
readonly custom_id?: string;
|
|
782
|
+
/** Identifier for a purchasable SKU, only available when using premium-style buttons */
|
|
783
|
+
readonly sku_id?: Snowflake;
|
|
780
784
|
/** URL for link-style buttons */
|
|
781
785
|
readonly url?: string;
|
|
782
786
|
/** Whether the button is disabled (defaults to false) */
|
|
@@ -787,7 +791,8 @@ export declare enum ButtonStyle {
|
|
|
787
791
|
SECONDARY = 2,
|
|
788
792
|
SUCCESS = 3,
|
|
789
793
|
DANGER = 4,
|
|
790
|
-
LINK = 5
|
|
794
|
+
LINK = 5,
|
|
795
|
+
PREMIUM = 6
|
|
791
796
|
}
|
|
792
797
|
export interface Channel {
|
|
793
798
|
/** the id of this channel */
|
|
@@ -796,7 +801,7 @@ export interface Channel {
|
|
|
796
801
|
readonly type: ChannelType;
|
|
797
802
|
/** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
|
|
798
803
|
readonly guild_id?: Snowflake;
|
|
799
|
-
/** sorting position of the channel */
|
|
804
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
800
805
|
readonly position?: number;
|
|
801
806
|
/** explicit permission overwrites for members and roles */
|
|
802
807
|
readonly permission_overwrites?: Array<Overwrite>;
|
|
@@ -1076,7 +1081,7 @@ export interface CreateGuildChannelParams {
|
|
|
1076
1081
|
readonly user_limit: number;
|
|
1077
1082
|
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
1078
1083
|
readonly rate_limit_per_user: number;
|
|
1079
|
-
/** sorting position of the channel */
|
|
1084
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
1080
1085
|
readonly position: number;
|
|
1081
1086
|
/** the channel's permission overwrites */
|
|
1082
1087
|
readonly permission_overwrites: Array<Overwrite>;
|
|
@@ -1309,9 +1314,9 @@ export interface EditGlobalApplicationCommandParams {
|
|
|
1309
1314
|
readonly dm_permission?: boolean | null;
|
|
1310
1315
|
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true */
|
|
1311
1316
|
readonly default_permission?: boolean;
|
|
1312
|
-
/**
|
|
1317
|
+
/** Installation context(s) where the command is available */
|
|
1313
1318
|
readonly integration_types?: Array<ApplicationIntegrationType>;
|
|
1314
|
-
/**
|
|
1319
|
+
/** Interaction context(s) where the command can be used */
|
|
1315
1320
|
readonly contexts?: Array<InteractionContextType>;
|
|
1316
1321
|
/** Indicates whether the command is age-restricted */
|
|
1317
1322
|
readonly nsfw?: boolean;
|
|
@@ -1516,7 +1521,6 @@ export interface Endpoints<O> {
|
|
|
1516
1521
|
createChannelInvite: (channelId: string, params?: Partial<CreateChannelInviteParams>, options?: O) => RestResponse<Invite>;
|
|
1517
1522
|
/** Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead). */
|
|
1518
1523
|
createDm: (params?: Partial<CreateDmParams>, options?: O) => RestResponse<Channel>;
|
|
1519
|
-
/** 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. */
|
|
1520
1524
|
createFollowupMessage: (applicationId: string, interactionToken: string, params?: Partial<ExecuteWebhookParams>, options?: O) => RestResponse<any>;
|
|
1521
1525
|
createGlobalApplicationCommand: (applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: O) => RestResponse<ApplicationCommand>;
|
|
1522
1526
|
/** 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. */
|
|
@@ -2881,7 +2885,7 @@ export declare enum InteractionCallbackType {
|
|
|
2881
2885
|
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
2882
2886
|
/** respond to an interaction with a popup modal */
|
|
2883
2887
|
MODAL = 9,
|
|
2884
|
-
/** respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
2888
|
+
/** Deprecated; respond to an interaction with an upgrade button, only available for apps with monetization enabled */
|
|
2885
2889
|
PREMIUM_REQUIRED = 10
|
|
2886
2890
|
}
|
|
2887
2891
|
export declare enum InteractionContextType {
|
|
@@ -3490,7 +3494,7 @@ export interface ModifyChannelGuildChannelParams {
|
|
|
3490
3494
|
readonly name: string;
|
|
3491
3495
|
/** the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature */
|
|
3492
3496
|
readonly type: ChannelType;
|
|
3493
|
-
/** the position of the channel in the left-hand listing */
|
|
3497
|
+
/** the position of the channel in the left-hand listing (channels with the same position are sorted by id) */
|
|
3494
3498
|
readonly position?: number | null;
|
|
3495
3499
|
/** 0-1024 character channel topic (0-4096 characters for GUILD_FORUM and GUILD_MEDIA channels) */
|
|
3496
3500
|
readonly topic?: string | null;
|
|
@@ -3571,7 +3575,7 @@ export interface ModifyCurrentUserVoiceStateParams {
|
|
|
3571
3575
|
export interface ModifyGuildChannelPositionParams {
|
|
3572
3576
|
/** channel id */
|
|
3573
3577
|
readonly id: Snowflake;
|
|
3574
|
-
/** sorting position of the channel */
|
|
3578
|
+
/** sorting position of the channel (channels with the same position are sorted by id) */
|
|
3575
3579
|
readonly position?: number | null;
|
|
3576
3580
|
/** syncs the permission overwrites with the new parent, if moving to a new category */
|
|
3577
3581
|
readonly lock_permissions?: boolean | null;
|
|
@@ -3677,7 +3681,7 @@ export interface ModifyGuildRoleParams {
|
|
|
3677
3681
|
export interface ModifyGuildRolePositionParams {
|
|
3678
3682
|
/** role */
|
|
3679
3683
|
readonly id: Snowflake;
|
|
3680
|
-
/** sorting position of the role */
|
|
3684
|
+
/** sorting position of the role (roles with the same position are sorted by id) */
|
|
3681
3685
|
readonly position?: number | null;
|
|
3682
3686
|
}
|
|
3683
3687
|
export interface ModifyGuildScheduledEventParams {
|
|
@@ -3973,10 +3977,10 @@ export interface PollCreateRequest {
|
|
|
3973
3977
|
readonly question: PollMedia;
|
|
3974
3978
|
/** Each of the answers available in the poll, up to 10 */
|
|
3975
3979
|
readonly answers: Array<PollAnswer>;
|
|
3976
|
-
/** Number of hours the poll should be open for, up to
|
|
3977
|
-
readonly duration
|
|
3978
|
-
/** Whether a user can select multiple answers */
|
|
3979
|
-
readonly allow_multiselect
|
|
3980
|
+
/** Number of hours the poll should be open for, up to 32 days. Defaults to 24 */
|
|
3981
|
+
readonly duration?: number;
|
|
3982
|
+
/** Whether a user can select multiple answers. Defaults to false */
|
|
3983
|
+
readonly allow_multiselect?: boolean;
|
|
3980
3984
|
/** The layout type of the poll. Defaults to... DEFAULT! */
|
|
3981
3985
|
readonly layout_type?: LayoutType;
|
|
3982
3986
|
}
|
|
@@ -4231,7 +4235,7 @@ export interface Role {
|
|
|
4231
4235
|
readonly icon?: string | null;
|
|
4232
4236
|
/** role unicode emoji */
|
|
4233
4237
|
readonly unicode_emoji?: string | null;
|
|
4234
|
-
/** position of this role */
|
|
4238
|
+
/** position of this role (roles with the same position are sorted by id) */
|
|
4235
4239
|
readonly position: number;
|
|
4236
4240
|
/** permission bit set */
|
|
4237
4241
|
readonly permissions: string;
|