refactor!: rewrite bot core; add AI (Ollama, Gemini), DB, new commands
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import {ChatCommand} from "../base/chat-command";
|
||||
import {Message} from "typescript-telegram-bot-api";
|
||||
import {Requirements} from "../base/requirements";
|
||||
import {Requirement} from "../base/requirement";
|
||||
import {bot} from "../index";
|
||||
|
||||
export class Leave extends ChatCommand {
|
||||
regexp = /^\/leave/i;
|
||||
title = "/leave";
|
||||
description = "Bot will leave current chat";
|
||||
|
||||
requirements = Requirements.Build(Requirement.BOT_ADMIN, Requirement.CHAT);
|
||||
|
||||
async execute(msg: Message): Promise<void> {
|
||||
await bot.leaveChat({chat_id: msg.chat.id});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user