dfx 0.101.1 → 0.103.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 (53) 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.map +1 -1
  14. package/DiscordGateway/Shard.js +15 -15
  15. package/DiscordGateway/Shard.js.map +1 -1
  16. package/DiscordGateway/Sharder.d.ts +1 -1
  17. package/DiscordGateway.d.ts +1 -1
  18. package/DiscordREST.d.ts +1 -1
  19. package/DiscordREST.js +3 -3
  20. package/DiscordREST.js.map +1 -1
  21. package/Helpers/intents.d.ts +2 -2
  22. package/Helpers/intents.d.ts.map +1 -1
  23. package/gateway.d.ts +2 -2
  24. package/index.d.ts +1 -1
  25. package/mjs/DiscordGateway/DiscordWS.mjs +11 -6
  26. package/mjs/DiscordGateway/DiscordWS.mjs.map +1 -1
  27. package/mjs/DiscordGateway/Messaging.mjs +4 -4
  28. package/mjs/DiscordGateway/Messaging.mjs.map +1 -1
  29. package/mjs/DiscordGateway/Shard/heartbeats.mjs +2 -3
  30. package/mjs/DiscordGateway/Shard/heartbeats.mjs.map +1 -1
  31. package/mjs/DiscordGateway/Shard.mjs +15 -15
  32. package/mjs/DiscordGateway/Shard.mjs.map +1 -1
  33. package/mjs/DiscordREST.mjs +3 -3
  34. package/mjs/DiscordREST.mjs.map +1 -1
  35. package/mjs/types.mjs +75 -1
  36. package/mjs/types.mjs.map +1 -1
  37. package/mjs/version.mjs +1 -1
  38. package/package.json +4 -4
  39. package/src/DiscordGateway/DiscordWS.ts +14 -10
  40. package/src/DiscordGateway/Messaging.ts +6 -6
  41. package/src/DiscordGateway/Shard/heartbeats.ts +5 -5
  42. package/src/DiscordGateway/Shard.ts +26 -23
  43. package/src/DiscordREST.ts +3 -3
  44. package/src/types.ts +198 -1
  45. package/src/version.ts +1 -1
  46. package/tsconfig.tsbuildinfo +1 -1
  47. package/types.d.ts +128 -5
  48. package/types.d.ts.map +1 -1
  49. package/types.js +75 -1
  50. package/types.js.map +1 -1
  51. package/version.d.ts +1 -1
  52. package/version.js +1 -1
  53. 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
