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.2.tar.gz
(84.1 kB
view hashes)
Built Distribution
Close
Hashes for graia_ariadne-0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8d12254279af6b21c2edb46556f587a8d340ad4cbde2e5a2f450b7a18451866 |
|
MD5 | ab20e0c5672d78c5ed8398b3a22e4c6b |
|
BLAKE2b-256 | d3c52f707665c774d6cd91166909c01a724442b56b36e4b04ff51ef3e5d65d68 |