def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionPayload) -> None:
    self.id: int = int(data['id'])
    self.type: InteractionType = try_enum(InteractionType, data['type'])
    self.name: str = data['name']
    self.user: Union[(User, Member)] = MISSING
    try:
        payload = data['member']
    except KeyError:
        self.user = state.create_user(data['user'])
    else:
        if (guild is None):
            self.user = state.create_user(data['user'])
        else:
            payload['user'] = data['user']
            self.user = Member(data=payload, guild=guild, state=state)
def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionPayload) -> None:
    self.id: int = int(data['id'])
    self.type: InteractionType = try_enum(InteractionType, data['type'])
    self.name: str = data['name']
    self.user: Union[(User, Member)] = MISSING
    try:
        payload = data['member']
    except KeyError:
        self.user = state.create_user(data['user'])
    else:
        if (guild is None):
            self.user = state.create_user(data['user'])
        else:
            payload['user'] = data['user']
            self.user = Member(data=payload, guild=guild, state=state)