MibooGram/core
2022-12-14 23:57:37 +08:00
..
admin 🔥 Remove pymysql 2022-11-30 16:45:53 +08:00
base 🐛 fix AssetsService 2022-12-07 16:40:30 +08:00
cookies Fix Cookies Cache 2022-12-14 23:57:37 +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 🎨 Update get chat info of clean_message 2022-11-29 22:17:48 +08:00
bot.py Add special handler for TypeHandler of install_plugins 2022-11-29 20:07:43 +08:00
config.py 💚 Fix pytest 2022-11-04 18:07:11 +08:00
error.py 🎨 使用 black 格式化所有代码 2022-10-10 19:07:28 +08:00
plugin.py 🐛 修复对话中 cancel 命令失效 2022-10-11 20:20: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"""