Skip to content

Commit

Permalink
Remove variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum committed Jan 2, 2025
1 parent 18ee4c4 commit 9894c4e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,6 @@ async def edit(

features: list[GuildFeature] = self.features.copy()

features_modified: bool = False

if community is not MISSING:
if community:
if (
Expand All @@ -1896,7 +1894,6 @@ async def edit(
if "public_updates_channel_id" in fields:
fields["public_updates_channel_id"] = None
features.remove("COMMUNITY")
features_modified = True

if disable_invites is not MISSING:
if disable_invites:
Expand All @@ -1905,7 +1902,6 @@ async def edit(
else:
if "INVITES_DISABLED" in features:
features.remove("INVITES_DISABLED")
features_modified = True

if discoverable is not MISSING:
if discoverable:
Expand All @@ -1914,7 +1910,6 @@ async def edit(
else:
if "DISCOVERABLE" in features:
features.remove("DISCOVERABLE")
features_modified = True

if raid_alerts is not MISSING:
if raid_alerts:
Expand All @@ -1923,7 +1918,6 @@ async def edit(
else:
if "RAID_ALERTS_DISABLED" not in features:
features.append("RAID_ALERTS_DISABLED")
features_modified = True

if enable_activity_feed is not MISSING:
if enable_activity_feed:
Expand All @@ -1936,9 +1930,8 @@ async def edit(
features.remove("ACTIVITY_FEED_ENABLED_BY_USER")
if "ACTIVITY_FEED_DISABLED_BY_USER" not in features:
features.append("ACTIVITY_FEED_DISABLED_BY_USER")
features_modified = True

if features_modified:
if self.features != features:
fields["features"] = features

data = await http.edit_guild(self.id, reason=reason, **fields)
Expand Down

0 comments on commit 9894c4e

Please sign in to comment.