🔖 release status 0.2.2

This commit is contained in:
yanyongyu 2021-09-10 13:26:46 +08:00
parent eeadf3f151
commit 1453825771
7 changed files with 91 additions and 66 deletions

89
poetry.lock generated
View File

@ -1,6 +1,6 @@
[[package]]
name = "anyio"
version = "3.3.0"
version = "3.3.1"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
category = "main"
optional = false
@ -155,7 +155,7 @@ six = ">=1.10"
[[package]]
name = "cryptography"
version = "3.4.7"
version = "3.4.8"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
category = "dev"
optional = false
@ -182,7 +182,7 @@ python-versions = "*"
[[package]]
name = "docker"
version = "5.0.0"
version = "5.0.2"
description = "A Python library for the Docker Engine API."
category = "dev"
optional = false
@ -244,7 +244,7 @@ python-versions = "*"
[[package]]
name = "fastapi"
version = "0.68.0"
version = "0.68.1"
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
category = "main"
optional = false
@ -257,7 +257,7 @@ starlette = "0.14.2"
[package.extras]
all = ["requests (>=2.24.0,<3.0.0)", "aiofiles (>=0.5.0,<0.6.0)", "jinja2 (>=2.11.2,<3.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<2.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "graphene (>=2.1.8,<3.0.0)", "ujson (>=4.0.1,<5.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)"]
dev = ["python-jose[cryptography] (>=3.3.0,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "graphene (>=2.1.8,<3.0.0)"]
doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=7.1.9,<8.0.0)", "markdown-include (>=0.6.0,<0.7.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.2.0)", "typer-cli (>=0.0.12,<0.0.13)", "pyyaml (>=5.3.1,<6.0.0)"]
doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=7.1.9,<8.0.0)", "mdx-include (>=1.4.1,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.2.0)", "typer-cli (>=0.0.12,<0.0.13)", "pyyaml (>=5.3.1,<6.0.0)"]
test = ["pytest (>=6.2.4,<7.0.0)", "pytest-cov (>=2.12.0,<3.0.0)", "pytest-asyncio (>=0.14.0,<0.15.0)", "mypy (==0.812)", "flake8 (>=3.8.3,<4.0.0)", "black (==20.8b1)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.15.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<1.4.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.4.0)", "orjson (>=3.2.1,<4.0.0)", "ujson (>=4.0.1,<5.0.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "aiofiles (>=0.5.0,<0.6.0)", "flask (>=1.1.2,<2.0.0)"]
[[package]]
@ -536,7 +536,7 @@ invoke = ["invoke (>=1.3)"]
[[package]]
name = "playwright"
version = "1.14.0"
version = "1.14.1"
description = "A high-level API to automate web browsers"
category = "main"
optional = false
@ -558,11 +558,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "prompt-toolkit"
version = "3.0.19"
version = "3.0.20"
description = "Library for building powerful interactive command lines in Python"
category = "dev"
optional = false
python-versions = ">=3.6.1"
python-versions = ">=3.6.2"
[package.dependencies]
wcwidth = "*"
@ -830,7 +830,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "typing-extensions"
version = "3.10.0.0"
version = "3.10.0.2"
description = "Backported and Experimental Type Hints for Python 3.5+"
category = "main"
optional = false
@ -941,7 +941,7 @@ dev = ["pytest (>=4.6.2)", "black (>=19.3b0)"]
[[package]]
name = "yapf"
version = "0.30.0"
version = "0.31.0"
description = "A formatter for Python code."
category = "dev"
optional = false
@ -950,12 +950,12 @@ python-versions = "*"
[metadata]
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "afa473c854279131db46958e0714818221f4ce5a71b2dcdbbe6c73ee6a0d9402"
content-hash = "d68b319e5a34b10ab581dee77e5e30e0cddeb3aed37337e7a5799e6665bddce5"
[metadata.files]
anyio = [
{file = "anyio-3.3.0-py3-none-any.whl", hash = "sha256:929a6852074397afe1d989002aa96d457e3e1e5441357c60d03e7eea0e65e1b0"},
{file = "anyio-3.3.0.tar.gz", hash = "sha256:ae57a67583e5ff8b4af47666ff5651c3732d45fd26c929253748e796af860374"},
{file = "anyio-3.3.1-py3-none-any.whl", hash = "sha256:d7c604dd491eca70e19c78664d685d5e4337612d574419d503e76f5d7d1590bd"},
{file = "anyio-3.3.1.tar.gz", hash = "sha256:85913b4e2fec030e8c72a8f9f98092eeb9e25847a6e00d567751b77e34f856fe"},
]
arrow = [
{file = "arrow-1.1.1-py3-none-any.whl", hash = "sha256:77a60a4db5766d900a2085ce9074c5c7b8e2c99afeaa98ad627637ff6f292510"},
@ -1054,28 +1054,31 @@ cookiecutter = [
{file = "cookiecutter-1.7.3.tar.gz", hash = "sha256:6b9a4d72882e243be077a7397d0f1f76fe66cf3df91f3115dbb5330e214fa457"},
]
cryptography = [
{file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"},
{file = "cryptography-3.4.7-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250"},
{file = "cryptography-3.4.7-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2"},
{file = "cryptography-3.4.7-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6"},
{file = "cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959"},
{file = "cryptography-3.4.7-cp36-abi3-win32.whl", hash = "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d"},
{file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"},
{file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"},
{file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"},
{file = "cryptography-3.4.7-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b01fd6f2737816cb1e08ed4807ae194404790eac7ad030b34f2ce72b332f5586"},
{file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"},
{file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"},
{file = "cryptography-3.4.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:bf40af59ca2465b24e54f671b2de2c59257ddc4f7e5706dbd6930e26823668d3"},
{file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"},
{file = "cryptography-3.4.8-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a00cf305f07b26c351d8d4e1af84ad7501eca8a342dedf24a7acb0e7b7406e14"},
{file = "cryptography-3.4.8-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:f44d141b8c4ea5eb4dbc9b3ad992d45580c1d22bf5e24363f2fbf50c2d7ae8a7"},
{file = "cryptography-3.4.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0a7dcbcd3f1913f664aca35d47c1331fce738d44ec34b7be8b9d332151b0b01e"},
{file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34dae04a0dce5730d8eb7894eab617d8a70d0c97da76b905de9efb7128ad7085"},
{file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1eb7bb0df6f6f583dd8e054689def236255161ebbcf62b226454ab9ec663746b"},
{file = "cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:9965c46c674ba8cc572bc09a03f4c649292ee73e1b683adb1ce81e82e9a6a0fb"},
{file = "cryptography-3.4.8-cp36-abi3-win32.whl", hash = "sha256:21ca464b3a4b8d8e86ba0ee5045e103a1fcfac3b39319727bc0fc58c09c6aff7"},
{file = "cryptography-3.4.8-cp36-abi3-win_amd64.whl", hash = "sha256:3520667fda779eb788ea00080124875be18f2d8f0848ec00733c0ec3bb8219fc"},
{file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d2a6e5ef66503da51d2110edf6c403dc6b494cc0082f85db12f54e9c5d4c3ec5"},
{file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a305600e7a6b7b855cd798e00278161b681ad6e9b7eca94c721d5f588ab212af"},
{file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:3fa3a7ccf96e826affdf1a0a9432be74dc73423125c8f96a909e3835a5ef194a"},
{file = "cryptography-3.4.8-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:d9ec0e67a14f9d1d48dd87a2531009a9b251c02ea42851c060b25c782516ff06"},
{file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b0fbfae7ff7febdb74b574055c7466da334a5371f253732d7e2e7525d570498"},
{file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94fff993ee9bc1b2440d3b7243d488c6a3d9724cc2b09cdb297f6a886d040ef7"},
{file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8695456444f277af73a4877db9fc979849cd3ee74c198d04fc0776ebc3db52b9"},
{file = "cryptography-3.4.8-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:cd65b60cfe004790c795cc35f272e41a3df4631e2fb6b35aa7ac6ef2859d554e"},
{file = "cryptography-3.4.8.tar.gz", hash = "sha256:94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c"},
]
distro = [
{file = "distro-1.6.0-py2.py3-none-any.whl", hash = "sha256:c8713330ab31a034623a9515663ed87696700b55f04556b97c39cd261aa70dc7"},
{file = "distro-1.6.0.tar.gz", hash = "sha256:83f5e5a09f9c5f68f60173de572930effbcc0287bb84fdc4426cb4168c088424"},
]
docker = [
{file = "docker-5.0.0-py2.py3-none-any.whl", hash = "sha256:fc961d622160e8021c10d1bcabc388c57d55fb1f917175afbe24af442e6879bd"},
{file = "docker-5.0.0.tar.gz", hash = "sha256:3e8bc47534e0ca9331d72c32f2881bb13b93ded0bcdeab3c833fb7cf61c0a9a5"},
{file = "docker-5.0.2-py2.py3-none-any.whl", hash = "sha256:9b17f0723d83c1f3418d2aa17bf90b24dbe97deda06208dd4262fa30a6ee87eb"},
{file = "docker-5.0.2.tar.gz", hash = "sha256:21ec4998e90dff7a7aaaa098ca8d839c7de412b89e6f6c30908372d58fecf663"},
]
docker-compose = [
{file = "docker-compose-1.29.2.tar.gz", hash = "sha256:4c8cd9d21d237412793d18bd33110049ee9af8dab3fe2c213bbd0733959b09b7"},
@ -1088,8 +1091,8 @@ docopt = [
{file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"},
]
fastapi = [
{file = "fastapi-0.68.0-py3-none-any.whl", hash = "sha256:f4dba2596b1e0a1f962834c3b9ec4291a7aec387a1031c6c2e25bf239d27fd0f"},
{file = "fastapi-0.68.0.tar.gz", hash = "sha256:c9256a89b0436223b45f53fe3a39b178f3da6be5841a2c59deedff4b676d003f"},
{file = "fastapi-0.68.1-py3-none-any.whl", hash = "sha256:94d2820906c36b9b8303796fb7271337ec89c74223229e3cfcf056b5a7d59e23"},
{file = "fastapi-0.68.1.tar.gz", hash = "sha256:644bb815bae326575c4b2842469fb83053a4b974b82fa792ff9283d17fbbd99d"},
]
greenlet = [
{file = "greenlet-1.1.1-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:476ba9435afaead4382fbab8f1882f75e3fb2285c35c9285abb3dd30237f9142"},
@ -1328,19 +1331,19 @@ paramiko = [
{file = "paramiko-2.7.2.tar.gz", hash = "sha256:7f36f4ba2c0d81d219f4595e35f70d56cc94f9ac40a6acdf51d6ca210ce65035"},
]
playwright = [
{file = "playwright-1.14.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:a1aadedd1c12936c3c9032b05700648d8ce0c551f21579b27d172074ab165fb9"},
{file = "playwright-1.14.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:f37a7fac1166faf8b3bd9217cce19d9913018174ffaaa52983602803c372e1c6"},
{file = "playwright-1.14.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:d305d811272c9f0140595cac7bd113d8db3168aeff26555f8886b916c553b4af"},
{file = "playwright-1.14.0-py3-none-win32.whl", hash = "sha256:205fffc9586947f2b10288baa1a3f125c7adc1b8aa3c7a78138aa37272665f75"},
{file = "playwright-1.14.0-py3-none-win_amd64.whl", hash = "sha256:6dfe60121733420cb8f8e83df6480625ed3830ce5bf3e16ae45f9f6c806d7f0e"},
{file = "playwright-1.14.1-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:537d72d20bf3a5d9b29d695fa063b2371083a5d1d445a6e497fc65b94691564b"},
{file = "playwright-1.14.1-py3-none-macosx_11_0_universal2.whl", hash = "sha256:41f158a850af1e0a2b1a666e42edf56569606ce8bf27a7338dcbbe76f1ef69c2"},
{file = "playwright-1.14.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:0ed8ae65e8a6cfab285abc500e2e1335c1200836c91316bf49a2bef4e4a40a66"},
{file = "playwright-1.14.1-py3-none-win32.whl", hash = "sha256:fbf0413b31a016240bca070f9177bb4eb62fd00745f9df1b4f9fc39a0ba03b5b"},
{file = "playwright-1.14.1-py3-none-win_amd64.whl", hash = "sha256:1fda94b06c62750915ac30f40fd5244a690a3f569a90f7d1cef92304f5d3dded"},
]
poyo = [
{file = "poyo-0.5.0-py2.py3-none-any.whl", hash = "sha256:3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a"},
{file = "poyo-0.5.0.tar.gz", hash = "sha256:e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd"},
]
prompt-toolkit = [
{file = "prompt_toolkit-3.0.19-py3-none-any.whl", hash = "sha256:7089d8d2938043508aa9420ec18ce0922885304cddae87fb96eebca942299f88"},
{file = "prompt_toolkit-3.0.19.tar.gz", hash = "sha256:08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f"},
{file = "prompt_toolkit-3.0.20-py3-none-any.whl", hash = "sha256:6076e46efae19b1e0ca1ec003ed37a933dc94b4d20f486235d436e64771dcd5c"},
{file = "prompt_toolkit-3.0.20.tar.gz", hash = "sha256:eb71d5a6b72ce6db177af4a7d4d7085b99756bf656d98ffcc4fecd36850eea6c"},
]
psutil = [
{file = "psutil-5.8.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:0066a82f7b1b37d334e68697faba68e5ad5e858279fd6351c8ca6024e8d6ba64"},
@ -1552,9 +1555,9 @@ tomlkit = [
{file = "tomlkit-0.7.2.tar.gz", hash = "sha256:d7a454f319a7e9bd2e249f239168729327e4dd2d27b17dc68be264ad1ce36754"},
]
typing-extensions = [
{file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"},
{file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"},
{file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"},
{file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"},
{file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"},
{file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"},
]
unidiff = [
{file = "unidiff-0.6.0-py2.py3-none-any.whl", hash = "sha256:e1dd956a492ccc4351e24931b2f2d29c79e3be17a99dd8f14e95324321d93a88"},
@ -1638,6 +1641,6 @@ win32-setctime = [
{file = "win32_setctime-1.0.3.tar.gz", hash = "sha256:4e88556c32fdf47f64165a2180ba4552f8bb32c1103a2fafd05723a0bd42bd4b"},
]
yapf = [
{file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"},
{file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"},
{file = "yapf-0.31.0-py2.py3-none-any.whl", hash = "sha256:e3a234ba8455fe201eaa649cdac872d590089a18b661e39bbac7020978dd9c2e"},
{file = "yapf-0.31.0.tar.gz", hash = "sha256:408fb9a2b254c302f49db83c59f9aa0b4b0fd0ec25be3a5c51181327922ff63d"},
]

View File

@ -22,7 +22,7 @@ nonebot-adapter-cqhttp = "^2.0.0-alpha.15"
redis = {version = "^3.5.3", extras = ["hiredis"]}
[tool.poetry.dev-dependencies]
yapf = "^0.30.0"
yapf = "^0.31.0"
# nonebot-plugin-test = "^0.2.0"
nb-cli = {version = "^0.5.0", extras = ["deploy"]}

View File

@ -2,7 +2,7 @@
* @Author : yanyongyu
* @Date : 2021-05-17 10:03:08
* @LastEditors : yanyongyu
* @LastEditTime : 2021-09-02 01:27:43
* @LastEditTime : 2021-09-10 12:38:41
* @Description : None
* @GitHub : https://github.com/yanyongyu
-->
@ -34,20 +34,20 @@
<!-- FIXME: pr status check -->
<!-- prettier-ignore -->
{% if timeline|selectattr("event", "equalto", "merged")|list|length >= 1 %}
{% set state = "merged" %}
{% else %}
{% set state = issue.state %}
{% endif %}
{% set state = "merged" -%}
{%- else -%}
{% set state = issue.state %}
{%- endif %}
<span class="State State--{{ state|escape }} mr-2">
<!-- prettier-ignore -->
{% if state == "open" %}
{% include "components/svg-closed.html" %}
{% elif state == "closed" %}
{% include "components/svg-closed.html" %}
{% elif state == "merged" %}
{% include "components/svg-merged.html" %}
{% endif %}
{{ state|escape }}
{% if state == "open" -%}
{% include "components/svg-closed.html" %}
{%- elif state == "closed" -%}
{% include "components/svg-closed.html" %}
{%- elif state == "merged" -%}
{% include "components/svg-merged.html" %}
{%- endif %}
{{ state|escape }}
</span>
</div>
<div class="d-flex flex-items-baseline">

View File

@ -2,7 +2,7 @@
* @Author : yanyongyu
* @Date : 2020-11-15 14:40:25
* @LastEditors : yanyongyu
* @LastEditTime : 2021-03-16 17:14:08
* @LastEditTime : 2021-09-10 12:42:40
* @Description : None
* @GitHub : https://github.com/yanyongyu
-->
@ -39,6 +39,18 @@ _✨ NoneBot 服务器状态CPU, Memory, Disk Usage查看插件 ✨_
配置方式:直接在 NoneBot 全局配置文件中添加以下配置项即可。
### server_status_only_superusers
- 类型: `bool`
- 默认: `True`
- 说明: 是否仅允许超级用户使用
> 超级用户需在配置文件中如下配置:
>
> ```dotenv
> SUPERUSERS=["your qq id"]
> ```
### server_status_cpu
- 类型: `bool`

View File

@ -4,7 +4,7 @@
@Author : yanyongyu
@Date : 2020-09-18 00:00:13
@LastEditors : yanyongyu
@LastEditTime : 2021-03-16 17:05:58
@LastEditTime : 2021-09-10 12:47:59
@Description : None
@GitHub : https://github.com/yanyongyu
"""
@ -23,7 +23,11 @@ from .data_source import cpu_status, per_cpu_status, memory_status, disk_usage
global_config = get_driver().config
status_config = Config(**global_config.dict())
command = on_command("状态", permission=SUPERUSER, priority=10)
command = on_command(
"状态",
permission=(status_config.server_status_only_superusers or None) and
SUPERUSER,
priority=10)
@command.handle()
@ -50,8 +54,9 @@ async def server_status(bot: Bot, matcher: Matcher):
async def _group_poke(bot: Bot, event: Event, state: T_State) -> bool:
return isinstance(event, PokeNotifyEvent) and str(
event.user_id) in global_config.superusers and event.is_tome()
return isinstance(event, PokeNotifyEvent) and event.is_tome() and (
not status_config.server_status_only_superusers or
str(event.user_id) in global_config.superusers)
group_poke = on_notice(_group_poke, priority=10, block=True)
@ -63,5 +68,9 @@ async def _poke(bot: Bot, event: Event, state: T_State) -> bool:
event.sub_type == "friend" and event.message[0].type == "poke")
poke = on_message(_poke, permission=SUPERUSER, priority=10)
poke = on_message(
_poke,
permission=(status_config.server_status_only_superusers or None) and
SUPERUSER,
priority=10)
poke.handle()(server_status)

View File

@ -4,7 +4,7 @@
@Author : yanyongyu
@Date : 2020-10-04 16:32:00
@LastEditors : yanyongyu
@LastEditTime : 2021-03-16 16:58:10
@LastEditTime : 2021-09-10 12:42:16
@Description : None
@GitHub : https://github.com/yanyongyu
"""
@ -14,6 +14,7 @@ from pydantic import BaseSettings
class Config(BaseSettings):
server_status_only_superusers: bool = True
server_status_cpu: bool = True
server_status_per_cpu: bool = False
server_status_memory: bool = True

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-status"
version = "0.2.1"
version = "0.2.2"
description = "Check your server status (CPU, Memory, Disk Usage) via nonebot"
license = "MIT"
authors = ["yanyongyu <yanyongyu_1@126.com>"]
@ -14,7 +14,7 @@ packages = [
]
[tool.poetry.dependencies]
python = "^3.7"
python = "^3.7.3"
psutil = "^5.7.2"
nonebot2 = "^2.0.0-alpha.8"