Skip to content

Commit

Permalink
🐛 version 0.6.3
Browse files Browse the repository at this point in the history
fix event name
resolve #4
  • Loading branch information
RF-Tar-Railt committed Oct 24, 2023
1 parent e0e6235 commit e6453e8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions nonebot/adapters/satori/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ class GuildUpdatedEvent(GuildEvent):
__type__ = EventType.GUILD_UPDATED


class GuildInnerMemberEvent(GuildEvent):
member: InnerMember
class GuildMemberEvent(GuildEvent):
user: User

@override
Expand All @@ -145,24 +144,28 @@ def get_session_id(self) -> str:


@register_event_class
class GuildInnerMemberAddedEvent(GuildInnerMemberEvent):
class GuildMemberAddedEvent(GuildMemberEvent):
__type__ = EventType.GUILD_MEMBER_ADDED


@register_event_class
class GuildInnerMemberRemovedEvent(GuildInnerMemberEvent):
class GuildMemberRemovedEvent(GuildMemberEvent):
__type__ = EventType.GUILD_MEMBER_REMOVED


@register_event_class
class GuildInnerMemberRequestEvent(GuildInnerMemberEvent):
class GuildMemberRequestEvent(GuildMemberEvent):
__type__ = EventType.GUILD_MEMBER_REQUEST

member: InnerMember


@register_event_class
class GuildInnerMemberUpdatedEvent(GuildInnerMemberEvent):
class GuildMemberUpdatedEvent(GuildMemberEvent):
__type__ = EventType.GUILD_MEMBER_UPDATED

member: InnerMember


class GuildRoleEvent(GuildEvent):
role: Role
Expand Down
2 changes: 2 additions & 0 deletions nonebot/adapters/satori/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ class Guild(BaseModel, extra=Extra.allow):
class User(BaseModel, extra=Extra.allow):
id: str
name: Optional[str] = None
nick: Optional[str] = None
avatar: Optional[str] = None
is_bot: Optional[bool] = None


class InnerMember(BaseModel, extra=Extra.allow):
user: Optional[User] = None
name: Optional[str] = None
nick: Optional[str] = None
avatar: Optional[str] = None
joined_at: Optional[datetime] = None

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.6.2"
version = "0.6.3"
description = "Satori Protocol Adapter for Nonebot2"
authors = [
{name = "RF-Tar-Railt",email = "[email protected]"},
Expand Down

0 comments on commit e6453e8

Please sign in to comment.