Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ratelimit_per_user field from create_news_channel #2079

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/2079.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed rate_limit_per_user parameter from create_guild_news_channel
5 changes: 0 additions & 5 deletions hikari/api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions hikari/guilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions hikari/impl/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions tests/hikari/impl/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 1 addition & 4 deletions tests/hikari/test_guilds.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,17 +771,14 @@ 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,
"cool news channel",
position=1,
topic=undefined.UNDEFINED,
nsfw=False,
rate_limit_per_user=420,
permission_overwrites=undefined.UNDEFINED,
category=undefined.UNDEFINED,
reason=undefined.UNDEFINED,
Expand Down