PaiGram/core
2023-02-16 16:47:48 +08:00
..
admin 🔥 Remove pymysql 2022-11-30 16:45:53 +08:00
base Support calendar 2023-02-16 16:47:48 +08:00
cookies fix: CookiesNotFoundError when setcookie 2023-01-27 11:50:47 +08:00
game ♻ Refactor ApiHelper 2022-12-10 20:37:43 +08:00
quiz 🎨 使用 black 格式化所有代码 2022-10-10 19:07:28 +08:00
search Add inline search 2022-12-04 19:56:39 +08:00
sign 支持BOT管理员获取用户自动签到信息 2022-10-12 20:11:54 +08:00
template 🎨 Improve config 2022-10-28 15:11:14 +08:00
user 🐛 Fix wrong call of UserService.add_user method 2022-12-01 18:40:02 +08:00
wiki 🎨 提高代码质量 2022-10-11 14:45:07 +08:00
baseplugin.py 🎨 Simplify Exception Log for clean_message 2022-12-30 16:49:15 +08:00
bot.py Use ChatMemberHandler to Get Chat Member Updates 2023-01-03 17:14:57 +08:00
config.py Add Allow Bind User Invite Bot 2023-01-23 21:34:58 +08:00
error.py 🎨 使用 black 格式化所有代码 2022-10-10 19:07:28 +08:00
plugin.py Update Unit Test 2023-02-11 16:29:11 +08:00
README.md ♻ 更新V3版本 2022-09-08 09:08:37 +08:00
service.py 增加用于模板预览和调试的 web server 2022-10-12 21:39:47 +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"""