refactor!: rewrite bot core; add AI (Ollama, Gemini), DB, new commands

This commit is contained in:
2026-01-12 15:32:50 +03:00
parent 9d74ad9861
commit df9471a7e4
137 changed files with 11341 additions and 2025 deletions
+17
View File
@@ -0,0 +1,17 @@
import {logError, oldSendMessage} from "../util/utils";
import {Message} from "typescript-telegram-bot-api";
import {ChatCommand} from "../base/chat-command";
export class Ping implements ChatCommand {
regexp = /^\/ping/i;
title = "/ping";
description = "Ping between received and sent message";
async execute(msg: Message) {
const then = new Date().getMilliseconds();
await oldSendMessage(msg, "pong").catch(logError);
const now = new Date().getMilliseconds();
const diff = Math.abs(now - then);
await oldSendMessage(msg, `ping: ${diff}ms`).catch(logError);
}
}