Skip to content

Commit 73e4e37

Browse files
authored
chore: remove vanity_code from Guild.edit (#2491)
chore: remove vanity_code from Guild.edit
1 parent d1702cf commit 73e4e37

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ These changes are available on the `master` branch, but have not yet been releas
108108
- Removed the `oldest_first` parameter from `Guild.audit_logs` in favor of the `before`
109109
and `after` parameters.
110110
([#2371](https://github.com/Pycord-Development/pycord/pull/2371))
111+
- Removed the `vanity_code` parameter from `Guild.edit`.
112+
([#2480](https://github.com/Pycord-Development/pycord/pull/2480))
111113

112114
## [2.5.0] - 2024-03-02
113115

discord/guild.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,6 @@ async def edit(
16541654
default_notifications: NotificationLevel = MISSING,
16551655
verification_level: VerificationLevel = MISSING,
16561656
explicit_content_filter: ContentFilter = MISSING,
1657-
vanity_code: str = MISSING,
16581657
system_channel: TextChannel | None = MISSING,
16591658
system_channel_flags: SystemChannelFlags = MISSING,
16601659
preferred_locale: str = MISSING,
@@ -1720,8 +1719,6 @@ async def edit(
17201719
The new default notification level for the guild.
17211720
explicit_content_filter: :class:`ContentFilter`
17221721
The new explicit content filter for the guild.
1723-
vanity_code: :class:`str`
1724-
The new vanity code for the guild.
17251722
system_channel: Optional[:class:`TextChannel`]
17261723
The new channel that is used for the system channel. Could be ``None`` for no system channel.
17271724
system_channel_flags: :class:`SystemChannelFlags`
@@ -1764,9 +1761,6 @@ async def edit(
17641761

17651762
http = self._state.http
17661763

1767-
if vanity_code is not MISSING:
1768-
await http.change_vanity_code(self.id, vanity_code, reason=reason)
1769-
17701764
fields: dict[str, Any] = {}
17711765
if name is not MISSING:
17721766
fields["name"] = name

discord/http.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,16 +1628,6 @@ def get_vanity_code(self, guild_id: Snowflake) -> Response[invite.VanityInvite]:
16281628
Route("GET", "/guilds/{guild_id}/vanity-url", guild_id=guild_id)
16291629
)
16301630

1631-
def change_vanity_code(
1632-
self, guild_id: Snowflake, code: str, *, reason: str | None = None
1633-
) -> Response[None]:
1634-
payload: dict[str, Any] = {"code": code}
1635-
return self.request(
1636-
Route("PATCH", "/guilds/{guild_id}/vanity-url", guild_id=guild_id),
1637-
json=payload,
1638-
reason=reason,
1639-
)
1640-
16411631
def get_all_guild_channels(
16421632
self, guild_id: Snowflake
16431633
) -> Response[list[guild.GuildChannel]]:

0 commit comments

Comments
 (0)