diff --git a/changes/2079.bugfix.md b/changes/2079.bugfix.md new file mode 100644 index 000000000..5c5424640 --- /dev/null +++ b/changes/2079.bugfix.md @@ -0,0 +1 @@ +Removed rate_limit_per_user parameter from create_guild_news_channel diff --git a/hikari/api/rest.py b/hikari/api/rest.py index bd1bb960e..cb46aeeee 100644 --- a/hikari/api/rest.py +++ b/hikari/api/rest.py @@ -4286,7 +4286,6 @@ async def create_guild_news_channel( position: undefined.UndefinedOr[int] = undefined.UNDEFINED, topic: undefined.UndefinedOr[str] = undefined.UNDEFINED, nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED, - rate_limit_per_user: undefined.UndefinedOr[time.Intervalish] = undefined.UNDEFINED, permission_overwrites: undefined.UndefinedOr[ typing.Sequence[channels_.PermissionOverwrite] ] = undefined.UNDEFINED, @@ -4310,10 +4309,6 @@ async def create_guild_news_channel( If provided, the channels topic. Maximum 1024 characters. nsfw If provided, whether to mark the channel as NSFW. - rate_limit_per_user - If provided, the amount of seconds a user has to wait - before being able to send another message in the channel. - Maximum 21600 seconds. permission_overwrites If provided, the permission overwrites for the channel. category diff --git a/hikari/guilds.py b/hikari/guilds.py index 1decc55c2..46a722be9 100644 --- a/hikari/guilds.py +++ b/hikari/guilds.py @@ -2026,7 +2026,6 @@ async def create_news_channel( position: undefined.UndefinedOr[int] = undefined.UNDEFINED, topic: undefined.UndefinedOr[str] = undefined.UNDEFINED, nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED, - rate_limit_per_user: undefined.UndefinedOr[time.Intervalish] = undefined.UNDEFINED, permission_overwrites: undefined.UndefinedOr[ typing.Sequence[channels_.PermissionOverwrite] ] = undefined.UNDEFINED, @@ -2046,10 +2045,6 @@ async def create_news_channel( If provided, the channels topic. Maximum 1024 characters. nsfw If provided, whether to mark the channel as NSFW. - rate_limit_per_user - If provided, the amount of seconds a user has to wait - before being able to send another message in the channel. - Maximum 21600 seconds. permission_overwrites If provided, the permission overwrites for the channel. category @@ -2086,7 +2081,6 @@ async def create_news_channel( position=position, topic=topic, nsfw=nsfw, - rate_limit_per_user=rate_limit_per_user, permission_overwrites=permission_overwrites, category=category, reason=reason, diff --git a/hikari/impl/rest.py b/hikari/impl/rest.py index 1fcf9c2ce..c9314c0dd 100644 --- a/hikari/impl/rest.py +++ b/hikari/impl/rest.py @@ -2745,7 +2745,6 @@ async def create_guild_news_channel( position: undefined.UndefinedOr[int] = undefined.UNDEFINED, topic: undefined.UndefinedOr[str] = undefined.UNDEFINED, nsfw: undefined.UndefinedOr[bool] = undefined.UNDEFINED, - rate_limit_per_user: undefined.UndefinedOr[time.Intervalish] = undefined.UNDEFINED, permission_overwrites: undefined.UndefinedOr[ typing.Sequence[channels_.PermissionOverwrite] ] = undefined.UNDEFINED, @@ -2760,7 +2759,6 @@ async def create_guild_news_channel( position=position, topic=topic, nsfw=nsfw, - rate_limit_per_user=rate_limit_per_user, permission_overwrites=permission_overwrites, category=category, default_auto_archive_duration=default_auto_archive_duration, diff --git a/tests/hikari/impl/test_rest.py b/tests/hikari/impl/test_rest.py index 8303f1543..606c506bb 100644 --- a/tests/hikari/impl/test_rest.py +++ b/tests/hikari/impl/test_rest.py @@ -4361,7 +4361,6 @@ async def test_create_guild_news_channel(self, rest_client: rest.RESTClientImpl) position=1, topic="general news", nsfw=False, - rate_limit_per_user=60, permission_overwrites=[overwrite1, overwrite2], category=category_channel, reason="because we need one", @@ -4376,7 +4375,6 @@ async def test_create_guild_news_channel(self, rest_client: rest.RESTClientImpl) position=1, topic="general news", nsfw=False, - rate_limit_per_user=60, permission_overwrites=[overwrite1, overwrite2], category=category_channel, reason="because we need one", diff --git a/tests/hikari/test_guilds.py b/tests/hikari/test_guilds.py index a8d657326..76a47c906 100644 --- a/tests/hikari/test_guilds.py +++ b/tests/hikari/test_guilds.py @@ -771,9 +771,7 @@ async def test_create_text_channel(self, model): async def test_create_news_channel(self, model): model.app.rest.create_guild_news_channel = mock.AsyncMock() - news_channel = await model.create_news_channel( - "cool news channel", position=1, nsfw=False, rate_limit_per_user=420 - ) + news_channel = await model.create_news_channel("cool news channel", position=1, nsfw=False) model.app.rest.create_guild_news_channel.assert_awaited_once_with( 90210, @@ -781,7 +779,6 @@ async def test_create_news_channel(self, model): position=1, topic=undefined.UNDEFINED, nsfw=False, - rate_limit_per_user=420, permission_overwrites=undefined.UNDEFINED, category=undefined.UNDEFINED, reason=undefined.UNDEFINED,