dfx 0.101.0 → 0.102.0

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.
Files changed (51) hide show
  1. package/DiscordGateway/DiscordWS.d.ts +2 -1
  2. package/DiscordGateway/DiscordWS.d.ts.map +1 -1
  3. package/DiscordGateway/DiscordWS.js +11 -6
  4. package/DiscordGateway/DiscordWS.js.map +1 -1
  5. package/DiscordGateway/Messaging.d.ts +3 -3
  6. package/DiscordGateway/Messaging.d.ts.map +1 -1
  7. package/DiscordGateway/Messaging.js +4 -4
  8. package/DiscordGateway/Messaging.js.map +1 -1
  9. package/DiscordGateway/Shard/heartbeats.d.ts +2 -2
  10. package/DiscordGateway/Shard/heartbeats.d.ts.map +1 -1
  11. package/DiscordGateway/Shard/heartbeats.js +2 -3
  12. package/DiscordGateway/Shard/heartbeats.js.map +1 -1
  13. package/DiscordGateway/Shard.d.ts +2 -2
  14. package/DiscordGateway/Shard.d.ts.map +1 -1
  15. package/DiscordGateway/Shard.js +15 -15
  16. package/DiscordGateway/Shard.js.map +1 -1
  17. package/DiscordGateway/Sharder.d.ts +1 -1
  18. package/DiscordGateway.d.ts +1 -1
  19. package/DiscordREST.d.ts +1 -1
  20. package/DiscordREST.js +3 -3
  21. package/DiscordREST.js.map +1 -1
  22. package/gateway.d.ts +2 -2
  23. package/index.d.ts +1 -1
  24. package/mjs/DiscordGateway/DiscordWS.mjs +11 -6
  25. package/mjs/DiscordGateway/DiscordWS.mjs.map +1 -1
  26. package/mjs/DiscordGateway/Messaging.mjs +4 -4
  27. package/mjs/DiscordGateway/Messaging.mjs.map +1 -1
  28. package/mjs/DiscordGateway/Shard/heartbeats.mjs +2 -3
  29. package/mjs/DiscordGateway/Shard/heartbeats.mjs.map +1 -1
  30. package/mjs/DiscordGateway/Shard.mjs +15 -15
  31. package/mjs/DiscordGateway/Shard.mjs.map +1 -1
  32. package/mjs/DiscordREST.mjs +3 -3
  33. package/mjs/DiscordREST.mjs.map +1 -1
  34. package/mjs/types.mjs +30 -1
  35. package/mjs/types.mjs.map +1 -1
  36. package/mjs/version.mjs +1 -1
  37. package/package.json +4 -4
  38. package/src/DiscordGateway/DiscordWS.ts +14 -10
  39. package/src/DiscordGateway/Messaging.ts +6 -6
  40. package/src/DiscordGateway/Shard/heartbeats.ts +5 -5
  41. package/src/DiscordGateway/Shard.ts +26 -23
  42. package/src/DiscordREST.ts +3 -3
  43. package/src/types.ts +76 -8
  44. package/src/version.ts +1 -1
  45. package/types.d.ts +55 -9
  46. package/types.d.ts.map +1 -1
  47. package/types.js +31 -2
  48. package/types.js.map +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/webhooks.d.ts +1 -1
