https://github.com/opq-osc/botoy
OPQ/IOTQQ/IOTBot的一个Python开发助手🐌
https://github.com/opq-osc/botoy
iotbot iotqq opq opq-plugin opqbot opqbot-plugin
Last synced: 5 months ago
JSON representation
OPQ/IOTQQ/IOTBot的一个Python开发助手🐌
- Host: GitHub
- URL: https://github.com/opq-osc/botoy
- Owner: opq-osc
- License: mit
- Created: 2020-10-06T04:30:29.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T12:12:47.000Z (almost 2 years ago)
- Last Synced: 2026-01-14T12:10:26.445Z (6 months ago)
- Topics: iotbot, iotqq, opq, opq-plugin, opqbot, opqbot-plugin
- Language: Python
- Homepage: https://botoy.opqbot.com
- Size: 720 KB
- Stars: 68
- Watchers: 3
- Forks: 18
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# botoy
[](https://jq.qq.com/?_wv=1027&k=K8iQy7i7)
[](https://pypi.org/project/botoy/)
[](https://pypi.org/project/botoy/)
[](https://github.com/opq-osc/botoy)
[](https://github.com/opq-osc/botoy)
[](https://github.com/opq-osc/botoy/blob/main/LICENSE)
对机器人框架[OPQ](https://github.com/OPQBOT/OPQ/)接口的 Python 封装,
因为功能模块耦合度低, 所以你可以完全使用该框架开发,也可以选取需要的内容到自己的项目中
---
## 安装
```shell
pip install botoy -i https://pypi.org/simple --upgrade
```
## 示例
如果你配置好了 OPQ,并且配置保持默认(bot 连接地址`http://127.0.0.1:8086`),
下面示例可实现在收到群消息内容为 `test` 时回复 `ok`
新建文件 `bot.py`
```python
from botoy import bot, ctx, S
@bot
async def test():
if ctx.g and ctx.g.text == 'test':
await S.text('ok')
bot.print_receivers()
bot.run()
```
运行 `python bot.py`
```
+------+--------+-------+----------------+
| Name | Author | Usage | Meta |
+------+--------+-------+----------------+
| test | | | test.py line 4 |
+------+--------+-------+----------------+
ℹ️ 04-15 19:21:58 INFO 连接中[ws://localhost:8086/ws]...
✔️ 04-15 19:21:58 SUCCESS 连接成功!
```
# [文档](https://botoy.readthedocs.io/)
# 感谢
[yuban10703](https://github.com/yuban10703)
[milkice](https://github.com/milkice233)
# LICENSE
MIT