Browse Source

fix NotificationLevel being suppressed

pull/4069/head
Xua 5 years ago
committed by Rapptz
parent
commit
5107583c5d
  1. 10
      discord/guild.py

10
discord/guild.py

@ -1050,12 +1050,10 @@ class Guild(Hashable):
fields['banner'] = banner
fields['splash'] = splash
try:
default_message_notifications = int(fields.pop('default_notifications'))
except (TypeError, KeyError):
pass
else:
fields['default_message_notifications'] = default_message_notifications
default_message_notifications = fields.get('default_notifications', self.default_notifications)
if not isinstance(default_message_notifications, NotificationLevel):
raise InvalidArgument('default_notifications field must be of type NotificationLevel')
fields['default_message_notifications'] = default_message_notifications.value
try:
afk_channel = fields.pop('afk_channel')

Loading…
Cancel
Save