🐛 修复特定情况下消息解析问题 (KimigaiiWuyi/GenshinUID#582)

This commit is contained in:
KimigaiiWuyi 2023-09-10 18:35:33 +08:00
parent 59d99872bc
commit 84b1d49598
3 changed files with 13 additions and 12 deletions

View File

@ -51,6 +51,8 @@ class _Bot:
elif isinstance(message, List): elif isinstance(message, List):
if all(isinstance(x, str) for x in message): if all(isinstance(x, str) for x in message):
message = [MessageSegment.node(message)] message = [MessageSegment.node(message)]
else:
message = [message]
_message: List[Message] = message # type: ignore _message: List[Message] = message # type: ignore

19
poetry.lock generated
View File

@ -941,13 +941,13 @@ reference = "mirrors"
[[package]] [[package]]
name = "gitpython" name = "gitpython"
version = "3.1.34" version = "3.1.35"
description = "GitPython is a Python library used to interact with Git repositories" description = "GitPython is a Python library used to interact with Git repositories"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "GitPython-3.1.34-py3-none-any.whl", hash = "sha256:5d3802b98a3bae1c2b8ae0e1ff2e4aa16bcdf02c145da34d092324f599f01395"}, {file = "GitPython-3.1.35-py3-none-any.whl", hash = "sha256:c19b4292d7a1d3c0f653858db273ff8a6614100d1eb1528b014ec97286193c09"},
{file = "GitPython-3.1.34.tar.gz", hash = "sha256:85f7d365d1f6bf677ae51039c1ef67ca59091c7ebd5a3509aa399d4eda02d6dd"}, {file = "GitPython-3.1.35.tar.gz", hash = "sha256:9cbefbd1789a5fe9bcf621bb34d3f441f3a90c8461d377f84eda73e721d9b06b"},
] ]
[package.dependencies] [package.dependencies]
@ -2193,18 +2193,17 @@ reference = "mirrors"
[[package]] [[package]]
name = "sqlalchemy-database" name = "sqlalchemy-database"
version = "0.1.0" version = "0.1.1"
description = "SQLAlchemy-Database provides shortcut functions to common database operations for SQLAlchemy ORM." description = "SQLAlchemy-Database provides shortcut functions to common database operations for SQLAlchemy ORM."
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "sqlalchemy_database-0.1.0-py3-none-any.whl", hash = "sha256:f12b06f7d4ff6bfbb4272f7f271b7f63ccdc3e6a5c1709ea297de5d54d9aca67"}, {file = "sqlalchemy_database-0.1.1-py3-none-any.whl", hash = "sha256:e6e801af5affa9a0f5e6fdd4fc9626b9f78a040105107fd12588dee21fbe5574"},
{file = "sqlalchemy_database-0.1.0.tar.gz", hash = "sha256:629d1f0d04979a147075b8136854e50a15a83aad754bdd8ad61b320da13f3f7a"}, {file = "sqlalchemy_database-0.1.1.tar.gz", hash = "sha256:c4a6bdc9812a42e9a246dfd7c336e2685969f1163cf2777c88127615b65c6539"},
] ]
[package.dependencies] [package.dependencies]
sqlalchemy = "*" sqlalchemy = "*"
sqlalchemy2-stubs = ">=0.0.2a29"
[package.extras] [package.extras]
docs = ["mkdocs-material (>=8.3.8)", "mkdocstrings[python] (>=0.19.0)"] docs = ["mkdocs-material (>=8.3.8)", "mkdocstrings[python] (>=0.19.0)"]
@ -2505,13 +2504,13 @@ reference = "mirrors"
[[package]] [[package]]
name = "virtualenv" name = "virtualenv"
version = "20.24.4" version = "20.24.5"
description = "Virtual Python Environment builder" description = "Virtual Python Environment builder"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "virtualenv-20.24.4-py3-none-any.whl", hash = "sha256:29c70bb9b88510f6414ac3e55c8b413a1f96239b6b789ca123437d5e892190cb"}, {file = "virtualenv-20.24.5-py3-none-any.whl", hash = "sha256:b80039f280f4919c77b30f1c23294ae357c4c8701042086e3fc005963e4e537b"},
{file = "virtualenv-20.24.4.tar.gz", hash = "sha256:772b05bfda7ed3b8ecd16021ca9716273ad9f4467c801f27e83ac73430246dca"}, {file = "virtualenv-20.24.5.tar.gz", hash = "sha256:e8361967f6da6fbdf1426483bfe9fca8287c242ac0bc30429905721cefbff752"},
] ]
[package.dependencies] [package.dependencies]

View File

@ -24,7 +24,7 @@ fastapi-user-auth==0.5.0 ; python_full_version >= "3.8.1" and python_full_versio
fastapi==0.97.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" fastapi==0.97.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
frozenlist==1.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" frozenlist==1.4.0 ; 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" gitdb==4.0.10 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
gitpython==3.1.34 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" gitpython==3.1.35 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
greenlet==2.0.2 ; python_full_version >= "3.8.1" and (platform_machine == "win32" or platform_machine == "WIN32" or platform_machine == "AMD64" or platform_machine == "amd64" or platform_machine == "x86_64" or platform_machine == "ppc64le" or platform_machine == "aarch64") and python_full_version < "4.0.0" greenlet==2.0.2 ; python_full_version >= "3.8.1" and (platform_machine == "win32" or platform_machine == "WIN32" or platform_machine == "AMD64" or platform_machine == "amd64" or platform_machine == "x86_64" or platform_machine == "ppc64le" or platform_machine == "aarch64") and python_full_version < "4.0.0"
h11==0.14.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" h11==0.14.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
httpcore==0.17.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" httpcore==0.17.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
@ -49,7 +49,7 @@ smmap==5.0.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sniffio==1.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sniffio==1.3.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sortedcontainers==2.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sortedcontainers==2.4.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
soupsieve==2.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" soupsieve==2.5 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy-database==0.1.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sqlalchemy-database==0.1.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy2-stubs==0.0.2a35 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sqlalchemy2-stubs==0.0.2a35 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlalchemy==1.4.41 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sqlalchemy==1.4.41 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"
sqlmodel==0.0.8 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" sqlmodel==0.0.8 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0"