Skip to content

Commit

Permalink
🐛 version 0.10.5
Browse files Browse the repository at this point in the history
fix ready payload model
  • Loading branch information
RF-Tar-Railt committed Apr 22, 2024
1 parent b4e0f35 commit c017f72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 3 additions & 2 deletions nonebot/adapters/satori/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@ async def _authenticate(self, info: ClientInfo, ws: WebSocket) -> Optional[Liter
if login.status != LoginStatus.ONLINE:
continue
if login.self_id not in self.bots:
bot = Bot(self, login.self_id, login.platform, info)
bot = Bot(self, login.self_id, login.platform or "satori", info)
self.bot_connect(bot)
log(
"INFO",
f"<y>Bot {escape_tag(bot.self_id)}</y> connected",
)
else:
bot = self.bots[login.self_id]
bot.on_ready(login.user)
if login.user:
bot.on_ready(login.user)
if not self.bots:
log("WARNING", "No bots connected!")
return
Expand Down
8 changes: 1 addition & 7 deletions nonebot/adapters/satori/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ class Config:
extra = "allow"


class OuterLogin(Login):
user: User
self_id: str
platform: str


class ArgvInteraction(BaseModel):
name: str
arguments: list
Expand Down Expand Up @@ -165,7 +159,7 @@ class Identify(BaseModel):


class Ready(BaseModel):
logins: List[OuterLogin]
logins: List[Login]


class IdentifyPayload(Payload):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "nonebot-adapter-satori"
version = "0.10.4"
version = "0.10.5"
description = "Satori Protocol Adapter for Nonebot2"
authors = [
{name = "RF-Tar-Railt",email = "[email protected]"},
Expand Down

0 comments on commit c017f72

Please sign in to comment.