PaiGram/core
洛水居室 3839d00a95
Update Unit Test
Co-authored-by: xtaodada <xtao@xtaolink.cn>
2023-02-11 16:29:11 +08:00
..
admin
base 🎨 Add Optional Password for Redis 2023-01-05 15:36:10 +08:00
cookies fix: CookiesNotFoundError when setcookie 2023-01-27 11:50:47 +08:00
game
quiz
search
sign
template
user
wiki
baseplugin.py
bot.py
config.py Add Allow Bind User Invite Bot 2023-01-23 21:34:58 +08:00
error.py
plugin.py Update Unit Test 2023-02-11 16:29:11 +08:00
README.md
service.py

core 目录说明

关于 Service

服务 Service 需定义在 services 文件夹下, 并继承 core.service.Service

每个 Service 都应包含 startstop 方法, 且这两个方法都为异步方法

from core.service import Service


class TestService(Service):
    def __init__(self):
        """do something"""

    async def start(self, *args, **kwargs):
        """do something"""

    async def stop(self, *args, **kwargs):
        """do something"""