mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
feat(Guild): Add Guild#maximumBitrate getter. (#6455)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -534,6 +534,28 @@ class Guild extends AnonymousGuild {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum bitrate available for this guild
|
||||||
|
* @type {number}
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
get maximumBitrate() {
|
||||||
|
if (this.features.includes('VIP_REGIONS')) {
|
||||||
|
return 384000;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (PremiumTiers[this.premiumTier]) {
|
||||||
|
case PremiumTiers.TIER_1:
|
||||||
|
return 128000;
|
||||||
|
case PremiumTiers.TIER_2:
|
||||||
|
return 256000;
|
||||||
|
case PremiumTiers.TIER_3:
|
||||||
|
return 384000;
|
||||||
|
default:
|
||||||
|
return 96000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches a collection of integrations to this guild.
|
* Fetches a collection of integrations to this guild.
|
||||||
* Resolves with a collection mapping integrations by their ids.
|
* Resolves with a collection mapping integrations by their ids.
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -701,6 +701,7 @@ export class Guild extends AnonymousGuild {
|
|||||||
public readonly widgetChannel: TextChannel | null;
|
public readonly widgetChannel: TextChannel | null;
|
||||||
public widgetChannelId: Snowflake | null;
|
public widgetChannelId: Snowflake | null;
|
||||||
public widgetEnabled: boolean | null;
|
public widgetEnabled: boolean | null;
|
||||||
|
public readonly maximumBitrate: number;
|
||||||
public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
|
public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
|
||||||
public delete(): Promise<Guild>;
|
public delete(): Promise<Guild>;
|
||||||
public discoverySplashURL(options?: StaticImageURLOptions): string | null;
|
public discoverySplashURL(options?: StaticImageURLOptions): string | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user