@@ -648,6 +648,12 @@ export enum AuditLogEvent {
648
648
  THREAD_DELETE = 112,
649
649
  /** Permissions were updated for a command */
650
650
  APPLICATION_COMMAND_PERMISSION_UPDATE = 121,
651
+ /** Soundboard sound was created */
652
+ SOUNDBOARD_SOUND_CREATE = 130,
653
+ /** Soundboard sound was updated */
654
+ SOUNDBOARD_SOUND_UPDATE = 131,
655
+ /** Soundboard sound was deleted */
656
+ SOUNDBOARD_SOUND_DELETE = 132,
651
657
  /** Auto Moderation rule was created */
652
658
  AUTO_MODERATION_RULE_CREATE = 140,
653
659
  /** Auto Moderation rule was updated */
@@ -1230,6 +1236,18 @@ export interface CreateGuildScheduledEventParams {
1230
1236
  /** the definition for how often this event should recur */
1231
1237
  readonly recurrence_rule?: GuildScheduledEventRecurrenceRule
1232
1238
  }
1239
+ export interface CreateGuildSoundboardSoundParams {
1240
+ /** name of the soundboard sound (2-32 characters) */
1241
+ readonly name: string
1242
+ /** the mp3 or ogg sound data, base64 encoded, similar to image data */
1243
+ readonly sound: string
1244
+ /** the volume of the soundboard sound, from 0 to 1, defaults to 1 */
1245
+ readonly volume?: number | null
1246
+ /** the id of the custom emoji for the soundboard sound */
1247
+ readonly emoji_id?: Snowflake | null
1248
+ /** the unicode character of a standard emoji for the soundboard sound */
1249
+ readonly emoji_name?: string | null
1250
+ }
1233
1251
  export interface CreateGuildStickerParams {
1234
1252
  /** name of the sticker (2-30 characters) */
1235
1253
  readonly name: string
@@ -1455,6 +1473,13 @@ export function createRoutes<O = any>(
1455
1473
  params,
1456
1474
  options,
1457
1475
  }),
1476
+ createGuildSoundboardSound: (guildId, params, options) =>
1477
+ fetch({
1478
+ method: "POST",
1479
+ url: `/guilds/${guildId}/soundboard-sounds`,
1480
+ params,
1481
+ options,
1482
+ }),
1458
1483
  createGuildSticker: (guildId, params, options) =>
1459
1484
  fetch({
1460
1485
  method: "POST",
@@ -1614,6 +1639,12 @@ export function createRoutes<O = any>(
1614
1639
  url: `/guilds/${guildId}/scheduled-events/${guildScheduledEventId}`,
1615
1640
  options,
1616
1641
  }),
1642
+ deleteGuildSoundboardSound: (guildId, soundId, options) =>
1643
+ fetch({
1644
+ method: "DELETE",
1645
+ url: `/guilds/${guildId}/soundboard-sounds/${soundId}`,
1646
+ options,
1647
+ }),
1617
1648
  deleteGuildSticker: (guildId, stickerId, options) =>
1618
1649
  fetch({
1619
1650
  method: "DELETE",
@@ -2107,6 +2138,12 @@ export function createRoutes<O = any>(
2107
2138
  params,
2108
2139
  options,
2109
2140
  }),
2141
+ getGuildSoundboardSound: (guildId, soundId, options) =>
2142
+ fetch({
2143
+ method: "GET",
2144
+ url: `/guilds/${guildId}/soundboard-sounds/${soundId}`,
2145
+ options,
2146
+ }),
2110
2147
  getGuildSticker: (guildId, stickerId, options) =>
2111
2148
  fetch({
2112
2149
  method: "GET",
@@ -2311,6 +2348,12 @@ export function createRoutes<O = any>(
2311
2348
  url: `/guilds/${guildId}/auto-moderation/rules`,
2312
2349
  options,
2313
2350
  }),
2351
+ listDefaultSoundboardSounds: options =>
2352
+ fetch({
2353
+ method: "GET",
2354
+ url: `/soundboard-default-sounds`,
2355
+ options,
2356
+ }),
2314
2357
  listEntitlements: (applicationId, options) =>
2315
2358
  fetch({
2316
2359
  method: "GET",
@@ -2330,6 +2373,12 @@ export function createRoutes<O = any>(
2330
2373
  params,
2331
2374
  options,
2332
2375
  }),
2376
+ listGuildSoundboardSounds: (guildId, options) =>
2377
+ fetch({
2378
+ method: "GET",
2379
+ url: `/guilds/${guildId}/soundboard-sounds`,
2380
+ options,
2381
+ }),
2333
2382
  listGuildStickers: (guildId, options) =>
2334
2383
  fetch({
2335
2384
  method: "GET",
@@ -2517,6 +2566,13 @@ export function createRoutes<O = any>(
2517
2566
  params,
2518
2567
  options,
2519
2568
  }),
2569
+ modifyGuildSoundboardSound: (guildId, soundId, params, options) =>
2570
+ fetch({
2571
+ method: "PATCH",
2572
+ url: `/guilds/${guildId}/soundboard-sounds/${soundId}`,
2573
+ params,
2574
+ options,
2575
+ }),
2520
2576
  modifyGuildSticker: (guildId, stickerId, params, options) =>
2521
2577
  fetch({
2522
2578
  method: "PATCH",
@@ -2608,6 +2664,13 @@ export function createRoutes<O = any>(
2608
2664
  params,
2609
2665
  options,
2610
2666
  }),
2667
+ sendSoundboardSound: (channelId, params, options) =>
2668
+ fetch({
2669
+ method: "POST",
2670
+ url: `/channels/${channelId}/send-soundboard-sound`,
2671
+ params,
2672
+ options,
2673
+ }),
2611
2674
  startThreadFromMessage: (channelId, messageId, params, options) =>
2612
2675
  fetch({
2613
2676
  method: "POST",
@@ -3085,6 +3148,12 @@ export interface Endpoints<O> {
3085
3148
  params?: Partial<CreateGuildScheduledEventParams>,
3086
3149
  options?: O,
3087
3150
  ) => RestResponse<GuildScheduledEvent>
3151
+ /** Create a new soundboard sound for the guild. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new soundboard sound object on success. Fires a Guild Soundboard Sound Create Gateway event. */
3152
+ createGuildSoundboardSound: (
3153
+ guildId: string,
3154
+ params?: Partial<CreateGuildSoundboardSoundParams>,
3155
+ options?: O,
3156
+ ) => RestResponse<SoundboardSound>
3088
3157
  /** Create a new sticker for the guild. Send a multipart/form-data body. Requires the CREATE_GUILD_EXPRESSIONS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event. */
3089
3158
  createGuildSticker: (
3090
3159
  guildId: string,
@@ -3219,6 +3288,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3219
3288
  guildScheduledEventId: string,
3220
3289
  options?: O,
3221
3290
  ) => RestResponse<any>
3291
+ /** Delete the given soundboard sound. For sounds created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other sounds, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Soundboard Sound Delete Gateway event. */
3292
+ deleteGuildSoundboardSound: (
3293
+ guildId: string,
3294
+ soundId: string,
3295
+ options?: O,
3296
+ ) => RestResponse<any>
3222
3297
  /** Delete the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event. */
3223
3298
  deleteGuildSticker: (
3224
3299
  guildId: string,
@@ -3599,6 +3674,12 @@ If the user is not in the guild, then the guild must be discoverable. */
3599
3674
  params?: Partial<GetGuildScheduledEventUserParams>,
3600
3675
  options?: O,
3601
3676
  ) => RestResponse<Array<GuildScheduledEventUser>>
3677
+ /** Returns a soundboard sound object for the given sound id. Includes the user field if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
3678
+ getGuildSoundboardSound: (
3679
+ guildId: string,
3680
+ soundId: string,
3681
+ options?: O,
3682
+ ) => RestResponse<SoundboardSound>
3602
3683
  /** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
3603
3684
  getGuildSticker: (
3604
3685
  guildId: string,
@@ -3749,6 +3830,10 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3749
3830
  guildId: string,
3750
3831
  options?: O,
3751
3832
  ) => RestResponse<Array<AutoModerationRule>>
3833
+ /** Returns an array of soundboard sound objects that can be used by all users. */
3834
+ listDefaultSoundboardSounds: (
3835
+ options?: O,
3836
+ ) => RestResponse<Array<SoundboardSound>>
3752
3837
  /** Returns all entitlements for a given app, active and expired. */
3753
3838
  listEntitlements: (applicationId: string, options?: O) => RestResponse<any>
3754
3839
  /** Returns a list of emoji objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
@@ -3759,6 +3844,8 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3759
3844
  params?: Partial<ListGuildMemberParams>,
3760
3845
  options?: O,
3761
3846
  ) => RestResponse<Array<GuildMember>>
3847
+ /** Returns a list of the guild's soundboard sounds. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
3848
+ listGuildSoundboardSounds: (guildId: string, options?: O) => RestResponse<any>
3762
3849
  /** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. */
3763
3850
  listGuildStickers: (
3764
3851
  guildId: string,
@@ -3904,6 +3991,13 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3904
3991
  params?: Partial<ModifyGuildScheduledEventParams>,
3905
3992
  options?: O,
3906
3993
  ) => RestResponse<GuildScheduledEvent>
3994
+ /** Modify the given soundboard sound. For sounds created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other sounds, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated soundboard sound object on success. Fires a Guild Soundboard Sound Update Gateway event. */
3995
+ modifyGuildSoundboardSound: (
3996
+ guildId: string,
3997
+ soundId: string,
3998
+ params?: Partial<ModifyGuildSoundboardSoundParams>,
3999
+ options?: O,
4000
+ ) => RestResponse<SoundboardSound>
3907
4001
  /** Modify the given sticker. For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS or MANAGE_GUILD_EXPRESSIONS permission. For other stickers, requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event. */
3908
4002
  modifyGuildSticker: (
3909
4003
  guildId: string,
@@ -3991,6 +4085,12 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
3991
4085
  params?: Partial<SearchGuildMemberParams>,
3992
4086
  options?: O,
3993
4087
  ) => RestResponse<Array<GuildMember>>
4088
+ /** Send a soundboard sound to a voice channel the user is connected to. Fires a Voice Channel Effect Send Gateway event. */
4089
+ sendSoundboardSound: (
4090
+ channelId: string,
4091
+ params?: Partial<SendSoundboardSoundParams>,
4092
+ options?: O,
4093
+ ) => RestResponse<any>
3994
4094
  /** Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and a Message Update Gateway event. */
3995
4095
  startThreadFromMessage: (
3996
4096
  channelId: string,
@@ -4177,7 +4277,7 @@ export const GatewayIntents = {
4177
4277
  GUILDS: 1 << 0,
4178
4278
  GUILD_MEMBERS: 1 << 1,
4179
4279
  GUILD_MODERATION: 1 << 2,
4180
- GUILD_EMOJIS_AND_STICKERS: 1 << 3,
4280
+ GUILD_EXPRESSIONS: 1 << 3,
4181
4281
  GUILD_INTEGRATIONS: 1 << 4,
4182
4282
  GUILD_WEBHOOKS: 1 << 5,
4183
4283
  GUILD_INVITES: 1 << 6,
@@ -4219,6 +4319,8 @@ export enum GatewayOpcode {
4219
4319
  HELLO = 10,
4220
4320
  /** Sent in response to receiving a heartbeat to acknowledge that it has been received. */
4221
4321
  HEARTBEAT_ACK = 11,
4322
+ /** Request information about soundboard sounds in a set of guilds. */
4323
+ REQUEST_SOUNDBOARD_SOUNDS = 31,
4222
4324
  }
4223
4325
  export interface GatewayPayload<T = any | null> {
4224
4326
  /** opcode for the payload */
@@ -4511,6 +4613,8 @@ export interface GuildCreateExtra {
4511
4613
  readonly stage_instances: Array<StageInstance>
4512
4614
  /** Scheduled events in the guild */
4513
4615
  readonly guild_scheduled_events: Array<GuildScheduledEvent>
4616
+ /** Soundboard sounds in the guild */
4617
+ readonly soundboard_sounds: Array<SoundboardSound>
4514
4618
  }
4515
4619
  export type GuildDeleteEvent = UnavailableGuild
4516
4620
  export interface GuildEmojisUpdateEvent {
@@ -4548,6 +4652,8 @@ export enum GuildFeature {
4548
4652
  INVITE_SPLASH = "INVITE_SPLASH",
4549
4653
  /** guild has enabled Membership Screening */
4550
4654
  MEMBER_VERIFICATION_GATE_ENABLED = "MEMBER_VERIFICATION_GATE_ENABLED",
4655
+ /** guild has increased custom soundboard sound slots */
4656
+ MORE_SOUNDBOARD = "MORE_SOUNDBOARD",
4551
4657
  /** guild has increased custom sticker slots */
4552
4658
  MORE_STICKERS = "MORE_STICKERS",
4553
4659
  /** guild has access to create announcement channels */
@@ -4564,6 +4670,8 @@ export enum GuildFeature {
4564
4670
  ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
4565
4671
  /** guild has enabled role subscriptions */
4566
4672
  ROLE_SUBSCRIPTIONS_ENABLED = "ROLE_SUBSCRIPTIONS_ENABLED",
4673
+ /** guild has created soundboard sounds */
4674
+ SOUNDBOARD = "SOUNDBOARD",
4567
4675
  /** guild has enabled ticketed events */
4568
4676
  TICKETED_EVENTS_ENABLED = "TICKETED_EVENTS_ENABLED",
4569
4677
  /** guild has access to set a vanity URL */
@@ -4881,6 +4989,15 @@ export interface GuildScheduledEventUserRemoveEvent {
4881
4989
  /** ID of the guild */
4882
4990
  readonly guild_id: Snowflake
4883
4991
  }
4992
+ export type GuildSoundboardSoundCreateEvent = SoundboardSound
4993
+ export interface GuildSoundboardSoundDeleteEvent {
4994
+ /** ID of the sound that was deleted */
4995
+ readonly sound_id: Snowflake
4996
+ /** ID of the guild the sound was in */
4997
+ readonly guild_id: Snowflake
4998
+ }
4999
+ export type GuildSoundboardSoundsUpdateEvent = SoundboardSound
5000
+ export type GuildSoundboardSoundUpdateEvent = SoundboardSound
4884
5001
  export interface GuildStickersUpdateEvent {
4885
5002
  /** ID of the guild */
4886
5003
  readonly guild_id: Snowflake
@@ -6014,6 +6131,16 @@ export interface ModifyGuildScheduledEventParams {
6014
6131
  /** the definition for how often this event should recur */
6015
6132
  readonly recurrence_rule?: GuildScheduledEventRecurrenceRule | null
6016
6133
  }
6134
+ export interface ModifyGuildSoundboardSoundParams {
6135
+ /** name of the soundboard sound (2-32 characters) */
6136
+ readonly name: string
6137
+ /** the volume of the soundboard sound, from 0 to 1 */
6138
+ readonly volume?: number | null
6139
+ /** the id of the custom emoji for the soundboard sound */
6140
+ readonly emoji_id?: Snowflake | null
6141
+ /** the unicode character of a standard emoji for the soundboard sound */
6142
+ readonly emoji_name?: string | null
6143
+ }
6017
6144
  export interface ModifyGuildStickerParams {
6018
6145
  /** name of the sticker (2-30 characters) */
6019
6146
  readonly name: string
@@ -6447,6 +6574,11 @@ export type ReceiveEvent =
6447
6574
  | GuildScheduledEventDeleteEvent
6448
6575
  | GuildScheduledEventUserAddEvent
6449
6576
  | GuildScheduledEventUserRemoveEvent
6577
+ | GuildSoundboardSoundCreateEvent
6578
+ | GuildSoundboardSoundUpdateEvent
6579
+ | GuildSoundboardSoundDeleteEvent
6580
+ | GuildSoundboardSoundsUpdateEvent
6581
+ | SoundboardSoundEvent
6450
6582
  | IntegrationCreateEvent
6451
6583
  | IntegrationUpdateEvent
6452
6584
  | IntegrationDeleteEvent
@@ -6521,6 +6653,11 @@ export interface ReceiveEvents {
6521
6653
  GUILD_SCHEDULED_EVENT_DELETE: GuildScheduledEventDeleteEvent
6522
6654
  GUILD_SCHEDULED_EVENT_USER_ADD: GuildScheduledEventUserAddEvent
6523
6655
  GUILD_SCHEDULED_EVENT_USER_REMOVE: GuildScheduledEventUserRemoveEvent
6656
+ GUILD_SOUNDBOARD_SOUND_CREATE: GuildSoundboardSoundCreateEvent
6657
+ GUILD_SOUNDBOARD_SOUND_UPDATE: GuildSoundboardSoundUpdateEvent
6658
+ GUILD_SOUNDBOARD_SOUND_DELETE: GuildSoundboardSoundDeleteEvent
6659
+ GUILD_SOUNDBOARD_SOUNDS_UPDATE: GuildSoundboardSoundsUpdateEvent
6660
+ SOUNDBOARD_SOUNDS: SoundboardSoundEvent
6524
6661
  INTEGRATION_CREATE: IntegrationCreateEvent
6525
6662
  INTEGRATION_UPDATE: IntegrationUpdateEvent
6526
6663
  INTEGRATION_DELETE: IntegrationDeleteEvent
@@ -6566,6 +6703,10 @@ export interface RequestGuildMember {
6566
6703
  /** nonce to identify the Guild Members Chunk response */
6567
6704
  readonly nonce?: string
6568
6705
  }
6706
+ export interface RequestSoundboardSound {
6707
+ /** IDs of the guilds to get soundboard sounds for */
6708
+ readonly guild_ids: Array<Snowflake>
6709
+ }
6569
6710
  export interface ResolvedDatum {
6570
6711
  /** IDs and User objects */
6571
6712
  readonly users?: Record<Snowflake, User>
@@ -6716,6 +6857,7 @@ export type SendEvent =
6716
6857
  | Resume
6717
6858
  | Heartbeat
6718
6859
  | RequestGuildMember
6860
+ | RequestSoundboardSound
6719
6861
  | UpdateVoiceState
6720
6862
  | UpdatePresence
6721
6863
  export interface SendEvents {
@@ -6723,9 +6865,16 @@ export interface SendEvents {
6723
6865
  RESUME: Resume
6724
6866
  HEARTBEAT: Heartbeat
6725
6867
  REQUEST_GUILD_MEMBERS: RequestGuildMember
6868
+ REQUEST_SOUNDBOARD_SOUNDS: RequestSoundboardSound
6726
6869
  UPDATE_VOICE_STATE: UpdateVoiceState
6727
6870
  UPDATE_PRESENCE: UpdatePresence
6728
6871
  }
6872
+ export interface SendSoundboardSoundParams {
6873
+ /** the id of the soundboard sound to play */
6874
+ readonly sound_id: Snowflake
6875
+ /** the id of the guild the soundboard sound is from, required to play sounds from different servers */
6876
+ readonly source_guild_id?: Snowflake
6877
+ }
6729
6878
  export interface SessionStartLimit {
6730
6879
  /** Total number of session starts the current user is allowed */
6731
6880
  readonly total: number
@@ -6775,6 +6924,30 @@ export enum SortOrderType {
6775
6924
  /** Sort forum posts by creation time (from most recent to oldest) */
6776
6925
  CREATION_DATE = 1,
6777
6926
  }
6927
+ export interface SoundboardSound {
6928
+ /** the name of this sound */
6929
+ readonly name: string
6930
+ /** the id of this sound */
6931
+ readonly sound_id: Snowflake
6932
+ /** the volume of this sound, from 0 to 1 */
6933
+ readonly volume: number
6934
+ /** the id of this sound's custom emoji */
6935
+ readonly emoji_id?: Snowflake | null
6936
+ /** the unicode character of this sound's standard emoji */
6937
+ readonly emoji_name?: string | null
6938
+ /** the id of the guild this sound is in */
6939
+ readonly guild_id?: Snowflake
6940
+ /** whether this sound can be used, may be false due to loss of Server Boosts */
6941
+ readonly available: boolean
6942
+ /** the user who created this sound */
6943
+ readonly user?: User
6944
+ }
6945
+ export interface SoundboardSoundEvent {
6946
+ /** The guild's soundboard sounds */
6947
+ readonly soundboard_sounds: Array<SoundboardSound>
6948
+ /** ID of the guild */
6949
+ readonly guild_id: Snowflake
6950
+ }
6778
6951
  export interface StageInstance {
6779
6952
  /** The id of this Stage instance */
6780
6953
  readonly id: Snowflake
@@ -7265,8 +7438,32 @@ export enum VoiceOpcode {
7265
7438
  HELLO = 8,
7266
7439
  /** Acknowledge a successful session resume. */
7267
7440
  RESUMED = 9,
7441
+ /** One or more clients have connected to the voice channel */
7442
+ CLIENTS_CONNECT = 11,
7268
7443
  /** A client has disconnected from the voice channel */
7269
7444
  CLIENT_DISCONNECT = 13,
7445
+ /** A downgrade from the DAVE protocol is upcoming */
7446
+ DAVE_PREPARE_TRANSITION = 21,
7447
+ /** Execute a previously announced protocol transition */
7448
+ DAVE_EXECUTE_TRANSITION = 22,
7449
+ /** Acknowledge readiness previously announced transition */
7450
+ DAVE_TRANSITION_READY = 23,
7451
+ /** A DAVE protocol version or group change is upcoming */
7452
+ DAVE_PREPARE_EPOCH = 24,
7453
+ /** Credential and public key for MLS external sender */
7454
+ DAVE_MLS_EXTERNAL_SENDER = 25,
7455
+ /** MLS Key Package for pending group member */
7456
+ DAVE_MLS_KEY_PACKAGE = 26,
7457
+ /** MLS Proposals to be appended or revoked */
7458
+ DAVE_MLS_PROPOSALS = 27,
7459
+ /** MLS Commit with optional MLS Welcome messages */
7460
+ DAVE_MLS_COMMIT_WELCOME = 28,
7461
+ /** MLS Commit to be processed for upcoming transition */
7462
+ DAVE_MLS_ANNOUNCE_COMMIT_TRANSITION = 29,
7463
+ /** MLS Welcome to group for upcoming transition */
7464
+ DAVE_MLS_WELCOME = 30,
7465
+ /** Flag invalid commit or welcome, request re-add */
7466
+ DAVE_MLS_INVALID_COMMIT_WELCOME = 31,
7270
7467
  }
7271
7468
  export interface VoiceRegion {
7272
7469
  /** unique ID for the region */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "0.101.1";
1
+ export const LIB_VERSION = "0.103.0";
@@ -1 +1 @@
1
- {"program":{"fileNames":[],"fileInfos":[],"root":[],"options":{"allowJs":false,"checkJs":false,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":7,"noEmitOnError":false,"noErrorTruncation":false,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":false,"noImplicitThis":true,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":false,"removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":99},"referencedMap":[],"exportedModulesMap":[]},"version":"5.4.5"}
1
+ {"fileNames":[],"fileInfos":[],"root":[],"options":{"allowJs":false,"checkJs":false,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":7,"noEmitOnError":false,"noErrorTruncation":false,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":false,"noImplicitThis":true,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":false,"removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":99},"version":"5.6.2"}