mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-04 11:01:38 +00:00
* refactor(models): remove redundant generation model ref alias * refactor(types): remove redundant local aliases * refactor(types): preserve shipped model ref type
21 lines
569 B
TypeScript
21 lines
569 B
TypeScript
// Discord plugin module implements proxy request client behavior.
|
|
import { RequestClient, type RequestClientOptions } from "./internal/discord.js";
|
|
|
|
export const DISCORD_REST_TIMEOUT_MS = 15_000;
|
|
|
|
export function createDiscordRequestClient(
|
|
token: string,
|
|
options?: RequestClientOptions,
|
|
): RequestClient {
|
|
if (!options?.fetch) {
|
|
return new RequestClient(token, options);
|
|
}
|
|
return new RequestClient(token, {
|
|
runtimeProfile: "persistent",
|
|
maxQueueSize: 1000,
|
|
timeout: DISCORD_REST_TIMEOUT_MS,
|
|
...options,
|
|
fetch: options.fetch,
|
|
});
|
|
}
|