ai queue, better markdown parsing, refactor, better feedback

This commit is contained in:
Aidan 2025-06-30 23:43:30 -04:00
parent df49bc4157
commit 23ebd021f3
6 changed files with 273 additions and 173 deletions

View file

@ -1,14 +1,14 @@
import { Context } from "telegraf";
import { replyToMessageId } from "../utils/reply-to-message-id";
export default function verifyInput(ctx: Context, userInput: string, message: string, verifyNaN = false) {
const reply_to_message_id = replyToMessageId(ctx);
if (!userInput || (verifyNaN && isNaN(Number(userInput)))) {
ctx.reply(message, {
parse_mode: "Markdown",
...({ reply_to_message_id })
});
return true;
}
return false;
}
import { Context } from "telegraf";
import { replyToMessageId } from "../utils/reply-to-message-id";
export default function verifyInput(ctx: Context, userInput: string, message: string, verifyNaN = false) {
const reply_to_message_id = replyToMessageId(ctx);
if (!userInput || (verifyNaN && isNaN(Number(userInput)))) {
ctx.reply(message, {
parse_mode: "Markdown",
...({ reply_to_message_id })
});
return true;
}
return false;
}