{"id":20390315,"url":"https://github.com/nonebot/plugin-alconna","last_synced_at":"2026-01-12T08:46:00.796Z","repository":{"id":182800013,"uuid":"669093378","full_name":"nonebot/plugin-alconna","owner":"nonebot","description":"强大的 Nonebot2 命令匹配拓展，支持富文本/多媒体解析，跨平台消息收发","archived":false,"fork":false,"pushed_at":"2025-12-18T16:09:20.000Z","size":2246,"stargazers_count":130,"open_issues_count":5,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-20T20:14:18.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nonebot.dev/docs/next/best-practice/alconna","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonebot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"nonebot","custom":["https://afdian.com/@nonebot"]}},"created_at":"2023-07-21T10:20:08.000Z","updated_at":"2025-12-19T10:52:20.000Z","dependencies_parsed_at":"2023-12-18T23:06:07.768Z","dependency_job_id":"c57cf6d2-6169-4705-ab86-462f1687d4d5","html_url":"https://github.com/nonebot/plugin-alconna","commit_stats":{"total_commits":354,"total_committers":12,"mean_commits":29.5,"dds":"0.16384180790960456","last_synced_commit":"2354b479b11e8a5d7b2c2cd6f42ef215fada156e"},"previous_names":["nonebot/plugin-alconna"],"tags_count":170,"template":false,"template_full_name":null,"purl":"pkg:github/nonebot/plugin-alconna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-alconna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-alconna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-alconna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-alconna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonebot","download_url":"https://codeload.github.com/nonebot/plugin-alconna/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonebot%2Fplugin-alconna/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:24:10.451Z","updated_at":"2026-01-12T08:46:00.783Z","avatar_url":"https://github.com/nonebot.png","language":"Python","funding_links":["https://opencollective.com/nonebot","https://afdian.com/@nonebot"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nonebot.dev/docs/next/best-practice/alconna/\"\u003e\u003cimg src=\"https://v2.nonebot.dev/logo.png\" width=\"200\" height=\"200\" alt=\"nonebot\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# NoneBot Plugin Alconna\n\n_✨ Alconna Usage For NoneBot2 ✨_\n\n_✨ All Receive in One, And One Send All ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/nonebot/plugin-alconna/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/nonebot/plugin-alconna.svg\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/nonebot-plugin-alconna\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/nonebot-plugin-alconna.svg\" alt=\"pypi\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\"\u003e\n\u003c/p\u003e\n\n该插件提供了 [Alconna](https://github.com/ArcletProject/Alconna) 的 [NoneBot2](https://github.com/nonebot/nonebot2) 适配版本与工具\n\n## 特性\n\n- 完整的 Alconna 特性支持\n- 自动回复命令帮助信息选项\n- 跨平台的接收与发送消息(被动+主动)\n- 对**22种适配器**的收发消息支持\n- 比 `got-reject` 更强大的补全会话机制\n- 多种内置插件 (echo，help，lang)\n- i18n 支持\n\n## 讨论\n\nQQ 交流群: [链接](https://jq.qq.com/?_wv=1027\u0026k=PUPOnCSH)\n\n\n## 使用方法\n\nNoneBot 文档: [📖这里](https://nonebot.dev/docs/next/best-practice/alconna/)\n仓库内介绍: [📦这里](/docs.md)\n\n## 跨平台消息\n\n```python\nfrom nonebot import get_driver\nfrom nonebot_plugin_alconna import Target, UniMessage, SupportScope, on_alconna, message_recall\n\ndriver = get_driver()\ntest = on_alconna(\"test\")\n\n@test.handle()\nasync def handle_test():\n    r = await UniMessage.image(path=\"path/to/img\").send()\n    if r.recallable:\n        await r.reply(\"图片已发送，10秒后撤回\")\n        await r.recall(delay=10, index=0)\n\n@test.got(\"foo\", prompt=UniMessage.template(\"{:Reply($message_id)}请输入图片\"))\nasync def handle_foo():\n    await test.send(\"图片已收到, 即将撤回\")\n    await message_recall()\n\n@driver.on_startup\nasync def _():\n    await Target.group(\"123456789\", SupportScope.qq_client).send(UniMessage.image(path=\"test.png\"))\n```\n\n## 支持情况\n\n### 支持的适配器\n\n| 协议名称                                                                   | 路径                                   |\n|------------------------------------------------------------------------|--------------------------------------|\n| [OneBot 协议](https://onebot.dev/)                                       | adapters.onebot11, adapters.onebot12 |\n| [Telegram](https://core.telegram.org/bots/api)                         | adapters.telegram                    |\n| [飞书](https://open.feishu.cn/document/home/index)                       | adapters.feishu                      |\n| [GitHub](https://docs.github.com/en/developers/apps)                   | adapters.github                      |\n| [QQ bot](https://github.com/nonebot/adapter-qq)                        | adapters.qq                          |\n| [钉钉](https://open.dingtalk.com/document/)                              | adapters.ding                        |\n| [Console](https://github.com/nonebot/adapter-console)                  | adapters.console                     |\n| [开黑啦](https://developer.kookapp.cn/)                                   | adapters.kook                        |\n| [Mirai](https://docs.mirai.mamoe.net/mirai-api-http/)                  | adapters.mirai                       |\n| [Ntchat](https://github.com/JustUndertaker/adapter-ntchat)             | adapters.ntchat                      |\n| [MineCraft](https://github.com/17TheWord/nonebot-adapter-minecraft)    | adapters.minecraft                   |\n| [Walle-Q](https://github.com/onebot-walle/nonebot_adapter_walleq)      | adapters.onebot12                    |\n| [Discord](https://github.com/nonebot/adapter-discord)                  | adapters.discord                     |\n| [Red 协议](https://github.com/nonebot/adapter-red)                       | adapters.red                         |\n| [Satori](https://github.com/nonebot/adapter-satori)                    | adapters.satori                      |\n| [Dodo IM](https://github.com/nonebot/adapter-dodo)                     | adapters.dodo                        |\n| [Kritor](https://github.com/nonebot/adapter-kritor)                    | adapters.kritor                      |\n| [Tailchat](https://github.com/eya46/nonebot-adapter-tailchat)          | adapters.tailchat                    |\n| [Mail](https://github.com/mobyw/nonebot-adapter-mail)                  | adapters.mail                        |\n| [微信公众号](https://github.com/YangRucheng/nonebot-adapter-wxmp)           | adapters.wxmp                        |\n| [黑盒语音](https://github.com/lclbm/adapter-heybox)                        | adapters.heybox                      |\n| [Milky](https://github.com/nonebot/adapter-milky)                      | adapters.milky                       |\n| [EFChat](https://github.com/molanp/nonebot_adapter_efchat)             | adapters.efchat                      |\n| [B站直播间](https://github.com/MingxuanGame/nonebot-adapter-bilibili-live) | adapters.bililive                    |                                      |\n\n\n### 支持的消息元素\n\n- ✅: 支持(接收和发送)\n- ⬇️: 支持接收\n- ⬆️: 支持发送\n- ➖: 情况不存在\n- ❌: 插件/适配器未支持\n- 🚫: 协议未支持\n- (🚧): 计划中或部分支持或为实验性支持\n\n\u003e [!WARNING]\n\u003e 斜体的协议名称意味着其协议或其适配器长时间未维护或已失效\n\n| 元素\\适配器           | OneBot V11 | OneBot V12 | Telegram | 飞书 | Github | QQ-API | _钉钉_ | Console | 开黑啦 | Mirai | _Ntchat_ | MineCraft | Discord | _Red_ | Satori | Dodo IM | _Kritor_ | Tailchat | Mail | 微信公众号 | 黑盒语音 | Milky | EFChat | B站直播间 |\n|------------------|------------|------------|----------|----|--------|--------|------|---------|-----|-------|----------|-----------|---------|-------|--------|---------|----------|----------|------|-------|------|-------|--------|-------|\n| 文本 Text          | ✅          | ✅          | ✅        | ✅  | ✅      | ✅      | ✅    | ✅       | ✅   | ✅     | ✅        | ✅         | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ✅    | ✅     | ✅    | ✅     | ✅      | ✅     |\n| 样式文本 Styled Text | 🚫         | 🚫         | ✅        | ❌  | ✅      | ✅      | ❌    | ✅       | ✅   | 🚫    | 🚫       | ✅         | 🚫      | 🚫    | ✅      | 🚫      | 🚫       | ✅        | ✅    | 🚫    | 🚫   | 🚫    | ❌      | 🚫    | \n| 提及用户 At(user)    | ✅          | ✅          | ✅        | ✅  | ⬆️     | ✅      | ✅    | 🚫      | ✅   | ✅     | ❌        | 🚫        | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ⬆️   | 🚫    | ⬆️   | ✅     | ✅      | ✅     |\n| 提及角色 At(role)    | 🚫         | 🚫         | 🚫       | 🚫 | 🚫     | 🚫     | 🚫   | 🚫      | ✅   | 🚫    | 🚫       | 🚫        | ✅       | 🚫    | ✅      | ✅       | 🚫       | 🚫       | 🚫   | 🚫    | 🚫   | 🚫    | 🚫     | 🚫    |\n| 提及频道 At(channel) | 🚫         | 🚫         | 🚫       | 🚫 | 🚫     | ✅      | 🚫   | 🚫      | ✅   | 🚫    | 🚫       | 🚫        | ✅       | 🚫    | ✅      | ✅       | 🚫       | ✅        | ⬆️   | 🚫    | 🚫   | 🚫    | 🚫     | 🚫    |\n| 提及全体 AtAll       | ✅          | ✅          | 🚫       | ✅  | 🚫     | ✅      | ✅    | 🚫      | ✅   | ✅     | 🚫       | 🚫        | ✅       | ✅     | ✅      | ✅       | ✅        | 🚫       | 🚫   | 🚫    | 🚫   | ✅     | 🚫     | 🚫    |\n| 表情 Emoji         | ✅          | 🚫         | ✅        | 🚫 | 🚫     | ✅      | 🚫   | ✅       | ✅   | ✅     | 🚫       | 🚫        | ✅       | ✅     | 🚫     | 🚫      | ✅        | ✅        | 🚫   | ✅     | 🚫   | ✅     | 🚫     | ✅     |\n| 图片 Image         | ✅          | ✅          | ✅        | ✅  | ⬆️     | ✅      | ✅    | 🚫      | ✅   | ✅     | ✅        | ❌         | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ✅    | ✅     | ⬆️   | ✅     | ✅      | 🚫    |\n| 音频 Audio         | ⬆️         | ✅          | ✅        | ✅  | 🚫     | ✅      | 🚫   | 🚫      | ✅   | ⬆️    | ⬇️       | 🚫        | ⬆️      | ⬆️    | ✅      | 🚫      | ⬆️       | 🚫       | ✅    | ✅     | 🚫   | ⬆️    | ⬆️     | 🚫    |\n| 语音 Voice         | ✅          | ✅          | ✅        | ⬆️ | 🚫     | ⬆️     | 🚫   | 🚫      | ⬆️  | ✅     | ⬇️       | 🚫        | ⬆️      | ✅     | ⬆️     | 🚫      | ✅        | 🚫       | ✅    | ✅     | 🚫   | ✅     | ✅      | 🚫    |\n| 视频 Video         | ✅          | ✅          | ✅        | ✅  | 🚫     | ✅      | 🚫   | 🚫      | ✅   | ✅     | ✅        | 🚫        | ⬆️      | ✅     | ✅      | ✅       | ✅        | 🚫       | ✅    | ✅     | 🚫   | ✅     | 🚫     | 🚫    |\n| 文件 File          | ⬇️,⬆️(🚧)  | ✅          | ✅        | ✅  | 🚫     | ✅      | 🚫   | 🚫      | ✅   | ✅     | ✅        | 🚫        | ⬆️      | ✅     | ✅      | ⬇️      | ⬇️       | ✅        | ✅    | 🚫    | 🚫   | ⬆️    | 🚫     | 🚫    |\n| 回复 Reply         | ✅          | ✅          | ✅        | ✅  | 🚫     | ✅      | 🚫   | 🚫      | ✅   | ✅     | ✅        | 🚫        | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ✅    | 🚫    | ⬆️   | ✅     | ⬆️     | ⬆️    |\n| 引用转发 Reference   | ✅          | 🚫         | 🚫       | ❌  | 🚫     | 🚫     | 🚫   | 🚫      | 🚫  | ✅     | 🚫       | 🚫        | 🚫      | ✅     | ✅      | 🚫      | ✅        | 🚫       | 🚫   | 🚫    | 🚫   | ✅     | 🚫     | 🚫    |\n| 超级消息 Hyper       | ✅          | 🚫         | 🚫       | ⬇️ | 🚫     | ✅      | 🚫   | 🚫      | ✅   | ✅     | ✅        | 🚫        | 🚫      | ✅     | 🚫     | 🚫      | ✅        | 🚫       | 🚫   | ✅     | 🚫   | ⬇️    | 🚫     | 🚫    |\n| 按钮 Button        | 🚫         | 🚫         | ⬆️       | 🚫 | 🚫     | ✅      | 🚫   | 🚫      | 🚫  | 🚫    | 🚫       | ⬆️        | ✅       | 🚫    | ✅      | 🚫      | ✅        | 🚫       | 🚫   | 🚫    | 🚫   | 🚫    | 🚫     | 🚫    |\n| 其余 Other         | ✅          | ✅          | ✅        | ✅  | ➖      | ✅      | ✅    | ➖       | ✅   | ✅     | ✅        | ➖         | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ➖    | ✅     | ➖    | ✅     | ➖      | ➖     |\n\n\n### 支持的消息操作\n\n- ✅: 支持\n- ❌: 插件/适配器未支持\n- 🚫: 协议未支持\n- (🚧): 计划中或部分支持或为实验性支持\n\n\u003e [!WARNING]\n\u003e 斜体的协议名称意味着其协议或其适配器长时间未维护或已失效\n\n| 操作\\适配器        | OneBot V11 | OneBot V12 | Telegram | 飞书 | Github | QQ-API | _钉钉_ | Console | 开黑啦 | Mirai | _Ntchat_ | MineCraft | Discord | _Red_ | Satori | Dodo IM | _Kritor_ | Tailchat | Mail | 微信公众号 | 黑盒语音 | Milky | EFChat | B站直播间 |\n|---------------|------------|------------|----------|----|--------|--------|------|---------|-----|-------|----------|-----------|---------|-------|--------|---------|----------|----------|------|-------|------|-------|--------|-------|\n| 发送 Send       | ✅          | ✅          | ✅        | ✅  | ✅      | ✅      | ✅    | ✅       | ✅   | ✅     | ✅        | ✅         | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | ✅    | ✅     | ✅    | ✅     | ✅      | ✅     |\n| 撤回 Recall     | ✅          | ✅          | ✅        | ✅  | ❌      | ✅      | ❌    | 🚫      | ✅   | ✅     | ❌        | 🚫        | ✅       | ✅     | ✅      | ✅       | ✅        | ✅        | 🚫   | 🚫    | 🚫   | ✅     | 🚫     | 🚫    |\n| 编辑 Edit       | 🚫         | 🚫         | ✅        | ✅  | ❌      | 🚫     | ❌    | 🚫      | ✅   | 🚫    | 🚫       | 🚫        | ✅       | 🚫    | ✅      | ✅       | 🚫       | 🚫       | ❌    | 🚫    | 🚫   | 🚫    | 🚫     | 🚫    |\n| 表情响应 Reaction | ✅(🚧)      | 🚫         | ✅        | ✅  | ❌      | ✅      | 🚫   | 🚫      | ✅   | 🚫    | 🚫       | 🚫        | ✅       | 🚫    | ✅      | ✅       | ✅        | ❌        | 🚫   | 🚫    | 🚫   | ✅     | 🚫     | 🚫    |\n\n\n## 配置项\n\n- ALCONNA_AUTO_SEND_OUTPUT : 是否全局启用输出信息自动发送\n- ALCONNA_USE_COMMAND_START : 是否将 COMMAND_START 作为全局命令前缀\n- ALCONNA_GLOBAL_COMPLETION: 全局的补全会话配置 (不代表全局启用补全会话)\n- ALCONNA_USE_ORIGIN: 是否全局使用原始消息 (即未经过 to_me 等处理的)\n- ALCONNA_USE_PARAM: 是否使用特制的 Param 提供更好的依赖注入\n- ALCONNA_USE_CMD_SEP: 是否将 COMMAND_SEP 作为全局命令分隔符\n- ALCONNA_GLOBAL_EXTENSIONS: 全局加载的扩展, 路径以 . 分隔, 如 foo.bar.baz:DemoExtension\n- ALCONNA_CONTEXT_STYLE: 全局命令上下文插值的风格，None 为关闭，bracket 为 {...}，parentheses 为 $(...)\n- ALCONNA_ENABLE_SAA_PATCH: 是否启用 SAA 补丁\n- ALCONNA_APPLY_FILEHOST: 是否启用文件托管\n- ALCONNA_APPLY_FETCH_TARGETS: 是否启动时拉取一次发送对象列表\n- ALCONNA_BUILTIN_PLUGINS: 需要加载的alc内置插件集合\n- ALCONNA_CONFLICT_RESOLVER: 命令冲突解决策略，default 为保留两个命令，raise 为抛出异常，ignore 为忽略新命令，replace 为替换旧命令\n- ALCONNA_RESPONSE_SELF: 是否允许响应自己的消息\n- ALCONNA_CACHE_MESSAGE: 是否缓存消息\n\n## 插件示例\n\n[demo bot](./example/plugins/demo.py)\n\n```python\n# echo 插件\nfrom nonebot_plugin_alconna import UniMessage, Command\n\n@Command(\"echo \u003c...content\u003e\").build(auto_send_output=True).handle()\nasync def _(content: UniMessage):\n    await content.finish()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fplugin-alconna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonebot%2Fplugin-alconna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonebot%2Fplugin-alconna/lists"}