@discordjs/rest 2.4.3 → 2.5.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.
package/dist/index.mjs CHANGED
@@ -80,10 +80,13 @@ async function resolveBody(body) {
80
80
  }
81
81
  __name(resolveBody, "resolveBody");
82
82
 
83
+ // src/lib/CDN.ts
84
+ import { CDNRoutes } from "discord-api-types/v10";
85
+
83
86
  // src/lib/utils/constants.ts
84
87
  import { getUserAgentAppendix } from "@discordjs/util";
85
88
  import { APIVersion } from "discord-api-types/v10";
86
- var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.4.3)`;
89
+ var DefaultUserAgent = `DiscordBot (https://discord.js.org, 2.5.0)`;
87
90
  var DefaultUserAgentAppendix = getUserAgentAppendix();
88
91
  var DefaultRestOptions = {
89
92
  agent: null,
@@ -121,7 +124,17 @@ var RESTEvents = /* @__PURE__ */ ((RESTEvents2) => {
121
124
  })(RESTEvents || {});
122
125
  var ALLOWED_EXTENSIONS = ["webp", "png", "jpg", "jpeg", "gif"];
123
126
  var ALLOWED_STICKER_EXTENSIONS = ["png", "json", "gif"];
124
- var ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
127
+ var ALLOWED_SIZES = [
128
+ 16,
129
+ 32,
130
+ 64,
131
+ 128,
132
+ 256,
133
+ 512,
134
+ 1024,
135
+ 2048,
136
+ 4096
137
+ ];
125
138
  var OverwrittenMimeTypes = {
126
139
  // https://github.com/discordjs/discord.js/issues/8557
127
140
  "image/apng": "image/png"
@@ -481,6 +494,14 @@ var CDN = class {
481
494
  guildScheduledEventCover(scheduledEventId, coverHash, options) {
482
495
  return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options);
483
496
  }
497
+ /**
498
+ * Generates a URL for a soundboard sound.
499
+ *
500
+ * @param soundId - The soundboard sound id
501
+ */
502
+ soundboardSound(soundId) {
503
+ return `${this.cdn}${CDNRoutes.soundboardSound(soundId)}`;
504
+ }
484
505
  /**
485
506
  * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
486
507
  *
@@ -1407,7 +1428,7 @@ var REST = class _REST extends AsyncEventEmitter {
1407
1428
  };
1408
1429
 
1409
1430
  // src/shared.ts
1410
- var version = "2.4.3";
1431
+ var version = "2.5.0";
1411
1432
 
1412
1433
  // src/index.ts
1413
1434
  globalThis.FormData ??= FormData2;