mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	Fix bug of IntentCommand
This commit is contained in:
		| @@ -83,8 +83,7 @@ class NLPResult(NamedTuple): | |||||||
|     def to_intent_command(self): |     def to_intent_command(self): | ||||||
|         return IntentCommand(confidence=self.confidence, |         return IntentCommand(confidence=self.confidence, | ||||||
|                              name=self.cmd_name, |                              name=self.cmd_name, | ||||||
|                              args=self.cmd_args, |                              args=self.cmd_args) | ||||||
|                              current_arg=None) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class IntentCommand(NamedTuple): | class IntentCommand(NamedTuple): | ||||||
| @@ -94,7 +93,7 @@ class IntentCommand(NamedTuple): | |||||||
|     confidence: float |     confidence: float | ||||||
|     name: Union[str, CommandName_T] |     name: Union[str, CommandName_T] | ||||||
|     args: Optional[CommandArgs_T] = None |     args: Optional[CommandArgs_T] = None | ||||||
|     current_arg: Optional[str] = None |     current_arg: str = '' | ||||||
|  |  | ||||||
|  |  | ||||||
| async def handle_natural_language(bot: NoneBot, ctx: Context_T) -> bool: | async def handle_natural_language(bot: NoneBot, ctx: Context_T) -> bool: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user