mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	add type check for argument keywords
				
					
				
			This commit is contained in:
		| @@ -42,6 +42,9 @@ def on_natural_language(keywords: Union[Optional[Iterable], Callable] = None, | ||||
|     :param allow_empty_message: handle empty messages | ||||
|     """ | ||||
|  | ||||
|     if isinstance(keywords, str): | ||||
|         keywords = (keywords,) | ||||
|  | ||||
|     def deco(func: Callable) -> Callable: | ||||
|         nl_processor = NLProcessor(func=func, keywords=keywords, | ||||
|                                    permission=permission, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user