Skip to content

Commit

Permalink
typo replay->reply
Browse files Browse the repository at this point in the history
  • Loading branch information
eya46 committed May 18, 2024
1 parent 5f83d9d commit 9dcce1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions nonebot_adapter_tailchat/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ObjectId,
Payload,
Reaction,
Replay,
Reply,
StaticAnnouncement,
datetime,
)
Expand Down Expand Up @@ -423,8 +423,8 @@ def get_group_id(self) -> Optional[str]:
return self.groupId

@property
def replay(self) -> Optional[Replay]:
return self.meta.replay if self.meta else None
def reply(self) -> Optional[Reply]:
return self.meta.reply if self.meta else None

def get_message(self) -> Message:
return self.content
Expand All @@ -437,7 +437,7 @@ def _is_tome(self) -> bool:
return (
not self.is_group()
or (self.meta and self.self_id in self.meta.mentions)
or (self.meta and self.meta.replay and self.self_id == self.meta.replay.author)
or (self.meta and self.meta.reply and self.self_id == self.meta.reply.author)
)

def get_event_description(self) -> str:
Expand Down
4 changes: 2 additions & 2 deletions nonebot_adapter_tailchat/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Panel(RawModel):
provider: Optional[str] = None


class Replay(RawModel):
class Reply(RawModel):
id: str = Field(alias="_id")
content: str
author: str
Expand All @@ -70,7 +70,7 @@ class Reaction(RawModel):
class MessageMeta(RawModel):
mentions: list[str]

replay: Optional[Replay] = None
reply: Optional[Reply] = None


class Payload(RawModel):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-adapter-tailchat"
version = "0.1.0b9"
version = "0.1.0b10"
description = "NoneBot2 Tailchat 适配器 / Tailchat adapter for nonebot2"
authors = ["eya46 <61458340+eya46@users.noreply.github.com>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 9dcce1b

Please sign in to comment.