@@ -236,6 +236,8 @@ class Guild(BaseGuild):
236
236
"""A cache of all command permissions for this guild"""
237
237
premium_progress_bar_enabled : bool = attrs .field (repr = False , default = False )
238
238
"""True if the guild has the boost progress bar enabled"""
239
+ safety_alerts_channel_id : Optional [Snowflake_Type ] = attrs .field (repr = False , default = None )
240
+ """The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord."""
239
241
240
242
_owner_id : Snowflake_Type = attrs .field (repr = False , converter = to_snowflake )
241
243
_channel_ids : Set [Snowflake_Type ] = attrs .field (repr = False , factory = set )
@@ -396,6 +398,11 @@ def public_updates_channel(self) -> Optional["models.GuildText"]:
396
398
"""Returns the channel where server staff receive notices from Discord."""
397
399
return self ._client .cache .get_channel (self .public_updates_channel_id )
398
400
401
+ @property
402
+ def safety_alerts_channel (self ) -> Optional ["models.GuildText" ]:
403
+ """Returns the channel where server staff receive safety alerts from Discord."""
404
+ return self ._client .cache .get_channel (self .safety_alerts_channel_id )
405
+
399
406
@property
400
407
def emoji_limit (self ) -> int :
401
408
"""The maximum number of emoji this guild can have."""
@@ -759,6 +766,7 @@ async def edit(
759
766
banner : Absent [Optional [UPLOADABLE_TYPE ]] = MISSING ,
760
767
rules_channel : Absent [Optional [Union ["models.GuildText" , Snowflake_Type ]]] = MISSING ,
761
768
public_updates_channel : Absent [Optional [Union ["models.GuildText" , Snowflake_Type ]]] = MISSING ,
769
+ safety_alerts_channel : Absent [Optional [Union ["models.GuildText" , Snowflake_Type ]]] = MISSING ,
762
770
preferred_locale : Absent [Optional [str ]] = MISSING ,
763
771
premium_progress_bar_enabled : Absent [Optional [bool ]] = False ,
764
772
# ToDo: Fill in guild features. No idea how this works - https://discord.com/developers/docs/resources/guild#guild-object-guild-features
@@ -785,6 +793,7 @@ async def edit(
785
793
system_channel_flags: The new settings for the system channel.
786
794
rules_channel: The text channel where your rules and community guidelines are displayed.
787
795
public_updates_channel: The text channel where updates from discord should appear.
796
+ safety_alerts_channel: The text channel where safety alerts from discord should appear.
788
797
preferred_locale: The new preferred locale of the guild. Must be an ISO 639 code.
789
798
premium_progress_bar_enabled: The status of the Nitro boost bar.
790
799
features: The enabled guild features
@@ -811,6 +820,7 @@ async def edit(
811
820
system_channel_flags = int (system_channel_flags ) if system_channel_flags else MISSING ,
812
821
rules_channel_id = to_snowflake (rules_channel ) if rules_channel else MISSING ,
813
822
public_updates_channel_id = to_snowflake (public_updates_channel ) if public_updates_channel else MISSING ,
823
+ safety_alerts_channel_id = to_snowflake (safety_alerts_channel ) if safety_alerts_channel else MISSING ,
814
824
preferred_locale = preferred_locale ,
815
825
premium_progress_bar_enabled = premium_progress_bar_enabled if premium_progress_bar_enabled else False ,
816
826
features = features ,
0 commit comments