mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	update matcher
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -186,3 +186,4 @@ typings/ | |||||||
| .idea | .idea | ||||||
| .vscode | .vscode | ||||||
| dev | dev | ||||||
|  | doc | ||||||
|   | |||||||
| @@ -88,6 +88,7 @@ class Matcher: | |||||||
|     @classmethod |     @classmethod | ||||||
|     def got(cls, |     def got(cls, | ||||||
|             key: str, |             key: str, | ||||||
|  |             prompt: Optional[str] = None, | ||||||
|             args_parser: Optional[Callable[[Event, dict], None]] = None): |             args_parser: Optional[Callable[[Event, dict], None]] = None): | ||||||
|  |  | ||||||
|         def _decorator(func: Handler) -> Handler: |         def _decorator(func: Handler) -> Handler: | ||||||
| @@ -112,11 +113,11 @@ class Matcher: | |||||||
|         return _decorator |         return _decorator | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def finish(cls): |     def finish(cls, prompt: Optional[str] = None): | ||||||
|         raise FinishedException |         raise FinishedException | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def reject(cls): |     def reject(cls, prompt: Optional[str] = None): | ||||||
|         raise RejectedException |         raise RejectedException | ||||||
|  |  | ||||||
|     async def run(self, event): |     async def run(self, event): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user