mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
feat: no-de-no-de, now with extra buns (#9683)
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility between Node, Deno, Bun, CF Workers, Vercel Functions, etc. BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple different platforms (previously mentioned Deno, Bun, CF Workers, etc) BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ in non-node-like environments (CF Workers, etc.) Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: suneettipirneni <suneettipirneni@icloud.com>
This commit is contained in:
11
packages/rest/src/environment.ts
Normal file
11
packages/rest/src/environment.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { RESTOptions } from './shared.js';
|
||||
|
||||
let defaultStrategy: RESTOptions['makeRequest'];
|
||||
|
||||
export function setDefaultStrategy(newStrategy: RESTOptions['makeRequest']) {
|
||||
defaultStrategy = newStrategy;
|
||||
}
|
||||
|
||||
export function getDefaultStrategy() {
|
||||
return defaultStrategy;
|
||||
}
|
||||
Reference in New Issue
Block a user