mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	🚧 update process
This commit is contained in:
		| @@ -421,13 +421,13 @@ class Bot(BaseBot): | ||||
|         """ | ||||
|         msg = message if isinstance(message, Message) else Message(message) | ||||
|  | ||||
|         at_sender = at_sender and bool(event.user_id) | ||||
|         at_sender = at_sender and hasattr(event, "user_id") | ||||
|  | ||||
|         params = {} | ||||
|         if event.user_id: | ||||
|             params["user_id"] = event.user_id | ||||
|         if event.group_id: | ||||
|             params["group_id"] = event.group_id | ||||
|         if hasattr(event, "user_id"): | ||||
|             params["user_id"] = getattr(event, "user_id") | ||||
|         if hasattr(event, "group_id"): | ||||
|             params["group_id"] = getattr(event, "group_id") | ||||
|         params.update(kwargs) | ||||
|  | ||||
|         if "message_type" not in params: | ||||
|   | ||||
| @@ -11,7 +11,6 @@ from typing import Set, Type, Optional, Iterable, TYPE_CHECKING | ||||
|  | ||||
| from nonebot.log import logger | ||||
| from nonebot.rule import TrieRule | ||||
| from nonebot.utils import escape_tag | ||||
| from nonebot.matcher import matchers, Matcher | ||||
| from nonebot.exception import IgnoredException, StopPropagation, NoLogException | ||||
| from nonebot.typing import State, EventPreProcessor, RunPreProcessor, EventPostProcessor, RunPostProcessor | ||||
| @@ -131,7 +130,7 @@ async def _check_matcher(priority: int, bot: "Bot", event: "Event", | ||||
|     ] | ||||
|     results = await asyncio.gather(*checking_tasks, return_exceptions=True) | ||||
|     expired = await asyncio.gather(*checking_expire_tasks) | ||||
|     for expired_matcher in filter(lambda x: x and x in results, expired): | ||||
|     for expired_matcher in filter(lambda x: x, expired): | ||||
|         try: | ||||
|             matchers[priority].remove(expired_matcher)  # type: ignore | ||||
|         except Exception: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user