KOW-6 add addl /httpcat validation

This commit is contained in:
Aidan 2025-05-27 23:07:24 -04:00
parent 7083f0a10c
commit 2d0afae703

View file

@ -60,6 +60,13 @@ export default (bot: Telegraf<Context>) => {
if (verifyInput(ctx, userInput, invalidCode, true)) { if (verifyInput(ctx, userInput, invalidCode, true)) {
return; return;
} }
if (userInput.length !== 3) {
ctx.reply(Strings.httpCodes.invalidCode, {
parse_mode: 'Markdown',
...({ reply_to_message_id })
})
return
}
const apiUrl = `${Resources.httpCatApi}${userInput}`; const apiUrl = `${Resources.httpCatApi}${userInput}`;