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

Code before:

        if view is not MISSING and not view.is_finished():
            if ephemeral and view.timeout is None:
                view.timeout = 15 * 60.0

            # If the interaction type isn't an application command then there's no way
            # to obtain this interaction_id again, so just default to None
            entity_id = parent.id if parent.type is InteractionType.application_command else None
            self._parent._state.store_view(view, entity_id)

        self._response_type = InteractionResponseType.channel_message

        if delete_after is not None:

            async def inner_call(delay: float = delete_after):
                await asyncio.sleep(delay)
                try:
                    await self._parent.delete_original_response()
                except HTTPException:
                    pass

            asyncio.create_task(inner_call())
        if response:
            return InteractionCallbackResponse(
                parent=parent,
                channel=parent.channel,  # type: ignore
                data=response,
            )

    @overload
    async def edit_message(
        self,
        *,
        content: Optional[Any] = ...,
        embed: Optional[Embed] = ...,
        embeds: Sequence[Embed] = ...,
        attachments: Sequence[Union[Attachment, File]] = ...,
        view: Optional[View] = ...,
        allowed_mentions: Optional[AllowedMentions] = ...,
        delete_after: Optional[float] = ...,
        suppress_embeds: bool = ...,
        with_response: Literal[True] = ...,
    ) -> InteractionCallbackResponse[ClientT]:
        ...

    @overload
    async def edit_message(
        self,
        *,
        content: Optional[Any] = ...,
        embed: Optional[Embed] = ...,

Review comment (suggestion):
This too will raise `TypeError: InteractionCallbackResponse.init() got an unexpected keyword argument 'channel'`

Code after:
            embeds=embeds,
            view=view,
            attachments=attachments,
            previous_allowed_mentions=parent._state.allowed_mentions,
            allowed_mentions=allowed_mentions,
            flags=flags,
        )

        http = parent._state.http
        response = await adapter.create_interaction_response(
            parent.id,
            parent.token,
            session=parent._session,
            proxy=http.proxy,
            proxy_auth=http.proxy_auth,
            params=params,
        )

        if view and not view.is_finished():
            state.store_view(view, message_id, interaction_id=original_interaction_id)

        self._response_type = InteractionResponseType.message_update

        if delete_after is not None:

            async def inner_call(delay: float = delete_after):
                await asyncio.sleep(delay)
                try:
                    await self._parent.delete_original_response()
                except HTTPException:
                    pass

            asyncio.create_task(inner_call())

        return InteractionCallback(
            data=response,
            parent=self._parent,
            state=self._parent._state,
            type=self._response_type,
        )

    async def send_modal(self, modal: Modal, /) -> InteractionCallback[ClientT]:
        """|coro|

        Responds to this interaction by sending a modal.

        .. versionchanged:: 2.5
            This now returns a :class:`InteractionCallback` instance.

        Parameters
        -----------