PaiGram/core
2022-11-03 18:33:13 +08:00
..
admin
base 🎨 Improve config 2022-10-28 15:11:14 +08:00
cookies
game
quiz
sign
template 🎨 Improve config 2022-10-28 15:11:14 +08:00
user
wiki
baseplugin.py
bot.py 🚚 Change resources repo 2022-11-03 18:33:13 +08:00
config.py Support manual pass challenge 2022-10-30 16:46:07 +08:00
error.py
plugin.py
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"""