Skip to content

Commit 97a2c1c

Browse files
committed
refactor: 去除不必要的 async
1 parent 4529334 commit 97a2c1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

YetAnotherPicSearch/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
4242

4343

44-
async def check_first_connect(_: LifecycleMetaEvent) -> bool:
44+
def check_first_connect(_: LifecycleMetaEvent) -> bool:
4545
return True
4646

4747

@@ -62,7 +62,7 @@ def has_images(event: MessageEvent) -> bool:
6262
return bool([i for i in message if i.type == "image"])
6363

6464

65-
async def to_me_with_images(bot: Bot, event: MessageEvent) -> bool:
65+
def to_me_with_images(bot: Bot, event: MessageEvent) -> bool:
6666
with_command_keyword = "搜图" in event.message.extract_plain_text()
6767
has_image = has_images(event)
6868
if isinstance(event, PrivateMessageEvent):

0 commit comments

Comments
 (0)