Telegram-бот Boltun AI на grammY + Mastra
- Отвечает только администраторам из ADMIN_IDS - Личности на чат: встроенные и пользовательские (/personas, /persona, /persona_add, /persona_del) - Вопросы через /ask, упоминание, ответ боту или личку - Сохраняет сообщения чата в SQLite; агент по просьбе читает их инструментом read_chat_messages - Модели через OpenRouter (по умолчанию DeepSeek) - Слои: libs, repositories, services, bot/handlers - Dockerfile для деплоя в Dokploy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
16
src/types.ts
Normal file
16
src/types.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface Persona {
|
||||
id: string;
|
||||
name: string;
|
||||
prompt: string;
|
||||
builtin: boolean;
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
chatId: number;
|
||||
messageId: number;
|
||||
/** Unix-время в секундах, как в Telegram. */
|
||||
date: number;
|
||||
author: string;
|
||||
text: string;
|
||||
replyToMessageId: number | null;
|
||||
}
|
||||
Reference in New Issue
Block a user