PaiGram/core/README.md
Karako 8f424bf0d4
♻ 更新V3版本
♻️ 重构插件系统
⚙️ 重写插件
🎨 改进代码结构
📝 完善文档

Co-authored-by: zhxy-CN <admin@owo.cab>
Co-authored-by: 洛水居室 <luoshuijs@outlook.com>
Co-authored-by: xtaodada <xtao@xtaolink.cn>
Co-authored-by: Li Chuangbo <im@chuangbo.li>
2022-09-08 09:08:37 +08:00

22 lines
496 B
Markdown

# core 目录说明
## 关于 `Service`
服务 `Service` 需定义在 `services` 文件夹下, 并继承 `core.service.Service`
每个 `Service` 都应包含 `start``stop` 方法, 且这两个方法都为异步方法
```python
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"""
```