PaiGram/core
2022-09-09 18:10:55 +08:00
..
admin ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
base 🎨 设置 loggermarkup 默认为 False 2022-09-08 12:57:22 +08:00
cookies 🐛 修复更新 cookies 数据时读取错误的问题 2022-09-09 18:10:55 +08:00
game ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
quiz 🐛 修复数据库没有 quiz 时启动报错 wrong number of arguments for 'lpush' command 2022-09-09 14:09:11 +08:00
sign ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
template ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
user ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
wiki ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
baseplugin.py ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
bot.py 🎨 设置 loggermarkup 默认为 False 2022-09-08 12:57:22 +08:00
config.py ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
error.py ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
plugin.py 🐛 修复一个函数无法注册多个 handler 的问题 2022-09-08 10:44:09 +08:00
README.md ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
service.py ♻ 更新V3版本 2022-09-08 09:08:37 +08:00

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"""