mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 10:27:38 +00:00
Telegram: use Grammy types directly, add typed Probe/Audit to plugin interface (#8403)
* Telegram: replace duplicated types with Grammy imports, add Probe/Audit generics to plugin interface * Telegram: remove legacy forward metadata (deprecated in Bot API 7.0), simplify required-field checks * Telegram: clean up remaining legacy references and unnecessary casts * Telegram: keep RequestInit parameter type in proxy fetch (addresses review feedback) * Telegram: add exhaustiveness guard to resolveForwardOrigin switch
This commit is contained in:
@@ -2,11 +2,11 @@ import type { ApiClientOptions } from "grammy";
|
||||
// @ts-nocheck
|
||||
import { sequentialize } from "@grammyjs/runner";
|
||||
import { apiThrottler } from "@grammyjs/transformer-throttler";
|
||||
import { ReactionTypeEmoji } from "@grammyjs/types";
|
||||
import { type Message, ReactionTypeEmoji } from "@grammyjs/types";
|
||||
import { Bot, webhookCallback } from "grammy";
|
||||
import type { OpenClawConfig, ReplyToMode } from "../config/config.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import type { TelegramContext, TelegramMessage } from "./bot/types.js";
|
||||
import type { TelegramContext } from "./bot/types.js";
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import { resolveTextChunkLimit } from "../auto-reply/chunk.js";
|
||||
import { isControlCommandMessage } from "../auto-reply/command-detection.js";
|
||||
@@ -67,11 +67,11 @@ export type TelegramBotOptions = {
|
||||
|
||||
export function getTelegramSequentialKey(ctx: {
|
||||
chat?: { id?: number };
|
||||
message?: TelegramMessage;
|
||||
message?: Message;
|
||||
update?: {
|
||||
message?: TelegramMessage;
|
||||
edited_message?: TelegramMessage;
|
||||
callback_query?: { message?: TelegramMessage };
|
||||
message?: Message;
|
||||
edited_message?: Message;
|
||||
callback_query?: { message?: Message };
|
||||
message_reaction?: { chat?: { id?: number } };
|
||||
};
|
||||
}): string {
|
||||
|
||||
Reference in New Issue
Block a user