@@ -147,7 +147,7 @@ const make = Effect.gen(function* () {
147
147
  Effect.ignore,
148
148
  )
149
149
 
150
- const httpExecutor = pipe(
150
+ const httpClient = pipe(
151
151
  HttpClient.filterStatusOk(http),
152
152
  HttpClient.mapRequest(req =>
153
153
  pipe(
@@ -176,7 +176,7 @@ const make = Effect.gen(function* () {
176
176
  requestRateLimit(request.url, request).pipe(
177
177
  Effect.zipLeft(globalRateLimit),
178
178
  Effect.zipRight(
179
- httpExecutor(request) as Effect.Effect<
179
+ httpClient.execute(request) as Effect.Effect<
180
180
  ResponseWithData<A>,
181
181
  DiscordRESTError,
182
182
  Scope
@@ -257,7 +257,7 @@ const make = Effect.gen(function* () {
257
257
  } else if (params && request.body._tag === "FormData") {
258
258
  request.body.formData.append("payload_json", JSON.stringify(params))
259
259
  } else if (params) {
260
- request = HttpRequest.unsafeJsonBody(request, params)
260
+ request = HttpRequest.bodyUnsafeJson(request, params)
261
261
  }
262
262
 
263
263
  return new RestResponseImpl(executor(request))
package/src/types.ts CHANGED
@@ -206,8 +206,6 @@ export interface Application {
206
206
  readonly privacy_policy_url?: string
207
207
  /** Partial user object for the owner of the app */
208
208
  readonly owner?: User
209
- /** deprecated and will be removed in v11. An empty string. */
210
- readonly summary: string
211
209
  /** Hex encoded key for verification in interactions and the GameSDK's GetTicket */
212
210
  readonly verify_key: string
213
211
  /** If the app belongs to a team, this will be a list of the members of that team */
@@ -231,9 +229,9 @@ export interface Application {
231
229
  /** Array of redirect URIs for the app */
232
230
  readonly redirect_uris?: Array<string>
233
231
  /** Interactions endpoint URL for the app */
234
- readonly interactions_endpoint_url?: string
232
+ readonly interactions_endpoint_url?: string | null
235
233
  /** Role connection verification URL for the app */
236
- readonly role_connections_verification_url?: string
234
+ readonly role_connections_verification_url?: string | null
237
235
  /** List of tags describing the content and functionality of the app. Max of 5 tags. */
238
236
  readonly tags?: Array<string>
239
237
  /** Settings for the app's default in-app authorization link, if enabled */
@@ -2202,6 +2200,12 @@ export function createRoutes<O = any>(
2202
2200
  params,
2203
2201
  options,
2204
2202
  }),
2203
+ getSkuSubscription: (skuId, subscriptionId, options) =>
2204
+ fetch({
2205
+ method: "GET",
2206
+ url: `/skus/${skuId}/subscriptions/${subscriptionId}`,
2207
+ options,
2208
+ }),
2205
2209
  getStageInstance: (channelId, options) =>
2206
2210
  fetch({
2207
2211
  method: "GET",
@@ -2366,6 +2370,12 @@ export function createRoutes<O = any>(
2366
2370
  url: `/applications/${applicationId}/skus`,
2367
2371
  options,
2368
2372
  }),
2373
+ listSkuSubscriptions: (skuId, options) =>
2374
+ fetch({
2375
+ method: "GET",
2376
+ url: `/skus/${skuId}/subscriptions`,
2377
+ options,
2378
+ }),
2369
2379
  listStickerPacks: options =>
2370
2380
  fetch({
2371
2381
  method: "GET",
@@ -2799,6 +2809,8 @@ export interface EditWebhookMessageParams {
2799
2809
  readonly payload_json: string
2800
2810
  /** attached files to keep and possible descriptions for new files */
2801
2811
  readonly attachments: Array<Attachment>
2812
+ /** A poll! */
2813
+ readonly poll: PollCreateRequest
2802
2814
  }
2803
2815
  export interface Embed {
2804
2816
  /** title of embed */
@@ -3085,7 +3097,7 @@ export interface Endpoints<O> {
3085
3097
  params?: Partial<CreateGuildTemplateParams>,
3086
3098
  options?: O,
3087
3099
  ) => RestResponse<GuildTemplate>
3088
- /** Create a response to an Interaction. Body is an interaction response. Returns 204 unless with_response is set to true which returns 200 with the body as interaction response. */
3100
+ /** Create a response to an Interaction. Body is an interaction response. Returns 204 unless with_response is set to true which returns 200 with the body as interaction callback response. */
3089
3101
  createInteractionResponse: (
3090
3102
  interactionId: string,
3091
3103
  interactionToken: string,
@@ -3660,6 +3672,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3660
3672
  params?: Partial<GetReactionParams>,
3661
3673
  options?: O,
3662
3674
  ) => RestResponse<Array<User>>
3675
+ /** Get a subscription by its ID. Returns a subscription object. */
3676
+ getSkuSubscription: (
3677
+ skuId: string,
3678
+ subscriptionId: string,
3679
+ options?: O,
3680
+ ) => RestResponse<Subscription>
3663
3681
  /** Gets the stage instance associated with the Stage channel, if it exists. */
3664
3682
  getStageInstance: (channelId: string, options?: O) => RestResponse<any>
3665
3683
  /** Returns a sticker object for the given sticker ID. */
@@ -3772,6 +3790,11 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3772
3790
  ) => RestResponse<Array<GuildScheduledEvent>>
3773
3791
  /** Returns all SKUs for a given application. */
3774
3792
  listSkUs: (applicationId: string, options?: O) => RestResponse<any>
3793
+ /** Returns all subscriptions containing the SKU, filtered by user. Returns a list of subscription objects. */
3794
+ listSkuSubscriptions: (
3795
+ skuId: string,
3796
+ options?: O,
3797
+ ) => RestResponse<Array<Subscription>>
3775
3798
  /** Returns a list of available sticker packs. */
3776
3799
  listStickerPacks: (options?: O) => RestResponse<any>
3777
3800
  listThreadMembers: (
@@ -4087,7 +4110,7 @@ export interface ExecuteWebhookParams {
4087
4110
  readonly payload_json: string
4088
4111
  /** attachment objects with filename and description */
4089
4112
  readonly attachments: Array<Attachment>
4090
- /** message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set can be set) */
4113
+ /** message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set) */
4091
4114
  readonly flags: number
4092
4115
  /** name of thread to create (requires the webhook channel to be a forum or media channel) */
4093
4116
  readonly thread_name: string
@@ -4598,6 +4621,16 @@ export const GuildMemberFlag = {
4598
4621
  BYPASSES_VERIFICATION: 1 << 2,
4599
4622
  /** Member has started onboarding */
4600
4623
  STARTED_ONBOARDING: 1 << 3,
4624
+ /** Member is a guest and can only access the voice channel they were invited to */
4625
+ IS_GUEST: 1 << 4,
4626
+ /** Member has started Server Guide new member actions */
4627
+ STARTED_HOME_ACTIONS: 1 << 5,
4628
+ /** Member has completed Server Guide new member actions */
4629
+ COMPLETED_HOME_ACTIONS: 1 << 6,
4630
+ /** Member's username, display name, or nickname is blocked by AutoMod */
4631
+ AUTOMOD_QUARANTINED_USERNAME: 1 << 7,
4632
+ /** Member has dismissed the DM settings upsell */
4633
+ DM_SETTINGS_UPSELL_ACKNOWLEDGED: 1 << 9,
4601
4634
  } as const
4602
4635
  export interface GuildMemberRemoveEvent {
4603
4636
  /** ID of the guild */
@@ -6432,6 +6465,9 @@ export type ReceiveEvent =
6432
6465
  | StageInstanceCreateEvent
6433
6466
  | StageInstanceUpdateEvent
6434
6467
  | StageInstanceDeleteEvent
6468
+ | SubscriptionCreateEvent
6469
+ | SubscriptionUpdateEvent
6470
+ | SubscriptionDeleteEvent
6435
6471
  | TypingStartEvent
6436
6472
  | UserUpdateEvent
6437
6473
  | VoiceChannelEffectSendEvent
@@ -6503,6 +6539,9 @@ export interface ReceiveEvents {
6503
6539
  STAGE_INSTANCE_CREATE: StageInstanceCreateEvent
6504
6540
  STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent
6505
6541
  STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent
6542
+ SUBSCRIPTION_CREATE: SubscriptionCreateEvent
6543
+ SUBSCRIPTION_UPDATE: SubscriptionUpdateEvent
6544
+ SUBSCRIPTION_DELETE: SubscriptionDeleteEvent
6506
6545
  TYPING_START: TypingStartEvent
6507
6546
  USER_UPDATE: UserUpdateEvent
6508
6547
  VOICE_CHANNEL_EFFECT_SEND: VoiceChannelEffectSendEvent
@@ -6814,8 +6853,6 @@ export interface Sticker {
6814
6853
  readonly description?: string | null
6815
6854
  /** autocomplete/suggestion tags for the sticker (max 200 characters) */
6816
6855
  readonly tags: string
6817
- /** Deprecated previously the sticker asset hash, now an empty string */
6818
- readonly asset?: string
6819
6856
  /** type of sticker */
6820
6857
  readonly type: StickerType
6821
6858
  /** type of sticker format */
@@ -6865,6 +6902,37 @@ export enum StickerType {
6865
6902
  /** a sticker uploaded to a guild for the guild's members */
6866
6903
  GUILD = 2,
6867
6904
  }
6905
+ export interface Subscription {
6906
+ /** ID of the subscription */
6907
+ readonly id: Snowflake
6908
+ /** ID of the user who is subscribed */
6909
+ readonly user_id: Snowflake
6910
+ /** List of SKUs subscribed to */
6911
+ readonly sku_ids: Array<Snowflake>
6912
+ /** List of entitlements granted for this subscription */
6913
+ readonly entitlement_ids: Array<Snowflake>
6914
+ /** Start of the current subscription period */
6915
+ readonly current_period_start: string
6916
+ /** End of the current subscription period */
6917
+ readonly current_period_end: string
6918
+ /** Current status of the subscription */
6919
+ readonly status: SubscriptionStatus
6920
+ /** When the subscription was canceled */
6921
+ readonly canceled_at: string
6922
+ /** ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */
6923
+ readonly country?: string
6924
+ }
6925
+ export type SubscriptionCreateEvent = Subscription
6926
+ export type SubscriptionDeleteEvent = Subscription
6927
+ export enum SubscriptionStatus {
6928
+ /** Subscription is active and scheduled to renew. */
6929
+ ACTIVE = 0,
6930
+ /** Subscription is active but will not renew. */
6931
+ ENDING = 1,
6932
+ /** Subscription is inactive and not being charged. */
6933
+ INACTIVE = 2,
6934
+ }
6935
+ export type SubscriptionUpdateEvent = Subscription
6868
6936
  export const SystemChannelFlag = {
6869
6937
  /** Suppress member join notifications */
6870
6938
  SUPPRESS_JOIN_NOTIFICATIONS: 1 << 0,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.101.0";
1
+ export const LIB_VERSION = "0.102.0";
package/types.d.ts CHANGED
@@ -205,8 +205,6 @@ export interface Application {
205
205
  readonly privacy_policy_url?: string;
206
206
  /** Partial user object for the owner of the app */
207
207
  readonly owner?: User;
208
- /** deprecated and will be removed in v11. An empty string. */
209
- readonly summary: string;
210
208
  /** Hex encoded key for verification in interactions and the GameSDK's GetTicket */
211
209
  readonly verify_key: string;
212
210
  /** If the app belongs to a team, this will be a list of the members of that team */
@@ -230,9 +228,9 @@ export interface Application {
230
228
  /** Array of redirect URIs for the app */
231
229
  readonly redirect_uris?: Array<string>;
232
230
  /** Interactions endpoint URL for the app */
233
- readonly interactions_endpoint_url?: string;
231
+ readonly interactions_endpoint_url?: string | null;
234
232
  /** Role connection verification URL for the app */
235
- readonly role_connections_verification_url?: string;
233
+ readonly role_connections_verification_url?: string | null;
236
234
  /** List of tags describing the content and functionality of the app. Max of 5 tags. */
237
235
  readonly tags?: Array<string>;
238
236
  /** Settings for the app's default in-app authorization link, if enabled */
@@ -1420,6 +1418,8 @@ export interface EditWebhookMessageParams {
1420
1418
  readonly payload_json: string;
1421
1419
  /** attached files to keep and possible descriptions for new files */
1422
1420
  readonly attachments: Array<Attachment>;
1421
+ /** A poll! */
1422
+ readonly poll: PollCreateRequest;
1423
1423
  }
1424
1424
  export interface Embed {
1425
1425
  /** title of embed */
@@ -1596,7 +1596,7 @@ export interface Endpoints<O> {
1596
1596
  createGuildSticker: (guildId: string, params?: Partial<CreateGuildStickerParams>, options?: O) => RestResponse<Sticker>;
1597
1597
  /** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
1598
1598
  createGuildTemplate: (guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: O) => RestResponse<GuildTemplate>;
1599
- /** Create a response to an Interaction. Body is an interaction response. Returns 204 unless with_response is set to true which returns 200 with the body as interaction response. */
1599
+ /** Create a response to an Interaction. Body is an interaction response. Returns 204 unless with_response is set to true which returns 200 with the body as interaction callback response. */
1600
1600
  createInteractionResponse: (interactionId: string, interactionToken: string, params?: Partial<InteractionResponse>, options?: O) => RestResponse<InteractionResponse>;
1601
1601
  createMessage: (channelId: string, params?: Partial<CreateMessageParams>, options?: O) => RestResponse<Message>;
1602
1602
  /** Create a reaction for the message. This endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Add Gateway event.
@@ -1804,6 +1804,8 @@ export interface Endpoints<O> {
1804
1804
  /** Get a list of users that reacted with this emoji. Returns an array of user objects on success.
1805
1805
  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. */
1806
1806
  getReactions: (channelId: string, messageId: string, emoji: string, params?: Partial<GetReactionParams>, options?: O) => RestResponse<Array<User>>;
1807
+ /** Get a subscription by its ID. Returns a subscription object. */
1808
+ getSkuSubscription: (skuId: string, subscriptionId: string, options?: O) => RestResponse<Subscription>;
1807
1809
  /** Gets the stage instance associated with the Stage channel, if it exists. */
1808
1810
  getStageInstance: (channelId: string, options?: O) => RestResponse<any>;
1809
1811
  /** Returns a sticker object for the given sticker ID. */
@@ -1856,6 +1858,8 @@ export interface Endpoints<O> {
1856
1858
  listScheduledEventsForGuild: (guildId: string, params?: Partial<ListScheduledEventsForGuildParams>, options?: O) => RestResponse<Array<GuildScheduledEvent>>;
1857
1859
  /** Returns all SKUs for a given application. */
1858
1860
  listSkUs: (applicationId: string, options?: O) => RestResponse<any>;
1861
+ /** Returns all subscriptions containing the SKU, filtered by user. Returns a list of subscription objects. */
1862
+ listSkuSubscriptions: (skuId: string, options?: O) => RestResponse<Array<Subscription>>;
1859
1863
  /** Returns a list of available sticker packs. */
1860
1864
  listStickerPacks: (options?: O) => RestResponse<any>;
1861
1865
  listThreadMembers: (channelId: string, params?: Partial<ListThreadMemberParams>, options?: O) => RestResponse<Array<ThreadMember>>;
@@ -2011,7 +2015,7 @@ export interface ExecuteWebhookParams {
2011
2015
  readonly payload_json: string;
2012
2016
  /** attachment objects with filename and description */
2013
2017
  readonly attachments: Array<Attachment>;
2014
- /** message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set can be set) */
2018
+ /** message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set) */
2015
2019
  readonly flags: number;
2016
2020
  /** name of thread to create (requires the webhook channel to be a forum or media channel) */
2017
2021
  readonly thread_name: string;
@@ -2522,6 +2526,16 @@ export declare const GuildMemberFlag: {
2522
2526
  readonly BYPASSES_VERIFICATION: number;
2523
2527
  /** Member has started onboarding */
2524
2528
  readonly STARTED_ONBOARDING: number;
2529
+ /** Member is a guest and can only access the voice channel they were invited to */
2530
+ readonly IS_GUEST: number;
2531
+ /** Member has started Server Guide new member actions */
2532
+ readonly STARTED_HOME_ACTIONS: number;
2533
+ /** Member has completed Server Guide new member actions */
2534
+ readonly COMPLETED_HOME_ACTIONS: number;
2535
+ /** Member's username, display name, or nickname is blocked by AutoMod */
2536
+ readonly AUTOMOD_QUARANTINED_USERNAME: number;
2537
+ /** Member has dismissed the DM settings upsell */
2538
+ readonly DM_SETTINGS_UPSELL_ACKNOWLEDGED: number;
2525
2539
  };
2526
2540
  export interface GuildMemberRemoveEvent {
2527
2541
  /** ID of the guild */
@@ -4282,7 +4296,7 @@ export interface ReadyEvent {
4282
4296
  /** Contains id and flags */
4283
4297
  readonly application: Application;
4284
4298
  }
4285
- export type ReceiveEvent = HelloEvent | ReadyEvent | ResumedEvent | ReconnectEvent | InvalidSessionEvent | ApplicationCommandPermissionsUpdateEvent | AutoModerationRuleCreateEvent | AutoModerationRuleUpdateEvent | AutoModerationRuleDeleteEvent | AutoModerationActionExecutionEvent | ChannelCreateEvent | ChannelUpdateEvent | ChannelDeleteEvent | ChannelPinsUpdateEvent | ThreadCreateEvent | ThreadUpdateEvent | ThreadDeleteEvent | ThreadListSyncEvent | ThreadMemberUpdateEvent | ThreadMembersUpdateEvent | EntitlementCreateEvent | EntitlementUpdateEvent | EntitlementDeleteEvent | GuildCreateEvent | GuildUpdateEvent | GuildDeleteEvent | GuildAuditLogEntryCreateEvent | GuildBanAddEvent | GuildBanRemoveEvent | GuildEmojisUpdateEvent | GuildStickersUpdateEvent | GuildIntegrationsUpdateEvent | GuildMemberAddEvent | GuildMemberRemoveEvent | GuildMemberUpdateEvent | GuildMembersChunkEvent | GuildRoleCreateEvent | GuildRoleUpdateEvent | GuildRoleDeleteEvent | GuildScheduledEventCreateEvent | GuildScheduledEventUpdateEvent | GuildScheduledEventDeleteEvent | GuildScheduledEventUserAddEvent | GuildScheduledEventUserRemoveEvent | IntegrationCreateEvent | IntegrationUpdateEvent | IntegrationDeleteEvent | InteractionCreateEvent | InviteCreateEvent | InviteDeleteEvent | MessageCreateEvent | MessageUpdateEvent | MessageDeleteEvent | MessageDeleteBulkEvent | MessageReactionAddEvent | MessageReactionRemoveEvent | MessageReactionRemoveAllEvent | MessageReactionRemoveEmojiEvent | PresenceUpdateEvent | StageInstanceCreateEvent | StageInstanceUpdateEvent | StageInstanceDeleteEvent | TypingStartEvent | UserUpdateEvent | VoiceChannelEffectSendEvent | VoiceStateUpdateEvent | VoiceServerUpdateEvent | WebhooksUpdateEvent | MessagePollVoteAddEvent | MessagePollVoteRemoveEvent;
4299
+ export type ReceiveEvent = HelloEvent | ReadyEvent | ResumedEvent | ReconnectEvent | InvalidSessionEvent | ApplicationCommandPermissionsUpdateEvent | AutoModerationRuleCreateEvent | AutoModerationRuleUpdateEvent | AutoModerationRuleDeleteEvent | AutoModerationActionExecutionEvent | ChannelCreateEvent | ChannelUpdateEvent | ChannelDeleteEvent | ChannelPinsUpdateEvent | ThreadCreateEvent | ThreadUpdateEvent | ThreadDeleteEvent | ThreadListSyncEvent | ThreadMemberUpdateEvent | ThreadMembersUpdateEvent | EntitlementCreateEvent | EntitlementUpdateEvent | EntitlementDeleteEvent | GuildCreateEvent | GuildUpdateEvent | GuildDeleteEvent | GuildAuditLogEntryCreateEvent | GuildBanAddEvent | GuildBanRemoveEvent | GuildEmojisUpdateEvent | GuildStickersUpdateEvent | GuildIntegrationsUpdateEvent | GuildMemberAddEvent | GuildMemberRemoveEvent | GuildMemberUpdateEvent | GuildMembersChunkEvent | GuildRoleCreateEvent | GuildRoleUpdateEvent | GuildRoleDeleteEvent | GuildScheduledEventCreateEvent | GuildScheduledEventUpdateEvent | GuildScheduledEventDeleteEvent | GuildScheduledEventUserAddEvent | GuildScheduledEventUserRemoveEvent | IntegrationCreateEvent | IntegrationUpdateEvent | IntegrationDeleteEvent | InteractionCreateEvent | InviteCreateEvent | InviteDeleteEvent | MessageCreateEvent | MessageUpdateEvent | MessageDeleteEvent | MessageDeleteBulkEvent | MessageReactionAddEvent | MessageReactionRemoveEvent | MessageReactionRemoveAllEvent | MessageReactionRemoveEmojiEvent | PresenceUpdateEvent | StageInstanceCreateEvent | StageInstanceUpdateEvent | StageInstanceDeleteEvent | SubscriptionCreateEvent | SubscriptionUpdateEvent | SubscriptionDeleteEvent | TypingStartEvent | UserUpdateEvent | VoiceChannelEffectSendEvent | VoiceStateUpdateEvent | VoiceServerUpdateEvent | WebhooksUpdateEvent | MessagePollVoteAddEvent | MessagePollVoteRemoveEvent;
4286
4300
  export interface ReceiveEvents {
4287
4301
  HELLO: HelloEvent;
4288
4302
  READY: ReadyEvent;
@@ -4346,6 +4360,9 @@ export interface ReceiveEvents {
4346
4360
  STAGE_INSTANCE_CREATE: StageInstanceCreateEvent;
4347
4361
  STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent;
4348
4362
  STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent;
4363
+ SUBSCRIPTION_CREATE: SubscriptionCreateEvent;
4364
+ SUBSCRIPTION_UPDATE: SubscriptionUpdateEvent;
4365
+ SUBSCRIPTION_DELETE: SubscriptionDeleteEvent;
4349
4366
  TYPING_START: TypingStartEvent;
4350
4367
  USER_UPDATE: UserUpdateEvent;
4351
4368
  VOICE_CHANNEL_EFFECT_SEND: VoiceChannelEffectSendEvent;
@@ -4651,8 +4668,6 @@ export interface Sticker {
4651
4668
  readonly description?: string | null;
4652
4669
  /** autocomplete/suggestion tags for the sticker (max 200 characters) */
4653
4670
  readonly tags: string;
4654
- /** Deprecated previously the sticker asset hash, now an empty string */
4655
- readonly asset?: string;
4656
4671
  /** type of sticker */
4657
4672
  readonly type: StickerType;
4658
4673
  /** type of sticker format */
@@ -4702,6 +4717,37 @@ export declare enum StickerType {
4702
4717
  /** a sticker uploaded to a guild for the guild's members */
4703
4718
  GUILD = 2
4704
4719
  }
4720
+ export interface Subscription {
4721
+ /** ID of the subscription */
4722
+ readonly id: Snowflake;
4723
+ /** ID of the user who is subscribed */
4724
+ readonly user_id: Snowflake;
4725
+ /** List of SKUs subscribed to */
4726
+ readonly sku_ids: Array<Snowflake>;
4727
+ /** List of entitlements granted for this subscription */
4728
+ readonly entitlement_ids: Array<Snowflake>;
4729
+ /** Start of the current subscription period */
4730
+ readonly current_period_start: string;
4731
+ /** End of the current subscription period */
4732
+ readonly current_period_end: string;
4733
+ /** Current status of the subscription */
4734
+ readonly status: SubscriptionStatus;
4735
+ /** When the subscription was canceled */
4736
+ readonly canceled_at: string;
4737
+ /** ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */
4738
+ readonly country?: string;
4739
+ }
4740
+ export type SubscriptionCreateEvent = Subscription;
4741
+ export type SubscriptionDeleteEvent = Subscription;
4742
+ export declare enum SubscriptionStatus {
4743
+ /** Subscription is active and scheduled to renew. */
4744
+ ACTIVE = 0,
4745
+ /** Subscription is active but will not renew. */
4746
+ ENDING = 1,
4747
+ /** Subscription is inactive and not being charged. */
4748
+ INACTIVE = 2
4749
+ }
4750
+ export type SubscriptionUpdateEvent = Subscription;
4705
4751
  export declare const SystemChannelFlag: {
4706
4752
  /** Suppress member join notifications */
4707
4753
  readonly SUPPRESS_JOIN_NOTIFICATIONS: number;