chore(ci): fix lint and swiftformat failures
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user