Skip to content

Commit

Permalink
🐛 add missing at seg constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Nov 1, 2023
1 parent e10f3d2 commit fbd04a6
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions nonebot/adapters/feishu/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def __radd__(
def text(text: str) -> "Text":
return Text("text", {"text": str(text)})

@staticmethod
def at(user_id: str):
return At("at", {"user_id": user_id})

@staticmethod
def post(
title: str, content: List[List["PostMessageNode"]], language: str = "zh_cn"
Expand Down Expand Up @@ -209,20 +213,6 @@ def __str__(self) -> str:
return f"@{self.data['user_id']}"


class _AtAllData(TypedDict):
user_id: Literal["all"]


@dataclass
class AtAll(MessageSegment):
if TYPE_CHECKING:
data: _AtAllData

@override
def __str__(self) -> str:
return "@all"


class _ImageData(TypedDict):
image_key: str

Expand Down

0 comments on commit fbd04a6

Please sign in to comment.