Nonebot Plugin Alconna 0.50.0 #59
RF-Tar-Railt
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
新增
Button
与Keyboard
消息段,表示按钮元素与按钮组/按钮矩阵元素。Button
有四种 flag:action
,link
,input
,enter
Keyboard
不传入参数row
时,根据适配器情况自动选择作为一行发送或者换行成按钮矩阵Button
或 只传入Keyboard
时,根据适配器情况自动选择合并为 Keyboard 或展开为 ButtonMarkdown
, 负责专门适配QQ
适配器下的 md消息模板Markdown
只传入了参数content
, 其行为与构造Text(...).markdown()
相同UniMessage
新增若干方法:transform
&tansform_async
: 遍历消息并依据传入的规则对消息内容进行替换/验证split
: 和str.split
差不多, 提供一个字符串, 然后返回分割结果.startswith
&endswith
: 断消息链是否以给出的字符串开头/结尾removeprefix
&removesuffix
: 移除消息链前缀/后缀strip
&lstrip
&rstrip
: 去除首尾的空白字符改进
QQ
适配器的群聊场景下Reply
元素暂时会略过Extension
的 send_wrapper 现在在UniMessage.send
时会调用Full Changelog: v0.49.0...v0.50.0
This discussion was created from the release Nonebot Plugin Alconna 0.50.0.
Beta Was this translation helpful? Give feedback.
All reactions