diff --git a/src/structures/Guild.js b/src/structures/Guild.js index cbd5eacbd..61eae7a44 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -634,6 +634,7 @@ class Guild extends Base { * @property {Base64Resolvable} [icon] The icon of the guild * @property {GuildMemberResolvable} [owner] The owner of the guild * @property {Base64Resolvable} [splash] The splash screen of the guild + * @property {DefaultMessageNotifications|number} [defaultMessageNotifications] The default message notifications */ /** @@ -668,6 +669,11 @@ class Guild extends Base { if (typeof data.explicitContentFilter !== 'undefined') { _data.explicit_content_filter = Number(data.explicitContentFilter); } + if (typeof data.defaultMessageNotifications !== 'undefined') { + _data.default_message_notifications = typeof data.defaultMessageNotifications === 'string' ? + DefaultMessageNotifications.indexOf(data.defaultMessageNotifications) : + Number(data.defaultMessageNotifications); + } return this.client.api.guilds(this.id).patch({ data: _data, reason }) .then(newData => this.client.actions.GuildUpdate.handle(newData).updated); }