diff --git a/genshin/client/components/hoyolab.py b/genshin/client/components/hoyolab.py index 394caf49..f5beaffc 100644 --- a/genshin/client/components/hoyolab.py +++ b/genshin/client/components/hoyolab.py @@ -445,3 +445,11 @@ async def delete_reply(self, *, reply_id: int, post_id: int) -> None: data=dict(reply_id=reply_id, post_id=post_id), method="POST", ) + + async def get_replies(self, *, size: int = 15) -> typing.Sequence[typing.Tuple[int, str]]: + """Get the latest replies as a list of tuples, where the first element is the reply ID and the second is the content.""" + data = await self.request_bbs( + "community/post/wapi/userReply", + params=dict(size=size), + ) + return [(int(i["reply"]["reply_id"]), i["reply"]["content"]) for i in data["list"]]