Repository: Rapptz/discord.py
File: discord/message.py (Python)

Code before:
        The ID of the message that containes the interactive components, if applicable.
    modal_interaction: Optional[:class:`.MessageInteractionMetadata`]
        The metadata of the modal submit interaction that triggered this interaction, if applicable.
    """

    __slots__: Tuple[str, ...] = (
        'id',
        'type',
        'user',
        'original_response_message_id',
        'interacted_message_id',
        'modal_interaction',
        '_integration_owners',
        '__state',
        '__guild',
    )

    def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionMetadataPayload) -> None:
        self.__guild: Optional[Guild] = guild
        self.__state: ConnectionState = state

        self.id: int = int(data['id'])
        self.type: InteractionType = try_enum(InteractionType, data['type'])
        self.user = state.create_user(data['user'])
        self._integration_owners: Dict[int, int] = {
            int(key): int(value) for key, value in data.get("authorizing_integration_owners", {}).items()
        }

        self.original_response_message_id: Optional[int] = None
        try:
            self.original_response_message_id = int(data['original_response_message_id'])
        except KeyError:
            pass

        self.interacted_message_id: Optional[int] = None
        try:
            self.interacted_message_id = int(data['interacted_message_id'])
        except KeyError:
            pass

        self.modal_interaction: Optional[MessageInteractionMetadata] = None
        try:
            self.modal_interaction = MessageInteractionMetadata(
                state=state, guild=guild, data=data['triggering_interaction_metadata']
            )
        except KeyError:
            pass

    def __repr__(self) -> str:
        return f'<MessageInteraction id={self.id} type={self.type!r} user={self.user!r}>'


Review comment (security):
```suggestion
            int(key): int(value) for key, value in data.get('authorizing_integration_owners', {}).items()
```

Code after:
        The ID of the message that containes the interactive components, if applicable.
    modal_interaction: Optional[:class:`.MessageInteractionMetadata`]
        The metadata of the modal submit interaction that triggered this interaction, if applicable.
    """

    __slots__: Tuple[str, ...] = (
        'id',
        'type',
        'user',
        'original_response_message_id',
        'interacted_message_id',
        'modal_interaction',
        '_integration_owners',
        '_state',
        '_guild',
    )

    def __init__(self, *, state: ConnectionState, guild: Optional[Guild], data: MessageInteractionMetadataPayload) -> None:
        self._guild: Optional[Guild] = guild
        self._state: ConnectionState = state

        self.id: int = int(data['id'])
        self.type: InteractionType = try_enum(InteractionType, data['type'])
        self.user = state.create_user(data['user'])
        self._integration_owners: Dict[int, int] = {
            int(key): int(value) for key, value in data.get('authorizing_integration_owners', {}).items()
        }

        self.original_response_message_id: Optional[int] = None
        try:
            self.original_response_message_id = int(data['original_response_message_id'])
        except KeyError:
            pass

        self.interacted_message_id: Optional[int] = None
        try:
            self.interacted_message_id = int(data['interacted_message_id'])
        except KeyError:
            pass

        self.modal_interaction: Optional[MessageInteractionMetadata] = None
        try:
            self.modal_interaction = MessageInteractionMetadata(
                state=state, guild=guild, data=data['triggering_interaction_metadata']
            )
        except KeyError:
            pass

    def __repr__(self) -> str:
        return f'<MessageInteraction id={self.id} type={self.type!r} user={self.user!r}>'