diff --git a/CHANGELOG.md b/CHANGELOG.md index d148e47968..9f12f67931 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,8 @@ These changes are available on the `master` branch, but have not yet been releas - Removed the `oldest_first` parameter from `Guild.audit_logs` in favor of the `before` and `after` parameters. ([#2371](https://github.com/Pycord-Development/pycord/pull/2371)) +- Removed the `vanity_code` parameter from `Guild.edit`. + ([#2480](https://github.com/Pycord-Development/pycord/pull/2480)) ## [2.5.0] - 2024-03-02 diff --git a/discord/guild.py b/discord/guild.py index b92ffefb19..eda67a2e13 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -1654,7 +1654,6 @@ async def edit( default_notifications: NotificationLevel = MISSING, verification_level: VerificationLevel = MISSING, explicit_content_filter: ContentFilter = MISSING, - vanity_code: str = MISSING, system_channel: TextChannel | None = MISSING, system_channel_flags: SystemChannelFlags = MISSING, preferred_locale: str = MISSING, @@ -1720,8 +1719,6 @@ async def edit( The new default notification level for the guild. explicit_content_filter: :class:`ContentFilter` The new explicit content filter for the guild. - vanity_code: :class:`str` - The new vanity code for the guild. system_channel: Optional[:class:`TextChannel`] The new channel that is used for the system channel. Could be ``None`` for no system channel. system_channel_flags: :class:`SystemChannelFlags` @@ -1764,9 +1761,6 @@ async def edit( http = self._state.http - if vanity_code is not MISSING: - await http.change_vanity_code(self.id, vanity_code, reason=reason) - fields: dict[str, Any] = {} if name is not MISSING: fields["name"] = name diff --git a/discord/http.py b/discord/http.py index b29b35d4b2..65c1dab0eb 100644 --- a/discord/http.py +++ b/discord/http.py @@ -1628,16 +1628,6 @@ def get_vanity_code(self, guild_id: Snowflake) -> Response[invite.VanityInvite]: Route("GET", "/guilds/{guild_id}/vanity-url", guild_id=guild_id) ) - def change_vanity_code( - self, guild_id: Snowflake, code: str, *, reason: str | None = None - ) -> Response[None]: - payload: dict[str, Any] = {"code": code} - return self.request( - Route("PATCH", "/guilds/{guild_id}/vanity-url", guild_id=guild_id), - json=payload, - reason=reason, - ) - def get_all_guild_channels( self, guild_id: Snowflake ) -> Response[list[guild.GuildChannel]]: