From e0e62350fa777016e0b19b98db36de1988c88e0e Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt <3165388245@qq.com> Date: Fri, 20 Oct 2023 13:41:34 +0800 Subject: [PATCH] :sparkles: version 0.6.2 --- nonebot/adapters/satori/bot.py | 7 +++++-- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nonebot/adapters/satori/bot.py b/nonebot/adapters/satori/bot.py index b29870b..6b140a5 100644 --- a/nonebot/adapters/satori/bot.py +++ b/nonebot/adapters/satori/bot.py @@ -373,11 +373,14 @@ async def channel_delete(self, *, channel_id: str) -> None: await self._request(request) @API - async def user_channel_create(self, *, user_id: str) -> Channel: + async def user_channel_create(self, *, user_id: str, guild_id: Optional[str] = None) -> Channel: + data = {"user_id": user_id} + if guild_id is not None: + data["guild_id"] = guild_id request = Request( "POST", self.info.api_base / "user.channel.create", - json={"user_id": user_id}, + json=data, ) return Channel.parse_obj(await self._request(request)) diff --git a/pyproject.toml b/pyproject.toml index 68c622f..f89e2e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-adapter-satori" -version = "0.6.1" +version = "0.6.2" description = "Satori Protocol Adapter for Nonebot2" authors = [ {name = "RF-Tar-Railt",email = "rf_tar_railt@qq.com"},