Repository: hikari-py/hikari (python)

Issue:
Remove `Commands.dm_permissions` and `Messages.interaction`
These have been deprecated and should be removed once #2177  is merged

Pull request description:
User applications removals
Closes #2192


Patch:
diff --git a/changes/2177.breaking.md b/changes/2195.breaking.md
similarity index 100%
rename from changes/2177.breaking.md
rename to changes/2195.breaking.md
diff --git a/hikari/api/rest.py b/hikari/api/rest.py
index bd1bb960..5f32d701 100644
--- a/hikari/api/rest.py
+++ b/hikari/api/rest.py
@@ -6975,7 +6975,6 @@ async def create_slash_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.SlashCommand:
         r"""Create an application slash command.
@@ -7006,10 +7005,6 @@ async def create_slash_command(
 
             If `0`, then it will be available for all members. Note that this doesn't affect
             administrators of the guild and overwrites.
-        dm_enabled
-            Whether this command is enabled in DMs with the bot.
-
-            This can only be applied to non-guild commands.
         nsfw
             Whether this command should be age-restricted.
 
@@ -7049,7 +7044,6 @@ async def create_context_menu_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.ContextMenuCommand:
         r"""Create an application context menu command.
@@ -7075,10 +7069,6 @@ async def create_context_menu_command(
 
             If `0`, then it will be available for all members. Note that this doesn't affect
             administrators of the guild and overwrites.
-        dm_enabled
-            Whether this command is enabled in DMs with the bot.
-
-            This can only be applied to non-guild commands.
         nsfw
             Whether this command should be age-restricted.
 
@@ -7164,7 +7154,6 @@ async def edit_application_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.PartialCommand:
         """Edit a registered application command.
 
@@ -7192,10 +7181,6 @@ async def edit_application_command(
 
             If `0`, then it will be available for all members. Note that this doesn't affect
             administrators of the guild and overwrites.
-        dm_enabled
-            Whether this command is enabled in DMs with the bot.
-
-            This can only be applied to non-guild commands.
 
         Returns
         -------
diff --git a/hikari/api/special_endpoints.py b/hikari/api/special_endpoints.py
index cf746181..1dfcd9a8 100644
--- a/hikari/api/special_endpoints.py
+++ b/hikari/api/special_endpoints.py
@@ -1009,14 +1009,6 @@ def default_member_permissions(self) -> typing.Union[undefined.UndefinedType, pe
         administrators of the guild and overwrites.
         """
 
-    @property
-    @abc.abstractmethod
-    def is_dm_enabled(self) -> undefined.UndefinedOr[bool]:
-        """Whether this command is enabled in DMs with the bot.
-
-        Only applicable to globally-scoped commands.
-        """
-
     @property
     @abc.abstractmethod
     def is_nsfw(self) -> undefined.UndefinedOr[bool]:
@@ -1087,21 +1079,6 @@ def set_default_member_permissions(
             Object of this command builder.
         """
 
-    @abc.abstractmethod
-    def set_is_dm_enabled(self, state: undefined.UndefinedOr[bool], /) -> Self:
-        """Set whether this command will be enabled in DMs with the bot.
-
-        Parameters
-        ----------
-        state
-            Whether this command is enabled in DMs with the bot.
-
-        Returns
-        -------
-        CommandBuilder
-            Object of this command builder to allow for chained calls.
-        """
-
     @abc.abstractmethod
     def set_is_nsfw(self, state: undefined.UndefinedOr[bool], /) -> Self:
         """Set whether this command will be age-restricted.
diff --git a/hikari/commands.py b/hikari/commands.py
index ec5e5151..c0091cde 100644
--- a/hikari/commands.py
+++ b/hikari/commands.py
@@ -246,9 +246,6 @@ class PartialCommand(snowflakes.Unique):
     This excludes administrators of the guild and overwrites.
     """
 
-    is_dm_enabled: bool = attrs.field(eq=False, hash=False, repr=True)
-    """Whether this command is enabled in DMs with the bot."""
-
     is_nsfw: bool = attrs.field(eq=False, hash=False, repr=True)
     """Whether this command is age-restricted."""
 
diff --git a/hikari/impl/cache.py b/hikari/impl/cache.py
index 362a6a9b..0bb0d361 100644
--- a/hikari/impl/cache.py
+++ b/hikari/impl/cache.py
@@ -1813,10 +1813,6 @@ def _set_message(
         if message.user_mentions is not undefined.UNDEFINED:
             user_mentions = {user_id: self._set_user(user) for user_id, user in message.user_mentions.items()}
 
-        interaction_user: typing.Optional[cache_utility.RefCell[users.User]] = None
-        if message.interaction:
-            interaction_user = self._set_user(message.interaction.user)
-
         referenced_message: typing.Optional[cache_utility.RefCell[cache_utility.MessageData]] = None
         if message.referenced_message:
             reference_id = message.referenced_message.id
@@ -1838,16 +1834,8 @@ def _set_message(
                 for user in user_mentions.values():
                     self._increment_ref_count(user)
 
-            if interaction_user:
-                self._increment_ref_count(interaction_user)
-
         message_data = cache_utility.MessageData.build_from_entity(
-            message,
-            author=author,
-            member=member,
-            user_mentions=user_mentions,
-            referenced_message=referenced_message,
-            interaction_user=interaction_user,
+            message, author=author, member=member, user_mentions=user_mentions, referenced_message=referenced_message
         )
 
         # Ensure any previously set message ref cell is in the right place before updating the cache.
diff --git a/hikari/impl/entity_factory.py b/hikari/impl/entity_factory.py
index b03bdb4e..29428cf1 100644
--- a/hikari/impl/entity_factory.py
+++ b/hikari/impl/entity_factory.py
@@ -2336,7 +2336,6 @@ def deserialize_slash_command(
             description=payload["description"],
             options=options,
             default_member_permissions=default_member_permissions,
-            is_dm_enabled=payload.get("dm_permission", True),
             is_nsfw=payload.get("nsfw", False),
             guild_id=guild_id,
             version=snowflakes.Snowflake(payload["version"]),
@@ -2386,7 +2385,6 @@ def deserialize_context_menu_command(
             application_id=snowflakes.Snowflake(payload["application_id"]),
             name=payload["name"],
             default_member_permissions=default_member_permissions,
-            is_dm_enabled=payload.get("dm_permission", True),
             is_nsfw=payload.get("nsfw", False),
             guild_id=guild_id,
             version=snowflakes.Snowflake(payload["version"]),
@@ -3182,15 +3180,7 @@ def _deserialize_interaction_metadata(
             _LOGGER.debug(f"Unrecognised interaction metadata type: {interaction_metadata_type}")
             raise errors.UnrecognisedEntityError(f"Unrecognised interaction metadata type: {interaction_metadata_type}")
 
-    def _deserialize_message_interaction(self, payload: data_binding.JSONObject) -> message_models.MessageInteraction:
-        return message_models.MessageInteraction(
-            id=snowflakes.Snowflake(payload["id"]),
-            type=base_interactions.InteractionType(payload["type"]),
-            name=payload["name"],
-            user=self.deserialize_user(payload["user"]),
-        )
-
-    def deserialize_partial_message(  # noqa: C901, CFQ001 - Too complex and too long
+    def deserialize_partial_message(  # noqa: C901 - Too complex
         self, payload: data_binding.JSONObject
     ) -> message_models.PartialMessage:
         author: undefined.UndefinedOr[user_models.User] = undefined.UNDEFINED
@@ -3266,10 +3256,6 @@ def deserialize_partial_message(  # noqa: C901, CFQ001 - Too complex and too lon
         if raw_application_id := payload.get("application_id"):
             application_id = snowflakes.Snowflake(raw_application_id)
 
-        interaction: undefined.UndefinedNoneOr[message_models.MessageInteraction] = undefined.UNDEFINED
-        if interaction_payload := payload.get("interaction"):
-            interaction = self._deserialize_message_interaction(interaction_payload)
-
         components: undefined.UndefinedOr[list[component_models.MessageActionRowComponent]] = undefined.UNDEFINED
         if component_payloads := payload.get("components"):
             components = self._deserialize_components(component_payloads, self._message_component_type_mapping)
@@ -3317,7 +3303,6 @@ def deserialize_partial_message(  # noqa: C901, CFQ001 - Too complex and too lon
             stickers=stickers,
             nonce=payload.get("nonce", undefined.UNDEFINED),
             application_id=application_id,
-            interaction=interaction,
             components=components,
             channel_mentions=channel_mentions,
             user_mentions=user_mentions,
@@ -3373,10 +3358,6 @@ def deserialize_message(self, payload: data_binding.JSONObject) -> message_model
         else:
             stickers = []
 
-        interaction: typing.Optional[message_models.MessageInteraction] = None
-        if interaction_payload := payload.get("interaction"):
-            interaction = self._deserialize_message_interaction(interaction_payload)
-
         thread: typing.Optional[channel_models.GuildThreadChannel] = None
         if thread_payload := payload.get("thread"):
             thread = self.deserialize_guild_thread(thread_payload)
@@ -3421,7 +3402,6 @@ def deserialize_message(self, payload: data_binding.JSONObject) -> message_model
             stickers=stickers,
             nonce=payload.get("nonce"),
             application_id=snowflakes.Snowflake(payload["application_id"]) if "application_id" in payload else None,
-            interaction=interaction,
             components=components,
             user_mentions=user_mentions,
             channel_mentions=channel_mentions,
diff --git a/hikari/impl/rest.py b/hikari/impl/rest.py
index 73bd274f..dbbec3d3 100644
--- a/hikari/impl/rest.py
+++ b/hikari/impl/rest.py
@@ -3853,7 +3853,6 @@ async def _create_application_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> data_binding.JSONObject:
         if guild is undefined.UNDEFINED:
@@ -3874,7 +3873,6 @@ async def _create_application_command(
         # Discord has some funky behaviour around what 0 means. They consider it to be the same as ADMINISTRATOR,
         # but we consider it to be the same as None for developer sanity reasons
         body.put("default_member_permissions", None if default_member_permissions == 0 else default_member_permissions)
-        body.put("dm_permission", dm_enabled)
 
         response = await self._request(route, json=body)
         assert isinstance(response, dict)
@@ -3897,7 +3895,6 @@ async def create_slash_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.SlashCommand:
         response = await self._create_application_command(
@@ -3910,7 +3907,6 @@ async def create_slash_command(
             name_localizations=name_localizations,
             description_localizations=description_localizations,
             default_member_permissions=default_member_permissions,
-            dm_enabled=dm_enabled,
             nsfw=nsfw,
         )
         return self._entity_factory.deserialize_slash_command(
@@ -3930,7 +3926,6 @@ async def create_context_menu_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.ContextMenuCommand:
         response = await self._create_application_command(
@@ -3940,7 +3935,6 @@ async def create_context_menu_command(
             guild=guild,
             name_localizations=name_localizations,
             default_member_permissions=default_member_permissions,
-            dm_enabled=dm_enabled,
             nsfw=nsfw,
         )
         return self._entity_factory.deserialize_context_menu_command(
@@ -3976,7 +3970,6 @@ async def edit_application_command(
         default_member_permissions: typing.Union[
             undefined.UndefinedType, int, permissions_.Permissions
         ] = undefined.UNDEFINED,
-        dm_enabled: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
         nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED,
     ) -> commands.PartialCommand:
         if guild is undefined.UNDEFINED:
@@ -3995,7 +3988,6 @@ async def edit_application_command(
         # Discord has some funky behaviour around what 0 means. They consider it to be the same as ADMINISTRATOR,
         # but we consider it to be the same as None for developer sanity reasons
         body.put("default_member_permissions", None if default_member_permissions == 0 else default_member_permissions)
-        body.put("dm_permission", dm_enabled)
 
         response = await self._request(route, json=body)
         assert isinstance(response, dict)
diff --git a/hikari/impl/special_endpoints.py b/hikari/impl/special_endpoints.py
index 73602888..3026d358 100644
--- a/hikari/impl/special_endpoints.py
+++ b/hikari/impl/special_endpoints.py
@@ -1282,10 +1282,6 @@ class CommandBuilder(special_endpoints.CommandBuilder):
         alias="default_member_permissions", default=undefined.UNDEFINED, kw_only=True
     )
 
-    _is_dm_enabled: undefined.UndefinedOr[bool] = attrs.field(
-        alias="is_dm_enabled", default=undefined.UNDEFINED, kw_only=True
-    )
-
     _is_nsfw: undefined.UndefinedOr[bool] = attrs.field(alias="is_nsfw", default=undefined.UNDEFINED, kw_only=True)
 
     _name_localizations: typing.Mapping[typing.Union[locales.Locale, str], str] = attrs.field(
@@ -1308,10 +1304,6 @@ def id(self) -> undefined.UndefinedOr[snowflakes.Snowflake]:
     def default_member_permissions(self) -> typing.Union[undefined.UndefinedType, permissions_.Permissions, int]:
         return self._default_member_permissions
 
-    @property
-    def is_dm_enabled(self) -> undefined.UndefinedOr[bool]:
-        return self._is_dm_enabled
-
     @property
     def is_nsfw(self) -> undefined.UndefinedOr[bool]:
         return self._is_nsfw
@@ -1346,10 +1338,6 @@ def set_default_member_permissions(
         self._default_member_permissions = default_member_permissions
         return self
 
-    def set_is_dm_enabled(self, state: undefined.UndefinedOr[bool], /) -> Self:
-        self._is_dm_enabled = state
-        return self
-
     def set_is_nsfw(self, state: undefined.UndefinedOr[bool], /) -> Self:
         self._is_nsfw = state
         return self
@@ -1378,7 +1366,6 @@ def build(self, _: entity_factory_.EntityFactory, /) -> typing.MutableMapping[st
         data["type"] = self.type
         data.put_snowflake("id", self._id)
         data.put("name_localizations", self._name_localizations)
-        data.put("dm_permission", self._is_dm_enabled)
         data.put("nsfw", self._is_nsfw)
         data.put_array("integration_types", self._integration_types)
         data.put_array("contexts", self._context_types)
@@ -1460,7 +1447,6 @@ async def create(
             name_localizations=self._name_localizations,
             description_localizations=self._description_localizations,
             default_member_permissions=self._default_member_permissions,
-            dm_enabled=self._is_dm_enabled,
             nsfw=self._is_nsfw,
         )
 
@@ -1493,7 +1479,6 @@ async def create(
             guild=guild,
             name_localizations=self._name_localizations,
             default_member_permissions=self._default_member_permissions,
-            dm_enabled=self._is_dm_enabled,
             nsfw=self.is_nsfw,
         )
 
diff --git a/hikari/internal/cache.py b/hikari/internal/cache.py
index fb30d783..6a4a7133 100644
--- a/hikari/internal/cache.py
+++ b/hikari/internal/cache.py
@@ -33,7 +33,6 @@
     "KnownCustomEmojiData",
     "RichActivityData",
     "MemberPresenceData",
-    "MessageInteractionData",
     "MessageData",
     "VoiceStateData",
     "RefCell",
@@ -659,29 +658,6 @@ def build_entity(self, app: traits.RESTAware, /) -> presences.MemberPresence:
         )
 
 
-@attrs_extensions.with_copy
-@attrs.define(kw_only=True, repr=False, weakref_slot=False)
-class MessageInteractionData(BaseData[messages.MessageInteraction]):
-    """A model for storing message interaction data."""
-
-    id: snowflakes.Snowflake = attrs.field(hash=True, repr=True)
-    type: typing.Union[base_interactions.InteractionType, int] = attrs.field(eq=False, repr=True)
-    name: str = attrs.field(eq=False, repr=True)
-    user: RefCell[users_.User] = attrs.field(eq=False, repr=True)
-
-    @classmethod
-    def build_from_entity(
-        cls, interaction: messages.MessageInteraction, /, *, user: typing.Optional[RefCell[users_.User]] = None
-    ) -> MessageInteractionData:
-        if user is None:
-            user = RefCell(interaction.user)
-
-        return MessageInteractionData(id=interaction.id, type=interaction.type, name=interaction.name, user=user)
-
-    def build_entity(self, _: traits.RESTAware, /) -> messages.MessageInteraction:
-        return messages.MessageInteraction(id=self.id, type=self.type, name=self.name, user=self.user.copy())
-
-
 def _copy_embed(embed: embeds_.Embed) -> embeds_.Embed:
     return embeds_.Embed.from_received_embed(
         title=embed.title,
@@ -732,7 +708,6 @@ class MessageData(BaseData[messages.Message]):
     stickers: tuple[stickers_.PartialSticker, ...] = attrs.field()
     nonce: typing.Optional[str] = attrs.field()
     referenced_message: typing.Optional[RefCell[MessageData]] = attrs.field()
-    interaction: typing.Optional[MessageInteractionData] = attrs.field()
     application_id: typing.Optional[snowflakes.Snowflake] = attrs.field()
     components: tuple[components_.MessageActionRowComponent, ...] = attrs.field()
     thread: typing.Optional[channels_.GuildThreadChannel] = attrs.field()
@@ -755,12 +730,6 @@ def build_from_entity(
         if not member and message.member:
             member = RefCell(MemberData.build_from_entity(message.member))
 
-        interaction = (
-            MessageInteractionData.build_from_entity(message.interaction, user=interaction_user)
-            if message.interaction
-            else None
-        )
-
         if not user_mentions and message.user_mentions is not undefined.UNDEFINED:
             user_mentions = {user_id: RefCell(copy.copy(user)) for user_id, user in message.user_mentions.items()}
 
@@ -802,7 +771,6 @@ def build_from_entity(
             stickers=tuple(map(copy.copy, message.stickers)),
             nonce=message.nonce,
             referenced_message=referenced_message,
-            interaction=interaction,
             application_id=message.application_id,
             components=tuple(message.components),
             thread=message.thread,
@@ -849,7 +817,6 @@ def build_entity(self, app: traits.RESTAware, /) -> messages.Message:
             stickers=tuple(map(copy.copy, self.stickers)),
             nonce=self.nonce,
             referenced_message=self.referenced_message.object.build_entity(app) if self.referenced_message else None,
-            interaction=self.interaction.build_entity(app) if self.interaction else None,
             application_id=self.application_id,
             components=self.components,
             thread=self.thread,
diff --git a/hikari/messages.py b/hikari/messages.py
index 05f6b5a1..257c6986 100644
--- a/hikari/messages.py
+++ b/hikari/messages.py
@@ -30,7 +30,6 @@
     "Attachment",
     "Reaction",
     "MessageActivity",
-    "MessageInteraction",
     "MessageReference",
     "PartialMessage",
     "Message",
@@ -385,24 +384,6 @@ def make_cover_image_url(self, *, ext: str = "png", size: int = 4096) -> typing.
         )
 
 
-@attrs_extensions.with_copy
-@attrs.define(kw_only=True, repr=True, unsafe_hash=True, weakref_slot=False)
-class MessageInteraction:
-    """Representation of information provided for a message from an interaction."""
-
-    id: snowflakes.Snowflake = attrs.field(hash=True, repr=True)
-    """ID of the interaction this message was sent by."""
-
-    type: typing.Union[base_interactions.InteractionType, int] = attrs.field(eq=False, repr=True)
-    """The type of interaction this message was created by."""
-
-    name: str = attrs.field(eq=False, repr=True)
-    """Name of the application command the interaction is tied to."""
-
-    user: users_.User = attrs.field(eq=False, repr=True)
-    """Object of the user who invoked this interaction."""
-
-
 def _map_cache_maybe_discover(
     ids: typing.Iterable[snowflakes.Snowflake], cache_call: typing.Callable[[snowflakes.Snowflake], typing.Optional[_T]]
 ) -> dict[snowflakes.Snowflake, _T]:
@@ -591,9 +572,6 @@ class PartialMessage(snowflakes.Unique):
     `type` is [`hikari.messages.MessageType.REPLY`][] and [`None`][], the message was deleted.
     """
 
-    interaction: undefined.UndefinedNoneOr[MessageInteraction] = attrs.field(hash=False, eq=False, repr=False)
-    """Information about the interaction this message was created by."""
-
     application_id: undefined.UndefinedNoneOr[snowflakes.Snowflake] = attrs.field(hash=False, eq=False, repr=False)
     """ID of the application this message was sent by.
 
@@ -1423,9 +1401,6 @@ class Message(PartialMessage):
     If `type` is [`hikari.messages.MessageType.REPLY`][] and [`None`][], the message was deleted.
     """
 
-    interaction: typing.Optional[MessageInteraction] = attrs.field(hash=False, eq=False, repr=False)
-    """Information about the interaction this message was created by."""
-
     application_id: typing.Optional[snowflakes.Snowflake] = attrs.field(hash=False, eq=False, repr=False)
     """ID of the application this message was sent by.
 


Test patch:
diff --git a/tests/hikari/impl/test_cache.py b/tests/hikari/impl/test_cache.py
index e2c43388..f5174d4d 100644
--- a/tests/hikari/impl/test_cache.py
+++ b/tests/hikari/impl/test_cache.py
@@ -2770,7 +2770,6 @@ def test__build_message(self, cache_impl):
         mock_referenced_message_data = mock.Mock(
             cache_utilities.MessageData, build_entity=mock.Mock(return_value=mock_referenced_message)
         )
-        mock_interaction = mock.Mock()
         mock_thread = mock.Mock()
         mock_interaction_metadata = mock.Mock()
 
@@ -2801,7 +2800,6 @@ def test__build_message(self, cache_impl):
             nonce="aNonce",
             referenced_message=cache_utilities.RefCell(mock_referenced_message_data),
             stickers=(mock_sticker,),
-            interaction=mock_interaction,
             application_id=snowflakes.Snowflake(123123123123),
             components=(mock_component,),
             thread=mock_thread,
@@ -2859,7 +2857,6 @@ def test__build_message(self, cache_impl):
         assert result.nonce == "aNonce"
         assert result.referenced_message is mock_referenced_message
         assert result.application_id == 123123123123
-        assert result.interaction is mock_interaction.build_entity.return_value
         assert result.components == (mock_component,)
         assert result.thread == mock_thread
         assert result.interaction_metadata == mock_interaction_metadata
@@ -2892,7 +2889,6 @@ def test__build_message_with_null_fields(self, cache_impl):
             nonce=None,
             referenced_message=None,
             stickers=(),
-            interaction=None,
             application_id=None,
             components=(),
             thread=None,
@@ -2920,7 +2916,6 @@ def test__build_message_with_null_fields(self, cache_impl):
         assert result.nonce is None
         assert result.referenced_message is None
         assert result.application_id is None
-        assert result.interaction is None
         assert result.interaction_metadata is None
 
     @pytest.mark.skip(reason="TODO")
diff --git a/tests/hikari/impl/test_entity_factory.py b/tests/hikari/impl/test_entity_factory.py
index 02c43626..71b89d61 100644
--- a/tests/hikari/impl/test_entity_factory.py
+++ b/tests/hikari/impl/test_entity_factory.py
@@ -4052,7 +4052,6 @@ def test_deserialize_slash_command(self, entity_factory_impl, mock_app, slash_co
         assert command.name == "good name"
         assert command.description == "very good description"
         assert command.default_member_permissions == permission_models.Permissions.ADMINISTRATOR
-        assert command.is_dm_enabled is False
         assert command.is_nsfw is True
         assert command.version == 123321123
         assert command.integration_types == [application_models.ApplicationIntegrationType.GUILD_INSTALL]
@@ -4131,7 +4130,6 @@ def test_deserialize_slash_command_with_null_and_unset_values(self, entity_facto
         command = entity_factory_impl.deserialize_slash_command(payload)
 
         assert command.options is None
-        assert command.is_dm_enabled is True
         assert command.is_nsfw is False
         assert command.integration_types == []
         assert command.context_types == []
@@ -4820,7 +4818,6 @@ def test_deserialize_context_menu_command(self, entity_factory_impl, context_men
         assert command.type == commands.CommandType.USER
         assert command.name == "good name"
         assert command.default_member_permissions == permission_models.Permissions.ADMINISTRATOR
-        assert command.is_dm_enabled is False
         assert command.is_nsfw is True
         assert command.version == 123321123
         assert command.integration_types == [application_models.ApplicationIntegrationType.GUILD_INSTALL]
@@ -4836,7 +4833,6 @@ def test_deserialize_context_menu_command_with_guild_id(self, entity_factory_imp
         assert command.type == commands.CommandType.USER
         assert command.name == "good name"
         assert command.default_member_permissions == permission_models.Permissions.ADMINISTRATOR
-        assert command.is_dm_enabled is False
         assert command.is_nsfw is True
         assert command.version == 123321123
         assert command.integration_types == [application_models.ApplicationIntegrationType.GUILD_INSTALL]
@@ -4853,7 +4849,6 @@ def test_deserialize_context_menu_command_with_with_null_and_unset_values(
         command = entity_factory_impl.deserialize_context_menu_command(context_menu_command_payload)
         assert isinstance(command, commands.ContextMenuCommand)
 
-        assert command.is_dm_enabled is True
         assert command.is_nsfw is False
         assert command.integration_types == []
         assert command.context_types == []
@@ -5797,7 +5792,6 @@ def message_payload(
             "sticker_items": [partial_sticker_payload],
             "nonce": "171000788183678976",
             "application_id": "123123123123",
-            "interaction": {"id": "123123123", "type": 2, "name": "OKOKOK", "user": user_payload},
             "components": [action_row_payload, {"type": 1000000000}],
             "thread": guild_public_thread_payload,
             "interaction_metadata": partial_interaction_metadata_payload,
@@ -6031,13 +6025,6 @@ def test_deserialize_partial_message(
         assert partial_message.nonce == "171000788183678976"
         assert partial_message.application_id == 123123123123
 
-        # MessageInteraction
-        assert partial_message.interaction.id == 123123123
-        assert partial_message.interaction.name == "OKOKOK"
-        assert partial_message.interaction.type is base_interactions.InteractionType.APPLICATION_COMMAND
-        assert partial_message.interaction.user == entity_factory_impl.deserialize_user(user_payload)
-        assert isinstance(partial_message.interaction, message_models.MessageInteraction)
-
         assert partial_message.components == entity_factory_impl._deserialize_components(
             [action_row_payload], entity_factory_impl._message_component_type_mapping
         )
@@ -6112,7 +6099,6 @@ def test_deserialize_partial_message_with_unset_fields(self, entity_factory_impl
         assert partial_message.stickers is undefined.UNDEFINED
         assert partial_message.nonce is undefined.UNDEFINED
         assert partial_message.application_id is undefined.UNDEFINED
-        assert partial_message.interaction is undefined.UNDEFINED
         assert partial_message.components is undefined.UNDEFINED
 
     def test_deserialize_partial_message_with_guild_id_but_no_author(self, entity_factory_impl):
@@ -6232,13 +6218,6 @@ def test_deserialize_message(
         assert message.nonce == "171000788183678976"
         assert message.application_id == 123123123123
 
-        # MessageInteraction
-        assert message.interaction.id == 123123123
-        assert message.interaction.name == "OKOKOK"
-        assert message.interaction.type is base_interactions.InteractionType.APPLICATION_COMMAND
-        assert message.interaction.user == entity_factory_impl.deserialize_user(user_payload)
-        assert isinstance(message.interaction, message_models.MessageInteraction)
-
         assert message.components == entity_factory_impl._deserialize_components(
             [action_row_payload], entity_factory_impl._message_component_type_mapping
         )
@@ -6329,7 +6308,6 @@ def test_deserialize_message_with_null_and_unset_fields(self, entity_factory_imp
         assert message.stickers == []
         assert message.nonce is None
         assert message.application_id is None
-        assert message.interaction is None
         assert message.components == []
 
     def test_deserialize_message_with_other_unset_fields(self, entity_factory_impl, message_payload):
diff --git a/tests/hikari/impl/test_rest.py b/tests/hikari/impl/test_rest.py
index 8303f154..9d803094 100644
--- a/tests/hikari/impl/test_rest.py
+++ b/tests/hikari/impl/test_rest.py
@@ -5689,7 +5689,6 @@ async def test__create_application_command_with_optionals(self, rest_client: res
             guild=StubModel(653452134),
             options=[mock_option],
             default_member_permissions=permissions.Permissions.ADMINISTRATOR,
-            dm_enabled=False,
             nsfw=True,
         )
 
@@ -5703,7 +5702,6 @@ async def test__create_application_command_with_optionals(self, rest_client: res
                 "description": "not ok anymore",
                 "options": [rest_client._entity_factory.serialize_command_option.return_value],
                 "default_member_permissions": 8,
-                "dm_permission": False,
                 "nsfw": True,
             },
         )
@@ -5756,7 +5754,6 @@ async def test_create_slash_command(self, rest_client: rest.RESTClientImpl):
             name_localizations={locales.Locale.TR: "hhh"},
             description_localizations={locales.Locale.TR: "jello"},
             default_member_permissions=permissions.Permissions.ADMINISTRATOR,
-            dm_enabled=False,
             nsfw=True,
         )
 
@@ -5774,7 +5771,6 @@ async def test_create_slash_command(self, rest_client: rest.RESTClientImpl):
             name_localizations={"tr": "hhh"},
             description_localizations={"tr": "jello"},
             default_member_permissions=permissions.Permissions.ADMINISTRATOR,
-            dm_enabled=False,
             nsfw=True,
         )
 
@@ -5789,7 +5785,6 @@ async def test_create_context_menu_command(self, rest_client: rest.RESTClientImp
             "okokok",
             guild=mock_guild,
             default_member_permissions=permissions.Permissions.ADMINISTRATOR,
-            dm_enabled=False,
             nsfw=True,
             name_localizations={locales.Locale.TR: "hhh"},
         )
@@ -5804,7 +5799,6 @@ async def test_create_context_menu_command(self, rest_client: rest.RESTClientImp
             name="okokok",
             guild=mock_guild,
             default_member_permissions=permissions.Permissions.ADMINISTRATOR,
-            dm_enabled=False,
             nsfw=True,
             name_localizations={"tr": "hhh"},
         )
@@ -5871,7 +5865,6 @@ async def test_edit_application_command_with_optionals(self, rest_client):
             description="cancelled",
             options=[mock_option],
             default_member_permissions=permissions.Permissions.BAN_MEMBERS,
-            dm_enabled=True,
         )
 
         assert result is rest_client._entity_factory.deserialize_command.return_value
@@ -5885,7 +5878,6 @@ async def test_edit_application_command_with_optionals(self, rest_client):
                 "description": "cancelled",
                 "options": [rest_client._entity_factory.serialize_command_option.return_value],
                 "default_member_permissions": 4,
-                "dm_permission": True,
             },
         )
         rest_client._entity_factory.serialize_command_option.assert_called_once_with(mock_option)
diff --git a/tests/hikari/impl/test_special_endpoints.py b/tests/hikari/impl/test_special_endpoints.py
index a6972e50..337a055d 100644
--- a/tests/hikari/impl/test_special_endpoints.py
+++ b/tests/hikari/impl/test_special_endpoints.py
@@ -1023,11 +1023,6 @@ def test_default_member_permissions(self, stub_command):
 
         assert builder.default_member_permissions == permissions.Permissions.ADMINISTRATOR
 
-    def test_is_dm_enabled(self, stub_command):
-        builder = stub_command("oksksksk").set_is_dm_enabled(True)
-
-        assert builder.is_dm_enabled is True
-
     def test_is_nsfw_property(self, stub_command):
         builder = stub_command("oksksksk").set_is_nsfw(True)
 
@@ -1068,7 +1063,6 @@ def test_build_with_optional_data(self):
             .add_option(mock_option)
             .set_id(3412312)
             .set_default_member_permissions(permissions.Permissions.ADMINISTRATOR)
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
             .set_integration_types([applications.ApplicationIntegrationType.GUILD_INSTALL])
             .set_context_types([applications.ApplicationContextType.GUILD])
@@ -1081,7 +1075,6 @@ def test_build_with_optional_data(self):
             "name": "we are number",
             "description": "one",
             "type": 1,
-            "dm_permission": True,
             "nsfw": True,
             "default_member_permissions": 8,
             "options": [mock_entity_factory.serialize_command_option.return_value],
@@ -1115,7 +1108,6 @@ async def test_create(self):
             .set_name_localizations({locales.Locale.TR: "sayı"})
             .set_description_localizations({locales.Locale.TR: "bir"})
             .set_default_member_permissions(permissions.Permissions.BAN_MEMBERS)
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
         )
         mock_rest = mock.AsyncMock()
@@ -1132,7 +1124,6 @@ async def test_create(self):
             name_localizations={locales.Locale.TR: "sayı"},
             description_localizations={locales.Locale.TR: "bir"},
             default_member_permissions=permissions.Permissions.BAN_MEMBERS,
-            dm_enabled=True,
             nsfw=True,
         )
 
@@ -1141,7 +1132,6 @@ async def test_create_with_guild(self):
         builder = (
             special_endpoints.SlashCommandBuilder("we are number", "one")
             .set_default_member_permissions(permissions.Permissions.BAN_MEMBERS)
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
         )
         mock_rest = mock.AsyncMock()
@@ -1161,7 +1151,6 @@ async def test_create_with_guild(self):
             name_localizations={locales.Locale.TR: "sayı"},
             description_localizations={locales.Locale.TR: "bir"},
             default_member_permissions=permissions.Permissions.BAN_MEMBERS,
-            dm_enabled=True,
             nsfw=True,
         )
 
@@ -1173,7 +1162,6 @@ def test_build_with_optional_data(self):
             .set_id(3412312)
             .set_name_localizations({locales.Locale.TR: "merhaba"})
             .set_default_member_permissions(permissions.Permissions.ADMINISTRATOR)
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
             .set_integration_types([applications.ApplicationIntegrationType.GUILD_INSTALL])
             .set_context_types([applications.ApplicationContextType.GUILD])
@@ -1184,7 +1172,6 @@ def test_build_with_optional_data(self):
         assert result == {
             "name": "we are number",
             "type": 2,
-            "dm_permission": True,
             "nsfw": True,
             "default_member_permissions": 8,
             "id": "3412312",
@@ -1206,7 +1193,6 @@ async def test_create(self):
             special_endpoints.ContextMenuCommandBuilder(commands.CommandType.USER, "we are number")
             .set_default_member_permissions(permissions.Permissions.BAN_MEMBERS)
             .set_name_localizations({"meow": "nyan"})
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
         )
         mock_rest = mock.AsyncMock()
@@ -1221,7 +1207,6 @@ async def test_create(self):
             guild=undefined.UNDEFINED,
             default_member_permissions=permissions.Permissions.BAN_MEMBERS,
             name_localizations={"meow": "nyan"},
-            dm_enabled=True,
             nsfw=True,
         )
 
@@ -1231,7 +1216,6 @@ async def test_create_with_guild(self):
             special_endpoints.ContextMenuCommandBuilder(commands.CommandType.USER, "we are number")
             .set_default_member_permissions(permissions.Permissions.BAN_MEMBERS)
             .set_name_localizations({"en-ghibli": "meow"})
-            .set_is_dm_enabled(True)
             .set_is_nsfw(True)
         )
         mock_rest = mock.AsyncMock()
@@ -1246,7 +1230,6 @@ async def test_create_with_guild(self):
             guild=765234123,
             default_member_permissions=permissions.Permissions.BAN_MEMBERS,
             name_localizations={"en-ghibli": "meow"},
-            dm_enabled=True,
             nsfw=True,
         )
 
diff --git a/tests/hikari/test_commands.py b/tests/hikari/test_commands.py
index 77810263..37f980d0 100644
--- a/tests/hikari/test_commands.py
+++ b/tests/hikari/test_commands.py
@@ -46,7 +46,6 @@ def mock_command(self, mock_app):
             application_id=snowflakes.Snowflake(65234123),
             name="Name",
             default_member_permissions=None,
-            is_dm_enabled=False,
             is_nsfw=True,
             guild_id=snowflakes.Snowflake(31231235),
             version=snowflakes.Snowflake(43123123),
diff --git a/tests/hikari/test_messages.py b/tests/hikari/test_messages.py
index 05f714d1..3b8b29e2 100644
--- a/tests/hikari/test_messages.py
+++ b/tests/hikari/test_messages.py
@@ -118,7 +118,6 @@ def message():
         nonce=None,
         referenced_message=None,
         stickers=[],
-        interaction=None,
         application_id=123123,
         components=[],
         thread=None,