telegram and whatsapp channel integrations, validate bot tokens before saving

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 08:53:01 +00:00
co-authored by Claude Opus 4.6
parent bc4c20929c
commit b698e3d962
15 changed files with 2571 additions and 40 deletions
+12 -2
View File
@@ -8,6 +8,8 @@ import { migrateSettingsToResources } from './migrate-resources';
import { generateResourceSkill } from './api/pi/pi-bridge';
import { initQueue } from './queue';
import { startDiscordBotIfConfigured } from './channels/discord/bot';
import { startTelegramBotIfConfigured } from './channels/telegram/bot';
import { startWhatsAppBotIfConfigured } from './channels/whatsapp/bot';
mkdirSync(DATA_PATH, { recursive: true });
@@ -59,11 +61,19 @@ async function installPi(): Promise<boolean> {
await migrateSettingsToResources();
generateResourceSkill(DATA_PATH);
await initQueue().catch(err => {
await initQueue().catch((err) => {
console.error('[bootstrap] Failed to initialize queue:', err);
});
await startDiscordBotIfConfigured().catch(err => {
await startDiscordBotIfConfigured().catch((err) => {
console.error('[channels] Failed to start Discord bot:', err);
});
await startTelegramBotIfConfigured().catch((err) => {
console.error('[channels] Failed to start Telegram bot:', err);
});
await startWhatsAppBotIfConfigured().catch((err) => {
console.error('[channels] Failed to start WhatsApp bot:', err);
});
})();