PaiGram/core
2022-10-22 15:49:20 +08:00
..
admin
base
cookies
game 🐛 修复部分角色攻略未找到的问题 2022-10-14 21:17:53 +08:00
quiz
sign
template 增加 html to image 的缓存 2022-10-22 15:03:59 +08:00
user
wiki
baseplugin.py
bot.py 🔧 添加超时配置项 2022-10-22 15:49:20 +08:00
config.py 🔧 添加超时配置项 2022-10-22 15:49:20 +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"""