Упрощение фильтров и нормализации полей в запросах к VNDB API

This commit is contained in:
2026-05-01 17:15:19 +03:00
parent a3d1a9bdb3
commit ddf44ac2b5
2 changed files with 5 additions and 16 deletions

6
bot.py
View File

@@ -182,7 +182,7 @@ Staff: {stats.get('staff', 0)}
)
results = await vndb_client.query_vn(
filters=["search", "=", query.strip().lower()],
filters=["search", "=", query.strip()],
fields=["id", "title", "image.url"],
results=10
)
@@ -226,7 +226,7 @@ Staff: {stats.get('staff', 0)}
return ConversationHandler.END
results = await vndb_client.query_character(
filters=["search", "=", query.strip().lower()],
filters=["search", "=", query.strip()],
fields=["id", "name", "original", "image.url"],
results=10
)
@@ -253,7 +253,7 @@ Staff: {stats.get('staff', 0)}
query = " ".join(context.args)
results = await vndb_client.query_release(
filters=["search", "=", query.strip().lower()], # ✔️ важно
filters=["search", "=", query.strip()], # ✔️ важно
fields=["id", "title"],
results=10
)