MibooGram/core
2023-01-08 04:01:28 +08:00
..
admin
base 🎨 Add Optional Password for Redis 2023-01-05 15:36:10 +08:00
cookies
game
quiz
search
sign
template
user
wiki
baseplugin.py
bot.py Use ChatMemberHandler to Get Chat Member Updates 2023-01-03 17:14:57 +08:00
config.py 🎨 Move All user_mismatch Notice to the Aame Place 2023-01-08 04:01:28 +08:00
error.py
plugin.py Use ChatMemberHandler to Get Chat Member Updates 2023-01-03 17:14:57 +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"""