Another elegant Python QQ Bot framework for mirai and mirai-api-http v2.
Project description
本项目适用于 mirai-api-http 2.0 以上版本.
Ariadne 是 Graia Project
继承了 Application
并进行了许多改进后产生的作品,
相信它可以给你带来良好的 Python QQ Bot
开发体验.
注意, 本框架需要 mirai-api-http v2
.
安装
poetry add graia-ariadne
或
pip install graia-ariadne
我们强烈建议使用
poetry
进行包管理
开始使用
from graia.ariadne.app import Ariadne
from graia.ariadne.message.chain import MessageChain
from graia.ariadne.message.element import Plain
from graia.ariadne.model import Friend, MiraiSession
app = Ariadne(MiraiSession(host="http://localhost:8080", verify_key="ServiceVerifyKey", account=123456789))
@app.broadcast.receiver("FriendMessage")
async def friend_message_listener(app: Ariadne, friend: Friend):
await app.sendMessage(friend, MessageChain.create([Plain("Hello, World!")]))
app.launch_blocking()
讨论
QQ 交流群: 邀请链接
QQ 群不定时清除不活跃成员, 请自行重新申请入群.
文档
如果认为本项目有帮助, 欢迎点一个 Star
.
协议
本项目以 GNU AGPL-3.0
作为开源协议, 这意味着你需要遵守相应的规则.
持续集成 (CI) 状态
开发版资源 / 参与开发
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
graia-ariadne-0.5.3.post1.tar.gz
(87.3 kB
view hashes)
Built Distribution
Close
Hashes for graia-ariadne-0.5.3.post1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7d998484bef9414ac63f1e6d66812b554cb2335edaae75be2d030afbc8f3689 |
|
MD5 | 1c271faceb0dfafc09f41f41183192ae |
|
BLAKE2b-256 | 34bf1d6087a153d2f3e3f6b58173c01c56e100895d26cda75bab16d9fe1ffea1 |
Close
Hashes for graia_ariadne-0.5.3.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9cf5e61379473aeaecfcbffe561e09b2fe7810b18f0717c33e0deec5cc2ff0c |
|
MD5 | e047394e9ede7c77303ad7a15a5ac572 |
|
BLAKE2b-256 | 9475a5160b91e0337dd775160337195f94143e6aa82e9d7e8e443719ec51dd7a |