@@ -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.
|
||||
|
Reference in New Issue
Block a user