Releases: nonebot/nonebot
Releases · nonebot/nonebot
v1.9.1
28 Sep 03:29
Compare
Sorry, something went wrong.
No results found
修复上版本更新带来的 on_command 定义命令别名有时不生效的 bug
nonebot.plugin.unload_plugin 和 reload_plugin 添加 fast 参数用于可选地避免重载时重新导入模块。load_plugin(s) 添加 no_fast 参数
v1.9.0
21 Sep 02:36
Compare
Sorry, something went wrong.
No results found
修复与 node-onebot 的 at 消息段兼容问题 #272
在 1.8.0 中引入的命令权限控制系统现在已经替换了原来的权限系统 (nonebot.permission 模块),所有以 int 为类型的权限值和函数参数全部改为了 PermissionPolicy_T。尽管如此,旧代码中原权限声明常量可在继续使用
配置项增加 DEFAULT_COMMAND_PERMISSION 和 DEFAULT_NLP_PERMISSION 用于选定命令处理器和 NLP 的默认权限
现在 on_command,on_natural_language,on_notice/request 和 message_preprocessor 必须在插件定义的模块中调用以注册相应处理器。直接在 __main__ 中调用现在会提示警告并且在后续版本中移除对其的支持
重要 :通过 message_preprocessor 注册的消息预处理器在 PluginManager.remove_plugin, PluginManager.switch_plugin_global, reload_plugin 执行后也会被一并移除
新增 nonebot.plugin.PluginManager.switch_messagepreprocessor_global 用于切换消息预处理器开关
新增 nonebot.plugin.on_plugin 用于注册插件加载和卸载时的回调
新增 nonebot.plugin.unload_plugin 用于卸载插件
现在 load_plugin 和 reload_plugin 也支持运行 on_plugin 注册的回调
Plugin 类增加 userdata 属性,可在插件中由 __plugin_userdata__ 定义
本次发布新功能较多,欢迎升级并且汇报使用时遇到的问题。
v1.8.4
23 Jul 07:21
Compare
Sorry, something went wrong.
No results found
修复 on_command 中 shell_like 功能仍引用旧 API 造成的错误
v1.8.3
29 May 18:34
Compare
Sorry, something went wrong.
No results found
删除在 1.2.0 版本中弃用的 API(NLPResult, CommandSession.args, CommandSession.get_optional)
改正 BaseSession.send 的 type hint
v1.8.2
09 Jan 06:14
Compare
Sorry, something went wrong.
No results found
修复 CommandSession.apause 方法在命令过期后泄露的问题
不同命令 (on_command) 现在可以设置不同的运行和过期超时时间
v1.8.1
06 Dec 04:41
Compare
Sorry, something went wrong.
No results found
调整 CommandGroup 实际表现和文档不一致的问题。
调整自然语言处理器并发检查权限的逻辑
调整 CommandHandler_T 返回值为 Awaitable,在此之前用户会以为 on_command 可以传递同步函数而产生运行时报错
形如 on_request 的装饰器现在有了重载的类型定义,typing 中也加入 RequestHandler_T 等处理函数的类型
v1.8.0
11 Oct 03:33
Compare
Sorry, something went wrong.
No results found
CommandSession 新增 aget apause 方法, 用于 Session 的异步获取参数
新增 nonebot.experimental.permission, nonebot.experimental.plugin 模块,用于增强原有的命令权限控制系统
各模块添加了 all 常量,现在可以安全地使用 * 来导入公共的 API。
项目现在采用自动发布模式,Pypi index 会根据仓库 Release 发布新版本。