OPQBot/IOTQQ/IOTBot的Python开发助手
Project description
botoy
对机器人框架OPQ接口的 Python 封装, 因为功能模块耦合度低, 所以你可以完全使用该框架开发,也可以选取需要的内容到自己的项目中
安装
pip install botoy -i https://pypi.org/simple --upgrade
示例
如果你配置好了 OPQ,并且配置保持默认(bot 连接地址http://127.0.0.1:8086
),
下面示例可实现在收到群消息内容为 test
时回复 ok
新建文件 bot.py
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 连接成功!
文档
感谢
LICENSE
MIT
CHANGE LOG
See releases
0.0.2
- 修复模块导入错误
V0.0.1
初次发布
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
botoy-9.11.tar.gz
(41.4 kB
view details)
Built Distribution
botoy-9.11-py3-none-any.whl
(49.6 kB
view details)
File details
Details for the file botoy-9.11.tar.gz
.
File metadata
- Download URL: botoy-9.11.tar.gz
- Upload date:
- Size: 41.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f39d0c61eab66134ec7627d744aead2a4b29c6cdf39d7c5cedd03e940a37f05 |
|
MD5 | a1e67948e3e37c0a14ff8624812a538e |
|
BLAKE2b-256 | 8fc6bd338bf02c9b1e87d4ecd7e456919a2808a342b5ed969dd213e37717ad02 |
File details
Details for the file botoy-9.11-py3-none-any.whl
.
File metadata
- Download URL: botoy-9.11-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd77cfb2458e18c7319ac147feab074b7141c8a8c9fb0ab4d6080d521fcfb3f |
|
MD5 | d3822ed737d64d1df72929dcbe537314 |
|
BLAKE2b-256 | b4d5b9b1e8115fe00eb812a309a7d3f589b00175f0a6edf106de07cef6d7c807 |