2021-01-29 21:19:13 +08:00
|
|
|
from pydantic import Field
|
|
|
|
|
2021-01-29 17:38:39 +08:00
|
|
|
from .base import Event
|
2021-01-29 21:19:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
class RequestEvent(Event):
|
|
|
|
event_id: int = Field(alias='eventId')
|
|
|
|
message: str
|
|
|
|
nick: str
|
|
|
|
|
|
|
|
|
|
|
|
class NewFriendRequestEvent(RequestEvent):
|
|
|
|
from_id: int = Field(alias='fromId')
|
|
|
|
group_id: int = Field(0, alias='groupId')
|
|
|
|
|
|
|
|
|
|
|
|
class MemberJoinRequestEvent(RequestEvent):
|
|
|
|
from_id: int = Field(alias='fromId')
|
|
|
|
group_id: int = Field(alias='groupId')
|
|
|
|
group_name: str = Field(alias='groupName')
|
|
|
|
|
|
|
|
|
|
|
|
class BotInvitedJoinGroupRequestEvent(RequestEvent):
|
|
|
|
from_id: int = Field(alias='fromId')
|
|
|
|
group_id: int = Field(alias='groupId')
|
|
|
|
group_name: str = Field(alias='groupName')
|