chore: Manually fix TypeScript errors uncovered by sorting imports.

Some TypeScript checks are order dependent, and the fixed types were `any`/`unknown`, TypeScript just didn't report it before for some reason.
This commit is contained in:
cpojer
2026-02-01 10:07:59 +09:00
parent f06dd8df06
commit 147eba11fd
4 changed files with 47 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ import type { ApiClientOptions } from "grammy";
// @ts-nocheck
import { sequentialize } from "@grammyjs/runner";
import { apiThrottler } from "@grammyjs/transformer-throttler";
import { ReactionTypeEmoji } from "@grammyjs/types";
import { Bot, webhookCallback } from "grammy";
import type { OpenClawConfig, ReplyToMode } from "../config/config.js";
import type { RuntimeEnv } from "../runtime.js";
@@ -417,11 +418,11 @@ export function createTelegramBot(opts: TelegramBotOptions) {
// Detect added reactions
const oldEmojis = new Set(
reaction.old_reaction
.filter((r): r is { type: "emoji"; emoji: string } => r.type === "emoji")
.filter((r): r is ReactionTypeEmoji => r.type === "emoji")
.map((r) => r.emoji),
);
const addedReactions = reaction.new_reaction
.filter((r): r is { type: "emoji"; emoji: string } => r.type === "emoji")
.filter((r): r is ReactionTypeEmoji => r.type === "emoji")
.filter((r) => !oldEmojis.has(r.emoji));
if (addedReactions.length === 0) {