botoy-8.5
8.5
8.4
8.3
8.2.4
8.2.3
8.2.2
8.2.1
8.2.0
8.1.0
8.0.1
8.0.0
7.9
7.8
7.7
7.6
7.5
7.4
7.3
7.2
7.18
7.17
7.16
7.15
7.14
7.13
7.12
7.11
7.10
7.1
7.0
6.9
6.8
6.7
6.6
6.5
6.4
6.3
6.2
6.10
6.1
6.0
5.0
4.9
4.8
4.7
4.6
4.5
4.4
4.3
4.2
4.1
4.0
3.1
3.0
2.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.20
0.0.2
0.0.19
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
8.5
8.4
8.3
8.2.4
8.2.3
8.2.2
8.2.1
8.2.0
8.1.0
8.0.1
8.0.0
7.9
7.8
7.7
7.6
7.5
7.4
7.3
7.2
7.18
7.17
7.16
7.15
7.14
7.13
7.12
7.11
7.10
7.1
7.0
6.9
6.8
6.7
6.6
6.5
6.4
6.3
6.2
6.10
6.1
6.0
5.0
4.9
4.8
4.7
4.6
4.5
4.4
4.3
4.2
4.1
4.0
3.1
3.0
2.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.20
0.0.2
0.0.19
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
توضیحات
OPQBot/IOTQQ/IOTBot的Python开发助手
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | botoy-8.5 |
| نام | botoy |
| نسخه کتابخانه | 8.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | wongxy |
| ایمیل نویسنده | xiyao.wong@foxmail.com |
| آدرس صفحه اصلی | https://github.com/xiyaowong/botoy |
| آدرس اینترنتی | https://pypi.org/project/botoy/ |
| مجوز | MIT |
# botoy
<!-- [](https://jq.qq.com/?_wv=1027&k=fBx8LvmA) -->
[](https://pypi.org/project/botoy/)
[](https://pypi.org/project/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:8888`),
下面一行代码即可监听消息,并在收到群消息或好友消息内容为 test 时回复 ok
```python
__import__('botoy').Botoy().on_group_msg(lambda ctx: __import__('botoy').Action(ctx.CurrentQQ).sendGroupText(ctx.FromGroupId, 'ok') if ctx.Content == 'test' else None).on_friend_msg(lambda ctx: __import__('botoy').Action(ctx.CurrentQQ).sendFriendText(ctx.FromUin, 'ok') if ctx.Content == 'test' else None).run()
```
当然上面的写法明显不常规,要实现和上面相同的功能,一般这样写
```python
from botoy import Botoy, S
from botoy.decorators import equal_content
@equal_content("test")
def test(_):
S.text("ok")
Botoy().on_group_msg(test).on_friend_msg(test).run()
```
# [文档](https://botoy.readthedocs.io/)
# [简单例子](https://github.com/opq-osc/botoy-plugins)
# [插件模板](https://github.com/opq-osc/botoy-plugin-template)
# 感谢
[yuban10703](https://github.com/yuban10703)
[milkice](https://github.com/milkice233)
# LICENSE
MIT
# CHANGE LOG
# See [releases](https://github.com/xiyaowong/botoy/releases)
## 0.0.2
- 修复模块导入错误
## V0.0.1
初次发布
نیازمندی
| مقدار | نام |
|---|---|
| - | httpx |
| <5.0.0 | python-socketio |
| <4.0.0 | python-engineio |
| - | websocket-client |
| - | loguru |
| - | click |
| - | aiohttp |
| - | prettytable |
| - | apscheduler |
| - | pydantic |
| - | colorama |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl botoy-8.5:
pip install botoy-8.5.whl
نصب پکیج tar.gz botoy-8.5:
pip install botoy-8.5.tar.gz