From 7a26ed7947e05261ed1124975ff153ea85aa8e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wuyi=E6=97=A0=E7=96=91?= <444835641@qq.com> Date: Sun, 26 Mar 2023 17:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E5=88=A0=E9=99=A4=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=87=AA=E5=8A=A8=E8=BF=9E=E6=8E=A5=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E8=B6=85=E6=97=B6=E9=97=AE=E9=A2=98=20(#472)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinUID/__init__.py | 7 ------- poetry.lock | 16 ++++++++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/GenshinUID/__init__.py b/GenshinUID/__init__.py index f47a82d5..6b9259ea 100644 --- a/GenshinUID/__init__.py +++ b/GenshinUID/__init__.py @@ -1,7 +1,6 @@ from typing import List, Literal, Optional from hoshino import priv -from nonebot import on_startup from hoshino.typing import CQEvent, HoshinoBot from .client import GsClient @@ -106,9 +105,3 @@ async def send_connect_msg(bot: HoshinoBot, ev: CQEvent): async def send_start_msg(bot: HoshinoBot, ev: CQEvent): if priv.check_priv(ev, priv.ADMIN): await bot.send(ev, await start()) - - -@on_startup -async def start_client(): - if gsclient is None: - await connect() diff --git a/poetry.lock b/poetry.lock index b6929032..eb44eabc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -89,19 +89,19 @@ files = [ [[package]] name = "filelock" -version = "3.10.4" +version = "3.10.6" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.10.4-py3-none-any.whl", hash = "sha256:6d332dc5c896f18ba93a21d987155e97c434a96d3fe4042ca70d0b3b46e3b470"}, - {file = "filelock-3.10.4.tar.gz", hash = "sha256:9fc1734dbddcdcd4aaa02c160dd94db5272b92dfa859b44ec8df28e160b751f0"}, + {file = "filelock-3.10.6-py3-none-any.whl", hash = "sha256:52f119747b2b9c4730dac715a7b1ab34b8ee70fd9259cba158ee53da566387ff"}, + {file = "filelock-3.10.6.tar.gz", hash = "sha256:409105becd604d6b176a483f855e7e8903c5cb2873e47f2c64f66a370c046aaf"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" @@ -421,19 +421,19 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa [[package]] name = "platformdirs" -version = "3.1.1" +version = "3.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, - {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, + {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"}, + {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"}, ] [package.extras] docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pre-commit"