Skip to content

Commit

Permalink
[OneBot] Fix private poke event initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
aicorein committed Oct 24, 2024
1 parent 44354ce commit a8364e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/melobot/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from .typ import T

__version__ = "3.0.0rc10"
__version__ = "3.0.0rc11"


def _version_str_to_info(s: str) -> VersionInfo:
Expand Down
4 changes: 2 additions & 2 deletions src/melobot/protocols/onebot/v11/adapter/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ class PokeNotifyEvent(NotifyNoticeEvent):

class Model(NotifyNoticeEvent.Model):
sub_type: Literal["poke"]
group_id: int
group_id: int | None = None
user_id: int
target_id: int

Expand All @@ -806,7 +806,7 @@ def __init__(self, **event_data: Any) -> None:
#: 子类型
self.sub_type: Literal["poke"]
#: 群号
self.group_id: int = self._model.group_id
self.group_id: int | None = self._model.group_id
#: 事件发起者 qq 号
self.user_id: int = self._model.user_id
#: 事件作用者 qq 号
Expand Down

0 comments on commit a8364e7

Please sign in to comment.