nonebot2/docs/changelog.md
2018-12-21 23:39:45 +08:00

49 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebar: auto
---
# 更新日志
## next
- 修复调用不存在的多级命令(例如 `/echo/nonexist`)时,抛出异常导致 WebSocket 连接断开的问题
## v0.4.3
- 自然语言处理器支持响应只有机器人昵称而没有实际内容的消息,通过 `on_natural_language``allow_empty_message` 参数开启(默认关闭)
## v0.4.2
- 修复命令处理器中抛出异常导致运行超时 `SESSION_RUN_TIMEOUT` 不生效的问题
## v0.4.1
- `load_plugins()` 导入模块失败时打印错误信息,且日志级别从 warning 改为 error
- 修复 `CommandName_T` 的问题
- 修复特权命令在不满足 `to_me` 条件时没有被当做现有 session 的新参数的问题
## v0.4.0
- `message_preprocessor` 装饰器现要求被装饰函数接收 `bot``ctx` 两个参数
- 调整了 Type Hint使其更准确并新增 `none.typing` 模块,提供部分常用类型
- 规范部分模块的导入,现可通过 `none.Message` 访问 `aiocqhttp.Message`,通过 `none.CQHttpError` 访问 `aiocqhttp.Error`
## v0.3.2
- `none.message` 模块现已导入所有 `aiocqhttp.message` 中的内容,因此不必再从后者导入 `Message`、`escape` 等类和函数
- 命令的运行加入了超时机制,可通过 `SESSION_RUN_TIMEOUT` 配置,类型为 `datetime.timedelta`,默认为 `None` 表示永不超时
- `on_command` 装饰器新增 `privileged` 参数,可将命令设置为特权命令,特权命令即使在已存在其它 CommandSession 的情况下也会运行,但它不会覆盖当前 CommandSession
- 新增 `none.command.kill_current_session()` 函数用于杀死当前已存在的 CommandSession不会终止已经在运行的命令但会移除 session 对象)
## v0.3.1
- 调整计划任务的启动时间,修复创建任务后无法立即获取下次运行时间的 bug
## v0.3.0
- 内置可选的计划任务功能(需要安装 APScheduler
## v0.2.2
- 修复快速的连续消息导致报错问题 [#5](https://github.com/richardchien/none-bot/issues/5)