Nonebot-plugin-alconna

Latest version: v0.54.0

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 22

0.33.2

- 移除 `raw: RawData`, 拆分为 `raw: bytes | BytesIO` 和 `mimetype: str | None`
- `mimetype` 现在会自动检测

**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.33.1...v0.33.2

0.33.1

- 修复 `Dodo` 下 bot.call_api 参数未加关键字的问题

**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.33.0...v0.33.1

0.33.0

新增:
- 支持适配器 [`Dodo`](https://github.com/nonebot/adapter-dodo)

改进:
- 优化针对 `kook` 适配器下的 KMarkdown 的解析

**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.32.0...v0.33.0

0.32.0

What's Changed
* 添加函数 `referent`,其允许根据 alc 对象或命令名称获取对应绑定的 AlconnaMatcher:
python
from nonebot_plugin_alconna import referent
cmd = on_alconna("xxx")
...
cmd1 = referent("xxx")
assert cmd is cmd1

* 为 `AlconnaMatcher` 下的 `handle`,`got`,`got_path`,`receive` 增加参数 `override`, 以允许响应函数替换原先位置的响应或在指定位置插入新的响应函数:
python
in foo.py
cmd = on_alconna("xxx")

cmd.handle()
async def _(arp: Arparma):
await cmd.send(f"0: {(arp.options)}")

python
in bar.py
from nonebot_plugin_alconna import referent
cmd = referent("xxx")

cmd.handle(override=("replace", 0))
async def _(arp: Arparma):
await cmd.send(f"1: {(arp.options)}")

cmd.handle(override=("insert", 0))
async def _(arp: Arparma):
await cmd.send(f"2: {(arp.options)}")

* `got`,`got_path` 的消息来源现在由 Extension 完成
* `receive` 的 `id` 参数为空的时候 `AlconnaMatcher` 会使用 `UniMessage.get_message_id`
* `got_path` 现在使用第一个消息段
* :arrow_up: auto update by pre-commit hooks by pre-commit-ci in https://github.com/nonebot/plugin-alconna/pull/23


**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.31.7...v0.32.0

0.31.7

- `UniMessage` 的 `get_message_id`, `get_target`, `send`的 `event` 参数因现在会读取上下文而变为可选
- `UniMessage` 的 `get_message_id`, `get_target` 增加参数 `adapter: str`,与 `bot` 为二选一

**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.31.6...v0.31.7

0.31.6

- 为 `UniMessage` 增加了创建 Segment 的快捷方法:
python
msg = UniMessage.reply("123").text("Hello!").image(path="path/to/img")
assert msg == UniMessage([Reply("123"), "Hello!", Image(path="path/to/img")])


**Full Changelog**: https://github.com/nonebot/plugin-alconna/compare/v0.31.5...v0.31.6

Page 12 of 22

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.