mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-21 22:21:33 +00:00
fix(discord): tolerate carbon request option additions
This commit is contained in:
@@ -33,10 +33,7 @@ type Attachment = {
|
||||
description?: string;
|
||||
};
|
||||
|
||||
const defaultOptions: Required<Omit<RequestClientOptions, "baseUrl" | "tokenHeader" | "fetch">> & {
|
||||
baseUrl: string;
|
||||
tokenHeader: "Bot" | "Bearer";
|
||||
} = {
|
||||
const defaultOptions = {
|
||||
tokenHeader: "Bot",
|
||||
baseUrl: "https://discord.com/api",
|
||||
apiVersion: 10,
|
||||
@@ -44,7 +41,7 @@ const defaultOptions: Required<Omit<RequestClientOptions, "baseUrl" | "tokenHead
|
||||
timeout: 15_000,
|
||||
queueRequests: true,
|
||||
maxQueueSize: 1000,
|
||||
};
|
||||
} satisfies Omit<ProxyRequestClientOptions, "fetch">;
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null;
|
||||
|
||||
Reference in New Issue
Block a user