parent
1ac8fd96ef
commit
597eb2979c
@ -1401,6 +1401,16 @@ class Guild extends AnonymousGuild {
|
|||||||
});
|
});
|
||||||
return this;
|
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.
|
* Leaves the guild.
|
||||||
|
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@ -1374,6 +1374,7 @@ export class Guild extends AnonymousGuild {
|
|||||||
public fetchWelcomeScreen(): Promise<WelcomeScreen>;
|
public fetchWelcomeScreen(): Promise<WelcomeScreen>;
|
||||||
public fetchWidget(): Promise<Widget>;
|
public fetchWidget(): Promise<Widget>;
|
||||||
public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
|
public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
|
||||||
|
public disableInvites(disabled?: boolean): Promise<Guild>;
|
||||||
public leave(): Promise<Guild>;
|
public leave(): Promise<Guild>;
|
||||||
public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
|
public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
|
||||||
public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
|
public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
|
||||||
|
Loading…
Reference in New Issue
Block a user