Skip to content

Commit

Permalink
🐛 (message/message_components.py) 修复部分组件初始化报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
XYCode-Kerman committed Jul 17, 2024
1 parent 30f89a4 commit 0ecab08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions yiriob/message/message_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class At(MessageComponent):
qq: str = Field(description="@的 QQ 号,all 表示全体成员")

def __init__(self, qq: str) -> None:
self.qq = qq
BaseModel.__init__(self, qq=qq)


class Rps(MessageComponent):
Expand Down Expand Up @@ -210,15 +210,15 @@ class Reply(MessageComponent):
id: str = Field(description="回复时引用的消息 ID")

def __init__(self, id: str) -> None:
self.id = id
BaseModel.__init__(self, id=id)


class Forward(MessageComponent):
comp_type: str = "forward"
id: Annotated[str, OnlyReceive] = Field(description="合并转发 ID")

def __init__(self, id: str) -> None:
self.id = id
BaseModel.__init__(self, id=id)


class Node(MessageComponent):
Expand All @@ -234,15 +234,15 @@ class Xml(MessageComponent):
data: str = Field(description="XML 内容")

def __init__(self, data: str) -> None:
self.data = data
BaseModel.__init__(self, data=data)


class Json(MessageComponent):
comp_type: str = "json"
data: str = Field(description="JSON 内容")

def __init__(self, data: str) -> None:
self.data = data
BaseModel.__init__(self, data=data)


# Attention!
Expand Down

0 comments on commit 0ecab08

Please # to comment.