Skip to main content

A framework for OICQ(QQ, made by Tencent) headless client "Mirai".

Project description

基于 kuriyama(Python SDK v3)的修改版本

这是什么?

以 OICQ(QQ) 协议驱动的高性能机器人开发框架 Mirai 的 Python 接口, 通过其提供的 HTTP API 与无头客户端 Mirai 交互.

开始使用

从 Pypi 安装

pip install kuriyama-lxnet

开始开发

由于 python-mirai 依赖于 mirai 提供的 mirai-http-api 插件, 所以你需要先运行一个 mirai-core 或是 mirai-console 实例以支撑你的应用运行.

仓库地址: https://github.com/Lxns-Network/mirai-python-sdk

依赖版本

app = Mirai( host = “127.0.0.1”, port = “8880”, authKey = “INITKEY”, qq = “114514”, websocket = True )

@app.receiver(“FriendMessage”) async def _(app: Mirai, friend: Friend, message: MessageChain): pass

@app.receiver(“GroupMessage”) async def _(app: Mirai, group: Group, member: Member, message: MessageChain, source: Source): await app.sendGroupMessage(group, [ Plain(text=”收到消息:” + message.toString()) ], quoteSource=source) return True

@app.receiver(“BotInvitedJoinGroupRequestEvent”) async def _(app: Mirai, event: BotInvitedJoinGroupRequestEvent): await app.respondRequest(event, 1) # 自动同意入群邀请 return True

@app.receiver(“AppInitEvent”) async def _(app: Mirai): print(“应用初始化完成,您可以在此直接获取到 app”)

if name == “main“: app.run() ```

许可证

我们使用 `GNU AGPLv3 <https://choosealicense.com/licenses/agpl-3.0/>`__ 作为本项目的开源许可证, 而由于原项目 `mirai <https://github.com/mamoe/mirai>`__ 同样使用了 GNU AGPLv3 作为开源许可证, 因此你在使用时需要遵守相应的规则.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kuriyama-lxnet-1.3.0.tar.gz (38.7 kB view hashes)

Uploaded Source

Built Distribution

kuriyama_lxnet-1.3.0-py3-none-any.whl (44.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page