Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Fix a bug under python3.8&3.7 #6

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nonebot_plugin_guild_patch/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Type, TypeVar
from typing import List, Tuple, Optional, Type, TypeVar

from nonebot.adapters.onebot.v11 import (
Adapter,
Expand Down Expand Up @@ -85,7 +85,7 @@ def get_session_id(self) -> str:
return f"guild_{self.guild_id}_channel_{self.channel_id}_{self.user_id}"

@staticmethod
def _check_at_me(message: Message, self_tiny_id: int) -> tuple[Message, bool]:
def _check_at_me(message: Message, self_tiny_id: int) -> Tuple[Message, bool]:
"""检查消息开头或结尾是否存在 @机器人,去除并赋值 event.to_me"""
is_tome = False
# ensure message not empty
Expand Down