add prompting
This commit is contained in:
parent
a6d58ebf6b
commit
2bb1e2dccb
9 changed files with 277 additions and 48 deletions
|
@ -7,7 +7,7 @@ from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup, InlineQ
|
|||
from telegram.ext import ContextTypes
|
||||
|
||||
from tgbot.config import STICKER_SHITHOLE, BOORU_API_URL, INLINE_QUERY_CACHE_SECONDS, DANBOORU_API_KEY
|
||||
from tgbot.shit.hentai_argparser import parse_args, create_parser
|
||||
from tgbot.shit.hentai_argparser import hentai_parse_args, create_hentai_parser
|
||||
from tgbot.shit.render import render_text_on_image
|
||||
import re
|
||||
|
||||
|
@ -74,11 +74,11 @@ async def handle_cute_button(update: Update, context: ContextTypes.DEFAULT_TYPE)
|
|||
async def handle_hentai(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||
query = update.inline_query.query.replace("hentai", "").replace("—", "--")
|
||||
|
||||
parser = create_parser()
|
||||
parser = create_hentai_parser()
|
||||
|
||||
try:
|
||||
|
||||
args = parse_args(query, parser)
|
||||
args = hentai_parse_args(query, parser)
|
||||
|
||||
except RuntimeError as e:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue