feat: add INVITES_DISABLED guild feature

#9051 djs
This commit is contained in:
March 7th
2023-01-17 18:47:44 +07:00
parent 1ac8fd96ef
commit 597eb2979c
2 changed files with 11 additions and 0 deletions

View File

@@ -1401,6 +1401,16 @@ class Guild extends AnonymousGuild {
});
return this;
}
/**
* Sets whether this guild's invites are disabled.
* @param {boolean} [disabled=true] Whether the invites are disabled
* @returns {Promise<Guild>}
*/
disableInvites(disabled = true) {
const features = this.features.filter(feature => feature !== 'INVITES_DISABLED');
if (disabled) features.push('INVITES_DISABLED');
return this.edit({ features });
}
/**
* Leaves the guild.