update regex matching - now bot responds only for base commands (like /ping) and with mention (like /ping@panfilovi4_bot) and ignores command if it mentions other bot;
Add ability to see, change and list gemini, mistral and ollama models
This commit is contained in:
+5
-4
@@ -4,15 +4,16 @@ import {errorPlaceholder, logError, oldSendMessage} from "../util/utils";
|
||||
import {Requirements} from "../base/requirements";
|
||||
import {Requirement} from "../base/requirement";
|
||||
|
||||
export class Ae implements ChatCommand {
|
||||
regexp = /^\/ae\s([^]+)/i;
|
||||
export class Ae extends ChatCommand {
|
||||
argsMode = "required" as const;
|
||||
|
||||
title = "/ae";
|
||||
description = "evaluation";
|
||||
|
||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
||||
|
||||
async execute(msg: Message, params: string[]) {
|
||||
const match = params[1];
|
||||
async execute(msg: Message, params?: RegExpExecArray) {
|
||||
const match = params?.[3];
|
||||
|
||||
try {
|
||||
let e = eval(match);
|
||||
|
||||
Reference in New Issue
Block a user