chore(ci): fix lint and swiftformat failures

This commit is contained in:
Peter Steinberger
2025-12-08 01:48:53 +01:00
parent 68d19d4717
commit f65702a8a8
21 changed files with 161 additions and 102 deletions

View File

@@ -1,8 +1,6 @@
import { Bot } from "grammy";
import { loadConfig } from "../config/config.js";
import type { RuntimeEnv } from "../runtime.js";
import { createTelegramBot, createTelegramWebhookCallback } from "./bot.js";
import { createTelegramBot } from "./bot.js";
import { makeProxyFetch } from "./proxy.js";
import { startTelegramWebhook } from "./webhook.js";
@@ -21,13 +19,15 @@ export type MonitorTelegramOpts = {
export async function monitorTelegramProvider(opts: MonitorTelegramOpts = {}) {
const token = (opts.token ?? process.env.TELEGRAM_BOT_TOKEN)?.trim();
if (!token) {
throw new Error("TELEGRAM_BOT_TOKEN or telegram.botToken is required for Telegram relay");
throw new Error(
"TELEGRAM_BOT_TOKEN or telegram.botToken is required for Telegram relay",
);
}
const proxyFetch =
opts.proxyFetch ??
(loadConfig().telegram?.proxy
? makeProxyFetch(loadConfig().telegram!.proxy as string)
? makeProxyFetch(loadConfig().telegram?.proxy as string)
: undefined);
const bot = createTelegramBot({