feat(guild): add support for setting MFA level (#8024)

This commit is contained in:
Suneet Tipirneni
2022-06-10 15:26:11 -04:00
committed by GitHub
parent fbe67e1025
commit c5176be14b
2 changed files with 17 additions and 0 deletions

View File

@@ -1138,6 +1138,22 @@ class Guild extends AnonymousGuild {
return this;
}
/**
* Sets the guild's MFA level
* @param {GuildMFALevel} level The MFA level
* @param {string} [reason] Reason for changing the guild's MFA level
* @returns {Promise<Guild>}
*/
async setMFALevel(level, reason) {
await this.client.rest.post(Routes.guildMFA(this.id), {
body: {
level,
},
reason,
});
return this;
}
/**
* Leaves the guild.
* @returns {Promise<Guild>}

View File

@@ -1167,6 +1167,7 @@ export class Guild extends AnonymousGuild {
public setVerificationLevel(verificationLevel: GuildVerificationLevel | null, reason?: string): Promise<Guild>;
public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>;
public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
public setMFALevel(level: GuildMFALevel, reason?: string): Promise<Guild>;
public toJSON(): unknown;
}