mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +00:00
4a0168d311
为了机器人防止被滥用,或部署的服务器资源不足只能留在部分群使用,或者是私用搭建所写的一个功能 别问为啥懒得写单独认证 懒了.jpg |
||
---|---|---|
.. | ||
admin | ||
base | ||
cookies | ||
game | ||
quiz | ||
sign | ||
template | ||
user | ||
wiki | ||
baseplugin.py | ||
bot.py | ||
config.py | ||
error.py | ||
plugin.py | ||
README.md | ||
service.py |
core 目录说明
关于 Service
服务 Service
需定义在 services
文件夹下, 并继承 core.service.Service
每个 Service
都应包含 start
和 stop
方法, 且这两个方法都为异步方法
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"""