Skip to content

Commit

Permalink
🐛 version 0.30.6
Browse files Browse the repository at this point in the history
fix followed blank
  • Loading branch information
RF-Tar-Railt committed Oct 26, 2023
1 parent 1b0c529 commit 402214a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions example/bot.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import nonebot

# from nonebot.adapters.qq import Adapter as QQAdapter
from nonebot.adapters.onebot.v12 import Adapter as ONEBOT_V12Adapter

nonebot.init()

driver = nonebot.get_driver()
driver.register_adapter(ONEBOT_V12Adapter)
# driver.register_adapter(QQAdapter)

# nonebot.require("nonebot_plugin_alconna")
nonebot.load_plugin("plugins.demo")
Expand Down
6 changes: 3 additions & 3 deletions example/plugins/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from importlib_metadata import distributions
from nonebot.adapters.onebot.v12.event import GroupMessageDeleteEvent
from arclet.alconna import (
Arg,
Args,
Field,
Option,
Expand Down Expand Up @@ -392,8 +391,9 @@ async def statis_h():

alc = Alconna(
"添加教师",
Arg("name", str, Field(completion=lambda: "请输入姓名")),
Arg("phone", int, Field(completion=lambda: "请输入手机号")),
Args["name", str, Field(completion=lambda: "请输入姓名")],
Args["phone", int, Field(completion=lambda: "请输入手机号")],
Args["at", [str, At], Field(completion=lambda: "请输入教师号")],
)

cmd = on_alconna(alc, comp_config={"disables": {"tab"}})
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
from .consts import ALCONNA_EXEC_RESULT as ALCONNA_EXEC_RESULT
from .extension import add_global_extension as add_global_extension

__version__ = "0.30.5"
__version__ = "0.30.6"

__plugin_meta__ = PluginMetadata(
name="Alconna 插件",
Expand Down
2 changes: 2 additions & 0 deletions src/nonebot_plugin_alconna/argv.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def addon(self, data: Iterable[str | MessageSegment]) -> Self:
self.raw_data.append(d)
self.ndata += 1
continue
if not text.strip("\xa0").strip():
continue
if i > 0 and isinstance(self.raw_data[-1], str):
self.raw_data[-1] += f"{self.separators[0]}{text}"
else:
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .params import UniversalMessage as UniversalMessage
from .params import UniversalSegment as UniversalSegment

__version__ = "0.30.5"
__version__ = "0.30.6"

__plugin_meta__ = PluginMetadata(
name="Universal Segment 插件",
Expand Down

0 comments on commit 402214a

Please sign in to comment.