Skip to content

Commit

Permalink
✨ add group c2c delete message api
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Mar 29, 2024
1 parent eabae6b commit a8304d1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nonebot/adapters/qq/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,16 @@ async def post_c2c_files(
)
return parse_obj_as(PostC2CFilesReturn, await self._request(request))

@API
async def delete_c2c_message(self, *, openid: str, message_id: str) -> None:
request = Request(
"DELETE",
self.adapter.get_api_base().joinpath(
"v2", "users", openid, "messages", message_id
)
)
return await self._request(request)

# Group API
@API
async def post_group_messages(
Expand Down Expand Up @@ -1788,6 +1798,18 @@ async def post_group_files(
)
return parse_obj_as(PostGroupFilesReturn, await self._request(request))

@API
async def delete_group_message(
self, *, group_openid: str, message_id: str
) -> None:
request = Request(
"DELETE",
self.adapter.get_api_base().joinpath(
"v2", "groups", group_openid, "messages", message_id
)
)
return await self._request(request)

@API
async def post_group_members(
self,
Expand Down

0 comments on commit a8304d1

Please sign in to comment.