Repository: hikari-py/hikari
Pull request #2354 (2025-05-08 10:51:53)

Add reason argument to missing routes


Patch:
diff --git a/changes/2354.feature.md b/changes/2354.feature.md
new file mode 100644
index 00000000..29912802
--- /dev/null
+++ b/changes/2354.feature.md
@@ -0,0 +1,10 @@
+Add reason parameter to the following endpoints:
+  - `delete_permission_overwrite`
+  - `delete_webhook`
+  - `delete_invite`
+  - `reposition_channels`
+  - `reposition_roles`
+  - `delete_role`
+  - `create_stage_instance`
+  - `edit_stage_instance`
+  - `delete_stage_instance`
diff --git a/changes/2355.bugfix.md b/changes/2355.bugfix.md
new file mode 100644
index 00000000..ff1630c2
--- /dev/null
+++ b/changes/2355.bugfix.md
@@ -0,0 +1,1 @@
+Added partial missing documentation for rest voice-message interaction methods.
diff --git a/hikari/api/rest.py b/hikari/api/rest.py
index 76b8b82d..c55b37a0 100644
--- a/hikari/api/rest.py
+++ b/hikari/api/rest.py
@@ -652,6 +652,7 @@ async def delete_permission_overwrite(
         self,
         channel: snowflakes.SnowflakeishOr[channels_.GuildChannel],
         target: channels_.PermissionOverwrite | guilds.PartialRole | users.PartialUser | snowflakes.Snowflakeish,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         """Delete a custom permission for an entity in a given guild channel.
 
@@ -662,6 +663,9 @@ async def delete_permission_overwrite(
             object, or the ID of an existing channel.
         target
             The channel overwrite to delete.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
@@ -1260,7 +1264,7 @@ async def create_voice_message(
                 the application (default is a thread pool which supports this
                 behaviour).
         waveform
-            The waveform of the entire message, with 1 byte
+            The waveform of the entire voice message, with 1 byte
             per datapoint encoded in base64.
 
             Official clients sample the recording at most once per 100
@@ -2110,6 +2114,7 @@ async def delete_webhook(
         webhook: snowflakes.SnowflakeishOr[webhooks.PartialWebhook],
         *,
         token: undefined.UndefinedOr[str] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         """Delete a webhook.
 
@@ -2121,6 +2126,9 @@ async def delete_webhook(
         token
             If provided, the webhook token that will be used to delete
             the webhook instead of the token the client was initialized with.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
@@ -2205,11 +2213,13 @@ async def execute_webhook_voice_message(
                 the application (default is a thread pool which supports this
                 behaviour).
         waveform
-            The waveform of the entire message, with 1 byte
+            The waveform of the entire voice message, with 1 byte
             per datapoint encoded in base64.
+
             Official clients sample the recording at most once per 100
             milliseconds, but will downsample so that no more than 256
             datapoints are in the waveform.
+
             !!! note
                 Discord states that this is implementation detail and might
                 change without notice. You have been warned!
@@ -2736,7 +2746,9 @@ async def fetch_invite(self, invite: invites.InviteCode | str, *, with_counts: b
         """
 
     @abc.abstractmethod
-    async def delete_invite(self, invite: invites.InviteCode | str) -> invites.Invite:
+    async def delete_invite(
+        self, invite: invites.InviteCode | str, reason: undefined.UndefinedOr[str] = undefined.UNDEFINED
+    ) -> invites.Invite:
         """Delete an existing invite.
 
         Parameters
@@ -2744,6 +2756,9 @@ async def delete_invite(self, invite: invites.InviteCode | str) -> invites.Invit
         invite
             The invite to delete. This may be an invite object or
             the code of an existing invite.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Returns
         -------
@@ -5555,6 +5570,7 @@ async def reposition_channels(
         self,
         guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
         positions: typing.Mapping[int, snowflakes.SnowflakeishOr[channels_.GuildChannel]],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         """Reposition the channels in a guild.
 
@@ -5566,6 +5582,9 @@ async def reposition_channels(
         positions
             A mapping of of the object or the ID of an existing channel to
             the new position, relative to their parent category, if any.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
@@ -6308,6 +6327,7 @@ async def reposition_roles(
         self,
         guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
         positions: typing.Mapping[int, snowflakes.SnowflakeishOr[guilds.PartialRole]],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         """Reposition the roles in a guild.
 
@@ -6318,6 +6338,9 @@ async def reposition_roles(
             the object or the ID of an existing guild.
         positions
             A mapping of the position to the role.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
@@ -6408,7 +6431,10 @@ async def edit_role(
 
     @abc.abstractmethod
     async def delete_role(
-        self, guild: snowflakes.SnowflakeishOr[guilds.PartialGuild], role: snowflakes.SnowflakeishOr[guilds.PartialRole]
+        self,
+        guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
+        role: snowflakes.SnowflakeishOr[guilds.PartialRole],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         """Delete a role.
 
@@ -6420,6 +6446,9 @@ async def delete_role(
         role
             The role to delete. This may be the object or the
             ID of an existing role.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
@@ -7809,6 +7838,20 @@ async def create_interaction_voice_message_response(
             This can be a resource, or string of a path on your computer
             or a URL. The Content-Type of the attachment has to start with
             `audio/`.
+        waveform
+            The waveform of the entire voice message, with 1 byte
+            per datapoint encoded in base64.
+
+            Official clients sample the recording at most once per 100
+            milliseconds, but will downsample so that no more than 256
+            datapoints are in the waveform.
+
+            !!! note
+                Discord states that this is implementation detail and might
+                change without notice. You have been warned!
+        duration
+            The duration of the voice message in seconds. This is intended to be
+            a float.
         flags
             If provided, the message flags this response should have.
 
@@ -7929,8 +7972,6 @@ async def edit_interaction_response(
             If this is [`None`][] then any present embeds are removed.
             Otherwise, the new embeds that were provided will be used as the
             replacement.
-        poll
-            If provided, the poll to set on the message.
         mentions_everyone
             If provided, whether the message should parse @everyone/@here
             mentions.
@@ -8005,6 +8046,20 @@ async def edit_interaction_voice_message_response(
             This can be a resource, or string of a path on your computer
             or a URL. The Content-Type of the attachment has to start with
             `audio/`.
+        waveform
+            The waveform of the entire voice message, with 1 byte
+            per datapoint encoded in base64.
+
+            Official clients sample the recording at most once per 100
+            milliseconds, but will downsample so that no more than 256
+            datapoints are in the waveform.
+
+            !!! note
+                Discord states that this is implementation detail and might
+                change without notice. You have been warned!
+        duration
+            The duration of the voice message in seconds. This is intended to be
+            a float.
 
 
         Returns
@@ -8816,6 +8871,7 @@ async def create_stage_instance(
         scheduled_event_id: undefined.UndefinedOr[
             snowflakes.SnowflakeishOr[scheduled_events.ScheduledEvent]
         ] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> stage_instances.StageInstance:
         """Create a stage instance in guild stage channel.
 
@@ -8831,7 +8887,9 @@ async def create_stage_instance(
             Whether to send a notification to *all* server members that the stage instance has started.
         scheduled_event_id
             The ID of the scheduled event to associate with the stage instance.
-
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Returns
         -------
@@ -8866,6 +8924,7 @@ async def edit_stage_instance(
         *,
         topic: undefined.UndefinedOr[str] = undefined.UNDEFINED,
         privacy_level: undefined.UndefinedOr[int | stage_instances.StageInstancePrivacyLevel] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> stage_instances.StageInstance:
         """Edit the stage instance in a guild stage channel.
 
@@ -8875,8 +8934,11 @@ async def edit_stage_instance(
             The channel that the stage instance is associated with.
         topic
             The topic for the stage instance.
-        privacy_level:
+        privacy_level
             The privacy level for the stage instance.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Returns
         -------
@@ -8906,13 +8968,20 @@ async def edit_stage_instance(
         """
 
     @abc.abstractmethod
-    async def delete_stage_instance(self, channel: snowflakes.SnowflakeishOr[channels_.GuildStageChannel]) -> None:
+    async def delete_stage_instance(
+        self,
+        channel: snowflakes.SnowflakeishOr[channels_.GuildStageChannel],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
+    ) -> None:
         """Delete the stage instance.
 
         Parameters
         ----------
         channel
             The guild stage channel to fetch the stage instance from.
+        reason
+            If provided, the reason that will be recorded in the audit logs.
+            Maximum of 512 characters.
 
         Raises
         ------
diff --git a/hikari/impl/rest.py b/hikari/impl/rest.py
index 305fca47..ce2232f9 100644
--- a/hikari/impl/rest.py
+++ b/hikari/impl/rest.py
@@ -1293,9 +1293,10 @@ async def delete_permission_overwrite(
         self,
         channel: snowflakes.SnowflakeishOr[channels_.GuildChannel],
         target: channels_.PermissionOverwrite | guilds.PartialRole | users.PartialUser | snowflakes.Snowflakeish,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         route = routes.DELETE_CHANNEL_PERMISSIONS.compile(channel=channel, overwrite=target)
-        await self._request(route)
+        await self._request(route, reason=reason)
 
     @typing_extensions.override
     async def fetch_channel_invites(
@@ -2052,6 +2053,7 @@ async def delete_webhook(
         webhook: snowflakes.SnowflakeishOr[webhooks.PartialWebhook],
         *,
         token: undefined.UndefinedOr[str] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         if token is undefined.UNDEFINED:
             route = routes.DELETE_WEBHOOK.compile(webhook=webhook)
@@ -2060,7 +2062,7 @@ async def delete_webhook(
             route = routes.DELETE_WEBHOOK_WITH_TOKEN.compile(webhook=webhook, token=token)
             auth = None
 
-        await self._request(route, auth=auth)
+        await self._request(route, auth=auth, reason=reason)
 
     @typing_extensions.override
     async def execute_webhook_voice_message(
@@ -2276,9 +2278,11 @@ async def fetch_invite(self, invite: invites.InviteCode | str, *, with_counts: b
         return self._entity_factory.deserialize_invite(response)
 
     @typing_extensions.override
-    async def delete_invite(self, invite: invites.InviteCode | str) -> invites.Invite:
+    async def delete_invite(
+        self, invite: invites.InviteCode | str, reason: undefined.UndefinedOr[str] = undefined.UNDEFINED
+    ) -> invites.Invite:
         route = routes.DELETE_INVITE.compile(invite_code=invite if isinstance(invite, str) else invite.code)
-        response = await self._request(route)
+        response = await self._request(route, reason=reason)
         assert isinstance(response, dict)
         return self._entity_factory.deserialize_invite(response)
 
@@ -3516,10 +3520,11 @@ async def reposition_channels(
         self,
         guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
         positions: typing.Mapping[int, snowflakes.SnowflakeishOr[channels_.GuildChannel]],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         route = routes.PATCH_GUILD_CHANNELS.compile(guild=guild)
         body = [{"id": str(int(channel)), "position": pos} for pos, channel in positions.items()]
-        await self._request(route, json=body)
+        await self._request(route, json=body, reason=reason)
 
     @typing_extensions.override
     async def fetch_member(
@@ -3801,10 +3806,11 @@ async def reposition_roles(
         self,
         guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
         positions: typing.Mapping[int, snowflakes.SnowflakeishOr[guilds.PartialRole]],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         route = routes.PATCH_GUILD_ROLES.compile(guild=guild)
         body = [{"id": str(int(role)), "position": pos} for pos, role in positions.items()]
-        await self._request(route, json=body)
+        await self._request(route, json=body, reason=reason)
 
     @typing_extensions.override
     async def edit_role(
@@ -3854,10 +3860,13 @@ async def edit_role(
 
     @typing_extensions.override
     async def delete_role(
-        self, guild: snowflakes.SnowflakeishOr[guilds.PartialGuild], role: snowflakes.SnowflakeishOr[guilds.PartialRole]
+        self,
+        guild: snowflakes.SnowflakeishOr[guilds.PartialGuild],
+        role: snowflakes.SnowflakeishOr[guilds.PartialRole],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> None:
         route = routes.DELETE_GUILD_ROLE.compile(guild=guild, role=role)
-        await self._request(route)
+        await self._request(route, reason=reason)
 
     @typing_extensions.override
     async def estimate_guild_prune_count(
@@ -4927,6 +4936,7 @@ async def create_stage_instance(
         scheduled_event_id: undefined.UndefinedOr[
             snowflakes.SnowflakeishOr[scheduled_events.ScheduledEvent]
         ] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> stage_instances.StageInstance:
         route = routes.POST_STAGE_INSTANCE.compile()
         body = data_binding.JSONObjectBuilder()
@@ -4936,7 +4946,7 @@ async def create_stage_instance(
         body.put("send_start_notification", send_start_notification)
         body.put_snowflake("guild_scheduled_event_id", scheduled_event_id)
 
-        response = await self._request(route, json=body)
+        response = await self._request(route, json=body, reason=reason)
         assert isinstance(response, dict)
         return self._entity_factory.deserialize_stage_instance(response)
 
@@ -4947,20 +4957,25 @@ async def edit_stage_instance(
         *,
         topic: undefined.UndefinedOr[str] = undefined.UNDEFINED,
         privacy_level: undefined.UndefinedOr[int | stage_instances.StageInstancePrivacyLevel] = undefined.UNDEFINED,
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
     ) -> stage_instances.StageInstance:
         route = routes.PATCH_STAGE_INSTANCE.compile(channel=channel)
         body = data_binding.JSONObjectBuilder()
         body.put("topic", topic)
         body.put("privacy_level", privacy_level)
 
-        response = await self._request(route, json=body)
+        response = await self._request(route, json=body, reason=reason)
         assert isinstance(response, dict)
         return self._entity_factory.deserialize_stage_instance(response)
 
     @typing_extensions.override
-    async def delete_stage_instance(self, channel: snowflakes.SnowflakeishOr[channels_.GuildStageChannel]) -> None:
+    async def delete_stage_instance(
+        self,
+        channel: snowflakes.SnowflakeishOr[channels_.GuildStageChannel],
+        reason: undefined.UndefinedOr[str] = undefined.UNDEFINED,
+    ) -> None:
         route = routes.DELETE_STAGE_INSTANCE.compile(channel=channel)
-        await self._request(route)
+        await self._request(route, reason=reason)
 
     @typing_extensions.override
     async def fetch_poll_voters(


Test patch:
diff --git a/tests/hikari/impl/test_rest.py b/tests/hikari/impl/test_rest.py
index c28f91ed..2722744c 100644
--- a/tests/hikari/impl/test_rest.py
+++ b/tests/hikari/impl/test_rest.py
@@ -2692,8 +2692,8 @@ async def test_delete_permission_overwrite(self, rest_client):
         expected_route = routes.DELETE_CHANNEL_PERMISSIONS.compile(channel=123, overwrite=456)
         rest_client._request = mock.AsyncMock()
 
-        await rest_client.delete_permission_overwrite(StubModel(123), StubModel(456))
-        rest_client._request.assert_awaited_once_with(expected_route)
+        await rest_client.delete_permission_overwrite(StubModel(123), StubModel(456), reason="testing")
+        rest_client._request.assert_awaited_once_with(expected_route, reason="testing")
 
     async def test_fetch_channel_invites(self, rest_client):
         invite1 = StubModel(456)
@@ -3419,15 +3419,17 @@ async def test_delete_webhook(self, rest_client):
         expected_route = routes.DELETE_WEBHOOK_WITH_TOKEN.compile(webhook=123, token="token")
         rest_client._request = mock.AsyncMock(return_value={"id": "456"})
 
-        await rest_client.delete_webhook(StubModel(123), token="token")
-        rest_client._request.assert_awaited_once_with(expected_route, auth=None)
+        await rest_client.delete_webhook(StubModel(123), token="token", reason="testing")
+        rest_client._request.assert_awaited_once_with(expected_route, auth=None, reason="testing")
 
     async def test_delete_webhook_without_token(self, rest_client):
         expected_route = routes.DELETE_WEBHOOK.compile(webhook=123)
         rest_client._request = mock.AsyncMock(return_value={"id": "456"})
 
         await rest_client.delete_webhook(StubModel(123))
-        rest_client._request.assert_awaited_once_with(expected_route, auth=undefined.UNDEFINED)
+        rest_client._request.assert_awaited_once_with(
+            expected_route, auth=undefined.UNDEFINED, reason=undefined.UNDEFINED
+        )
 
     @pytest.mark.parametrize(
         ("webhook", "avatar_url"),
@@ -3902,12 +3904,12 @@ async def test_delete_invite(self, rest_client):
         expected_route = routes.DELETE_INVITE.compile(invite_code="Jx4cNGG")
         rest_client._request = mock.AsyncMock(return_value={"ok": "NO"})
 
-        result = await rest_client.delete_invite(input_invite)
+        result = await rest_client.delete_invite(input_invite, reason="testing")
 
         assert result is rest_client._entity_factory.deserialize_invite.return_value
 
         rest_client._entity_factory.deserialize_invite.assert_called_once_with(rest_client._request.return_value)
-        rest_client._request.assert_awaited_once_with(expected_route)
+        rest_client._request.assert_awaited_once_with(expected_route, reason="testing")
 
     async def test_fetch_my_user(self, rest_client):
         user = StubModel(123)
@@ -4988,10 +4990,12 @@ async def test_create_message_thread_without_optionals(self, rest_client: rest.R
         rest_client._request = mock.AsyncMock(return_value={"id": "54123123", "name": "dlksksldalksad"})
         rest_client._entity_factory.deserialize_guild_thread.return_value = mock.Mock(channels.GuildNewsThread)
 
-        result = await rest_client.create_message_thread(StubModel(123432), StubModel(595959), "Sass alert!!!")
+        result = await rest_client.create_message_thread(
+            StubModel(123432), StubModel(595959), "Sass alert!!!", reason="because why not"
+        )
 
         assert result is rest_client._entity_factory.deserialize_guild_thread.return_value
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason=undefined.UNDEFINED)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason="because why not")
         rest_client._entity_factory.deserialize_guild_thread.assert_called_once_with(rest_client._request.return_value)
 
     async def test_create_message_thread_with_all_undefined(self, rest_client: rest.RESTClientImpl):
@@ -5001,11 +5005,15 @@ async def test_create_message_thread_with_all_undefined(self, rest_client: rest.
         rest_client._entity_factory.deserialize_guild_thread.return_value = mock.Mock(channels.GuildNewsThread)
 
         result = await rest_client.create_message_thread(
-            StubModel(123432), StubModel(595959), "Sass alert!!!", auto_archive_duration=undefined.UNDEFINED
+            StubModel(123432),
+            StubModel(595959),
+            "Sass alert!!!",
+            auto_archive_duration=undefined.UNDEFINED,
+            reason="because why not",
         )
 
         assert result is rest_client._entity_factory.deserialize_guild_thread.return_value
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason=undefined.UNDEFINED)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason="because why not")
         rest_client._entity_factory.deserialize_guild_thread.assert_called_once_with(rest_client._request.return_value)
 
     @pytest.mark.parametrize(
@@ -5057,10 +5065,11 @@ async def test_create_thread_without_optionals(self, rest_client: rest.RESTClien
             StubModel(321123),
             channels.ChannelType.GUILD_PRIVATE_THREAD,
             "Something something send help, they're keeping the catgirls locked up at <REDACTED>",
+            reason="because why not",
         )
 
         assert result is rest_client._entity_factory.deserialize_guild_thread.return_value
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason=undefined.UNDEFINED)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason="because why not")
         rest_client._entity_factory.deserialize_guild_thread.assert_called_once_with(rest_client._request.return_value)
 
     async def test_create_thread_with_all_undefined(self, rest_client: rest.RESTClientImpl):
@@ -5076,10 +5085,11 @@ async def test_create_thread_with_all_undefined(self, rest_client: rest.RESTClie
             channels.ChannelType.GUILD_PRIVATE_THREAD,
             "Something something send help, they're keeping the catgirls locked up at <REDACTED>",
             auto_archive_duration=undefined.UNDEFINED,
+            reason="because why not",
         )
 
         assert result is rest_client._entity_factory.deserialize_guild_thread.return_value
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason=undefined.UNDEFINED)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_payload, reason="because why not")
         rest_client._entity_factory.deserialize_guild_thread.assert_called_once_with(rest_client._request.return_value)
 
     @pytest.mark.parametrize(
@@ -5306,9 +5316,11 @@ async def test_reposition_channels(self, rest_client):
         expected_json = [{"id": "456", "position": 1}, {"id": "789", "position": 2}]
         rest_client._request = mock.AsyncMock()
 
-        await rest_client.reposition_channels(StubModel(123), {1: StubModel(456), 2: StubModel(789)})
+        await rest_client.reposition_channels(
+            StubModel(123), {1: StubModel(456), 2: StubModel(789)}, reason="because why not"
+        )
 
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_json)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_json, reason="because why not")
 
     async def test_fetch_member(self, rest_client):
         member = StubModel(789)
@@ -5600,9 +5612,11 @@ async def test_reposition_roles(self, rest_client):
         expected_json = [{"id": "456", "position": 1}, {"id": "789", "position": 2}]
         rest_client._request = mock.AsyncMock()
 
-        await rest_client.reposition_roles(StubModel(123), {1: StubModel(456), 2: StubModel(789)})
+        await rest_client.reposition_roles(
+            StubModel(123), {1: StubModel(456), 2: StubModel(789)}, reason="because why not"
+        )
 
-        rest_client._request.assert_awaited_once_with(expected_route, json=expected_json)
+        rest_client._request.assert_awaited_once_with(expected_route, json=expected_json, reason="because why not")
 
     async def test_edit_role(self, rest_client, file_resource_patch):
         expected_route = routes.PATCH_GUILD_ROLE.compile(guild=123, role=789)
@@ -5648,9 +5662,9 @@ async def test_delete_role(self, rest_client):
         expected_route = routes.DELETE_GUILD_ROLE.compile(guild=123, role=456)
         rest_client._request = mock.AsyncMock()
 
-        await rest_client.delete_role(StubModel(123), StubModel(456))
+        await rest_client.delete_role(StubModel(123), StubModel(456), reason="testing")
 
-        rest_client._request.assert_awaited_once_with(expected_route)
+        rest_client._request.assert_awaited_once_with(expected_route, reason="testing")
 
     async def test_estimate_guild_prune_count(self, rest_client):
         expected_route = routes.GET_GUILD_PRUNE.compile(guild=123)
@@ -7008,11 +7022,11 @@ async def test_create_stage_instance(self, rest_client):
         rest_client._request = mock.AsyncMock(return_value=mock_payload)
 
         result = await rest_client.create_stage_instance(
-            channel=StubModel(7334), topic="ur mom", scheduled_event_id=StubModel(3361203239)
+            channel=StubModel(7334), topic="ur mom", scheduled_event_id=StubModel(3361203239), reason="testing"
         )
 
         assert result is rest_client._entity_factory.deserialize_stage_instance.return_value
-        rest_client._request.assert_called_once_with(expected_route, json=expected_json)
+        rest_client._request.assert_called_once_with(expected_route, json=expected_json, reason="testing")
         rest_client._entity_factory.deserialize_stage_instance.assert_called_once_with(mock_payload)
 
     async def test_edit_stage_instance(self, rest_client):
@@ -7029,20 +7043,23 @@ async def test_edit_stage_instance(self, rest_client):
         rest_client._request = mock.AsyncMock(return_value=mock_payload)
 
         result = await rest_client.edit_stage_instance(
-            channel=StubModel(7334), topic="ur mom", privacy_level=stage_instances.StageInstancePrivacyLevel.GUILD_ONLY
+            channel=StubModel(7334),
+            topic="ur mom",
+            privacy_level=stage_instances.StageInstancePrivacyLevel.GUILD_ONLY,
+            reason="testing",
         )
 
         assert result is rest_client._entity_factory.deserialize_stage_instance.return_value
-        rest_client._request.assert_called_once_with(expected_route, json=expected_json)
+        rest_client._request.assert_called_once_with(expected_route, json=expected_json, reason="testing")
         rest_client._entity_factory.deserialize_stage_instance.assert_called_once_with(mock_payload)
 
     async def test_delete_stage_instance(self, rest_client):
         expected_route = routes.DELETE_STAGE_INSTANCE.compile(channel=7334)
         rest_client._request = mock.AsyncMock()
 
-        await rest_client.delete_stage_instance(channel=StubModel(7334))
+        await rest_client.delete_stage_instance(channel=StubModel(7334), reason="testing")
 
-        rest_client._request.assert_called_once_with(expected_route)
+        rest_client._request.assert_called_once_with(expected_route, reason="testing")
 
     async def test_fetch_poll_voters(self, rest_client: rest.RESTClientImpl):
         expected_route = routes.GET_POLL_ANSWER.compile(