🎨 阻止查询收集查询探索事件流转

This commit is contained in:
Wuyi无疑 2023-03-08 01:45:47 +08:00
parent 8361af4540
commit f00577bcbc
4 changed files with 14 additions and 14 deletions

View File

@ -7,7 +7,7 @@ from ..utils.error_reply import UID_HINT
from .draw_collection_card import draw_explora_img, draw_collection_img
@SV('查询数据').on_command(('查询收集', 'sj'))
@SV('查询数据').on_command(('查询收集', 'sj'), block=True)
async def send_collection_info(bot: Bot, ev: Event):
await bot.logger.info('开始执行[查询收集信息]')
user_id = ev.at if ev.at else ev.user_id
@ -22,7 +22,7 @@ async def send_collection_info(bot: Bot, ev: Event):
await bot.send(im)
@SV('查询数据').on_command(('查询探索', 'ts'))
@SV('查询数据').on_command(('查询探索', 'ts'), block=True)
async def send_explora_info(bot: Bot, ev: Event):
await bot.logger.info('开始执行[查询探索信息]')
user_id = ev.at if ev.at else ev.user_id

View File

@ -20,22 +20,22 @@ from .get_wiki_text import (
)
@SV('原神WIKI文字版').on_prefix(('原魔'))
@SV('原神WIKI文字版').on_prefix(('原魔介绍', '原魔资料'))
async def send_enemies(bot: Bot, ev: Event):
await bot.send(await enemies_wiki(ev.text))
@SV('原神WIKI文字版').on_prefix(('食物'))
@SV('原神WIKI文字版').on_prefix(('食物介绍', '食物资料'))
async def send_food(bot: Bot, ev: Event):
await bot.send(await foods_wiki(ev.text))
@SV('原神WIKI文字版').on_prefix(('圣遗物'))
@SV('原神WIKI文字版').on_prefix(('圣遗物介绍', '圣遗物资料'))
async def send_artifacts(bot: Bot, ev: Event):
await bot.send(await artifacts_wiki(ev.text))
@SV('原神WIKI文字版').on_prefix(('武器介绍'))
@SV('原神WIKI文字版').on_prefix(('武器介绍', '武器资料'))
async def send_weapon(bot: Bot, ev: Event):
name = ''.join(re.findall('[\u4e00-\u9fa5]', ev.text))
level = re.findall(r'\d+', ev.text)
@ -46,7 +46,7 @@ async def send_weapon(bot: Bot, ev: Event):
await bot.send(im)
@SV('原神WIKI文字版').on_prefix(('天赋'))
@SV('原神WIKI文字版').on_prefix(('角色天赋'))
async def send_talents(bot: Bot, ev: Event):
name = ''.join(re.findall('[\u4e00-\u9fa5]', ev.text))
num = re.findall(r'\d+', ev.text)
@ -59,7 +59,7 @@ async def send_talents(bot: Bot, ev: Event):
await bot.send(im)
@SV('原神WIKI文字版').on_prefix(('角色介绍'))
@SV('原神WIKI文字版').on_prefix(('角色介绍', '角色资料'))
async def send_char(bot: Bot, ev: Event):
name = ''.join(re.findall('[\u4e00-\u9fa5]', ev.text))
level = re.findall(r'\d+', ev.text)
@ -82,7 +82,7 @@ async def send_weapon_cost(bot: Bot, ev: Event):
await bot.send(im)
@SV('原神WIKI文字版').on_prefix(('命座'))
@SV('原神WIKI文字版').on_prefix(('角色命座'))
async def send_polar(bot: Bot, ev: Event):
num = int(re.findall(r'\d+', ev.text)[0])
m = ''.join(re.findall('[\u4e00-\u9fa5]', ev.text))

8
poetry.lock generated
View File

@ -593,14 +593,14 @@ test = ["pytest (>=6)"]
[[package]]
name = "fastapi"
version = "0.92.0"
version = "0.93.0"
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
{file = "fastapi-0.92.0-py3-none-any.whl", hash = "sha256:ae7b97c778e2f2ec3fb3cb4fb14162129411d99907fb71920f6d69a524340ebf"},
{file = "fastapi-0.92.0.tar.gz", hash = "sha256:023a0f5bd2c8b2609014d3bba1e14a1d7df96c6abea0a73070621c9862b9a4de"},
{file = "fastapi-0.93.0-py3-none-any.whl", hash = "sha256:d6e6db5f096d67b475e2a09e1124983554f634fad50297de85fc3de0583df13a"},
{file = "fastapi-0.93.0.tar.gz", hash = "sha256:c2944febec6da706f4c82cdfa0de48afda960c8fbde29dec88697d55a67d7718"},
]
[package.dependencies]
@ -610,7 +610,7 @@ starlette = ">=0.25.0,<0.26.0"
[package.extras]
all = ["email-validator (>=1.1.1)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "python-multipart (>=0.0.5)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"]
dev = ["pre-commit (>=2.17.0,<3.0.0)", "ruff (==0.0.138)", "uvicorn[standard] (>=0.12.0,<0.21.0)"]
doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer[all] (>=0.6.1,<0.8.0)"]
doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer-cli (>=0.0.13,<0.0.14)", "typer[all] (>=0.6.1,<0.8.0)"]
test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.10.0)", "coverage[toml] (>=6.5.0,<8.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.982)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "ruff (==0.0.138)", "sqlalchemy (>=1.3.18,<1.4.43)", "types-orjson (==3.6.2)", "types-ujson (==5.6.0.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"]
[[package]]

View File

@ -17,7 +17,7 @@ email-validator==1.3.1 ; python_full_version >= "3.8.1" and python_full_version
et-xmlfile==1.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi-amis-admin==0.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi-user-auth==0.5.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi==0.92.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
fastapi==0.93.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
frozenlist==1.3.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
gitdb==4.0.10 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
gitpython==3.1.31 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"