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:
@@ -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);
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user