add initial complete webui, more ai commands for moderation, add api
This commit is contained in:
parent
19e794e34c
commit
173d4e7a52
112 changed files with 8176 additions and 780 deletions
14
telegram/plugins/verifyInput.ts
Executable file
14
telegram/plugins/verifyInput.ts
Executable file
|
@ -0,0 +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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue