From 8b18fa307b5e4a9acc6c057b7489c4d11de359b4 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 25 Nov 2018 01:42:33 -0500 Subject: Add support for default notification level in audit logs and Guild.edit --- discord/guild.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'discord/guild.py') diff --git a/discord/guild.py b/discord/guild.py index 5d99aa06..0e4c3099 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -748,6 +748,8 @@ class Guild(Hashable): be owner of the guild to do this. verification_level: :class:`VerificationLevel` The new verification level for the guild. + default_notifications: :class:`NotificationLevel` + The new default notification level for the guild. vanity_code: str The new vanity code for the guild. system_channel: Optional[:class:`TextChannel`] @@ -798,6 +800,13 @@ class Guild(Hashable): fields['icon'] = icon fields['splash'] = splash + try: + default_message_notifications = int(fields.pop('default_notifications')) + except (TypeError, KeyError): + pass + else: + fields['default_message_notifications'] = default_message_notifications + try: afk_channel = fields.pop('afk_channel') except KeyError: -- cgit v1.2.3