From 7860c029733e6280ad2a05aa8193042e9c6d06ee Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Fri, 1 Feb 2019 19:38:50 +0800 Subject: [PATCH] Fix bug of IntentCommand --- nonebot/natural_language.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nonebot/natural_language.py b/nonebot/natural_language.py index 726c28c6..12b9565c 100644 --- a/nonebot/natural_language.py +++ b/nonebot/natural_language.py @@ -83,8 +83,7 @@ class NLPResult(NamedTuple): def to_intent_command(self): return IntentCommand(confidence=self.confidence, name=self.cmd_name, - args=self.cmd_args, - current_arg=None) + args=self.cmd_args) class IntentCommand(NamedTuple): @@ -94,7 +93,7 @@ class IntentCommand(NamedTuple): confidence: float name: Union[str, CommandName_T] args: Optional[CommandArgs_T] = None - current_arg: Optional[str] = None + current_arg: str = '' async def handle_natural_language(bot: NoneBot, ctx: Context_T) -> bool: