Skip to main content

一个轻量级、低耦合的基于 mirai-api-http 的 Python SDK。

Project description

YiriMirai

公告:本项目原开发者已放弃对 YiriMirai 的维护,最后一个完全支持的 mirai-api-http 版本为 2.5。如果有人愿意继续维护此项目,请与原开发者联系。

在新的维护者到来前,建议换用 Graia Ariadne 等活跃维护的项目,也请关注原开发者的下一代 QQ 无头客户端支持库 awr

本项目现由 XYCode-Kerman 进行维护,新版本将于不久后发布


Licence PyPI Python Version Document CodeFactor

一个轻量级、低耦合度的基于 mirai-api-http 的 Python SDK。

本项目适用于 mirai-api-http 2.0 以上版本

安装

从 PyPI 安装:

pip install yiri-mirai
# 或者使用 poetry
poetry add yiri-mirai

此外,你还可以克隆这个仓库到本地,然后使用 poetry 安装:

git clone git@github.com:Wybxc/YiriMirai.git
cd YiriMirai
poetry install

使用

from mirai import Mirai, FriendMessage, WebSocketAdapter

if __name__ == '__main__':
    bot = Mirai(12345678, adapter=WebSocketAdapter(
        verify_key='your_verify_key', host='localhost', port=6090
    ))

    @bot.on(FriendMessage)
    async def on_friend_message(event: FriendMessage):
        if str(event.message_chain) == '你好':
            await bot.send(event, 'Hello World!')

    bot.run()

更多信息参看文档文档镜像

社区

QQ 群:766952599(链接

Github Discussion(链接

Discord(链接

Star History Chart

开源协议

由于 mirai 及 mirai-api-http 均采用了 AGPL-3.0 开源协议,本项目同样采用 AGPL-3.0 协议。

请注意,AGPL-3.0 是传染性协议。如果你的项目引用了 YiriMirai,请在发布时公开源代码,并同样采用 AGPL-3.0 协议。

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

yiri_mirai_rc-0.2.7.2.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

yiri_mirai_rc-0.2.7.2-py3-none-any.whl (78.1 kB view details)

Uploaded Python 3

File details

Details for the file yiri_mirai_rc-0.2.7.2.tar.gz.

File metadata

  • Download URL: yiri_mirai_rc-0.2.7.2.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for yiri_mirai_rc-0.2.7.2.tar.gz
Algorithm Hash digest
SHA256 f7a50bd7138a0d32d4827d43b1a4b8bcaf6451213c373c71d974711a4fc05bb3
MD5 a345cbc47fd16fcc0b0dafed6934441d
BLAKE2b-256 16e4962d04163535e1ea77fccda4bfcc70c309d847c121ec2c5bb915bb6b5873

See more details on using hashes here.

File details

Details for the file yiri_mirai_rc-0.2.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for yiri_mirai_rc-0.2.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eaabf3fac15bea48534e7c40c59944651afaf5998268fe09dce1f19bd4aebe5a
MD5 a7866eaea481ef2580c0e8e505524c75
BLAKE2b-256 ad4226440957b9a4b559b21a0343a948f1614c668e6750365ff95a6f96d4d71b

See more details on using hashes here.

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