mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
fix: dedupe probe/token base types (#16986) (thanks @iyoda)
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import type { BaseProbeResult } from "../channels/plugins/types.js";
|
||||
import { resolveFetch } from "../infra/fetch.js";
|
||||
import { fetchWithTimeout } from "../utils/fetch-timeout.js";
|
||||
import { normalizeDiscordToken } from "./token.js";
|
||||
|
||||
const DISCORD_API_BASE = "https://discord.com/api/v10";
|
||||
|
||||
export type DiscordProbe = {
|
||||
ok: boolean;
|
||||
export type DiscordProbe = BaseProbeResult & {
|
||||
status?: number | null;
|
||||
error?: string | null;
|
||||
elapsedMs: number;
|
||||
bot?: { id?: string | null; username?: string | null };
|
||||
application?: DiscordApplicationSummary;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { BaseTokenResolution } from "../channels/plugins/types.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js";
|
||||
|
||||
export type DiscordTokenSource = "env" | "config" | "none";
|
||||
|
||||
export type DiscordTokenResolution = {
|
||||
token: string;
|
||||
export type DiscordTokenResolution = BaseTokenResolution & {
|
||||
source: DiscordTokenSource;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user