Skip to main content

NoneBot-Adapter-DoDo

✨ DoDo 协议适配 ✨

配置

修改 NoneBot 配置文件 .env 或者 .env.*。

Driver

参考 driver 配置项,添加 HTTPClient 和 WebSocketClient 支持。

如:

DRIVER=~aiohttp
# 或
DRIVER=~httpx+~websockets

DODO_BOTS

暂只支持 WebSocket 连接, WebHook 开发中,请先使用 WebSocket 连接模式

从DoDo开放平台创建机器人,获取 client_id 和 token,并在配置文件中配置机器人帐号列表。如:

DODO_BOTS='
[
  {
    "client_id": "xxx",
    "token": "xxx"
  }
]
'

使用

支持消息段

可收发:

  • MessageSegment.text 文本(支持Markdown)
  • MessageSegment.at_user @用户
  • MessageSegment.channel_link 跳转频道
  • MessageSegment.reference 引用(回复)消息
  • MessageSegment.picture 图片
  • MessageSegment.video 视频
  • MessageSegment.card 卡片消息

发送图片和视频所需要的 url 都必须为官方 url 图片可通过 Bot.set_resouce_picture_upload 接口来上传图片bytes,返回结果中的 url 即为发送所需的 url。 视频尚未提供上传接口,因此只能上传来自平台事件中带有的官方视频 url。

图片和视频只能单独发送,不能和其他消息段一起发送。卡片消息可以和文本消息段一起发送。

仅支持接收:

  • type:at_role: 艾特身份组
  • type:at_all: 艾特所有人
  • type:share: 分享消息
  • type:file: 文件消息
  • type:red_packet: 红包消息

支持事件

  • ChannelMessageEvent 频道消息事件
  • MessageReactionEvent 消息表情反应事件
  • CardMessageButtonClickEvent 卡片消息按钮点击事件
  • CardMessageFormSubmitEvent 卡片消息表单回传事件
  • CardMessageListSubmitEvent 卡片消息列表回传事件
  • ChannelVoiceMemberJoinEvent 成员加入语音频道事件
  • ChannelVoiceMemberLeaveEvent 成员退出语音频道事件
  • ChannelArticleEvent 帖子发布事件
  • ChannelArticleCommentEvent 帖子评论回复事件
  • MemberJoinEvent 成员加入事件
  • MemberLeaveEvent 成员离开事件
  • MemberInviteEvent 成员邀请事件
  • GiftSendEvent 赠礼成功事件
  • IntegralChangeEvent 积分变更事件
  • GoodsPurchaseEvent 商品购买成功事件
  • PersonalMessageEvent 私信事件

支持的 API 列表请参考 DoDo开放平台。

Metadata

Release files for nonebot-adapter-dodo 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-adapter-dodo 0.2.0
File Size Uploaded Provenance Actions
nonebot_adapter_dodo-0.2.0.tar.gz 19.1 kB Without provenance Details for nonebot_adapter_dodo-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-adapter-dodo 0.2.0
File Interpreter ABI Platform Actions
nonebot_adapter_dodo-0.2.0-py3-none-any.whl Python 3 none any Details for nonebot_adapter_dodo-0.2.0-py3-none-any.whl

Total release size: 40.1 kB

Release files / nonebot_adapter_dodo-0.2.0.tar.gz

Download URL nonebot_adapter_dodo-0.2.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
14948b0c4d43509b7b72f3789a71b41b603244d346b5a5a7de6d6ef52866d0ea
BLAKE2b-256 checksum
How to use checksums
4228e5a5f960809a8e7eabcb5979a5ed1d352a9c69624da07eede54f3d08773f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / nonebot_adapter_dodo-0.2.0-py3-none-any.whl

Download URL nonebot_adapter_dodo-0.2.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c82804e00b556ca246a83bf6b2281e7227983ec5a3c24d92329479e2473017fd
BLAKE2b-256 checksum
How to use checksums
b243a0a97be8e9a6e37a497037302c6de279329b58f78d2bcef7fe98309873ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Security for nonebot-adapter-dodo 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page