added:增加Linux-server

This commit is contained in:
Vaica committed 2026-06-21 20:42:44 +08:00
1 parent 6fe4e9d23f
commit d78f3f811b
90 files changed
+16784 -1

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { startPolling } from "./poll";
import { TG_TOKEN } from "./config";
const g = globalThis as Record<string, unknown>;
export async function startBot(): Promise<void> {
if (g.__botStarted) return;
g.__botStarted = true;
if (!TG_TOKEN) {
console.log("[bot] TG_BOT_TOKEN not configured, bot disabled");
return;
}
console.log("[bot] initializing...");
await startPolling();
}
export { TG_TOKEN } from "./config";
export { sendMessage } from "./tg";
export { getSession, hasSession, clearSession } from "./sessions";