配置
修改 NoneBot 配置文件 .env 或者 .env.*。
Driver
参考 driver 配置项,添加 HTTPClient 和 WebSocketClient 支持。
如:
DRIVER=~aiohttp
websockets 驱动器存在一些问题,建议使用 aiohttp 驱动器。
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卡片消息
发送图片和视频所需要的链接通过
Bot.set_resouce_picture_upload接口来上传,返回结果中的的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私信事件
Metadata
Release files for nonebot-adapter-dodo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_adapter_dodo-0.1.0.tar.gz | 19.1 kB | Without provenance | Details for nonebot_adapter_dodo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_adapter_dodo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_adapter_dodo-0.1.0-py3-none-any.whl |
Total release size: 39.7 kB
Release files / nonebot_adapter_dodo-0.1.0.tar.gz
| Download URL | nonebot_adapter_dodo-0.1.0.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac278809c06133b1183d57f8385c473c6f403655791ccc280a8e2f61d50209ae
|
|
BLAKE2b-256 checksum How to use checksums |
a1fceeb26d747b2d7a1a78ef56196052755474b0ffafb6cec100f55dd48db6d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / nonebot_adapter_dodo-0.1.0-py3-none-any.whl
| Download URL | nonebot_adapter_dodo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98bbc544c8bd4cbca6cdc03aefb1868fb428cc535752db7a508bc417db46ee55
|
|
BLAKE2b-256 checksum How to use checksums |
7da4f3772e4eff28239e911950e6eb58e73ade9ecdfef408f1a500be972eadd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for nonebot-adapter-dodo 0.1.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.