Another elegant framework for mirai and mirai-api-http v2.
Reason this release was yanked:
Twilight bugged
Project description
Ariadne
Another elegant framework for mirai and mirai-api-http v2.
接受当下, 面向未来.
本项目适用于 mirai-api-http 2.0 以上版本.
一个适用于 mirai-api-http v2
的 Python 开发框架.
安装
poetry add graia-ariadne
或
pip install graia-ariadne
开始使用
import asyncio
from graia.broadcast import Broadcast
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
loop = asyncio.new_event_loop()
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!")]))
loop.run_until_complete(app.lifecycle())
更多信息请看 文档.
讨论
QQ 交流群: 邀请链接
文档
协议
本项目以GNU AGPLv3
作为开源协议, 这意味着你需要遵守相应的规则.
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.4.0.tar.gz
(57.3 kB
view hashes)
Built Distribution
Close
Hashes for graia_ariadne-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7edf882434e6cb6213de4465c1d197b9e11b44e7bd8513aa2a4a42feb432a6eb |
|
MD5 | fea2c1a6a44e2e104d8a4e1dbfd432fe |
|
BLAKE2b-256 | ffa3e4ea1b63ae2243f2131523acb0d56494a7846228fe1ad5b13b2739cbc226 |