Skip to content

Commit

Permalink
Improve handling of Guild#getMaxEmotes (#1080)
Browse files Browse the repository at this point in the history
Make it so the feature MORE_EMOJI is taken into concideration when calling Guild#getMaxEmotes
  • Loading branch information
Shea4 authored and MinnDevelopment committed Aug 15, 2019
1 parent cc11f87 commit cfa07ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/dv8tion/jda/api/entities/Guild.java
Expand Up @@ -411,15 +411,15 @@ default int getMaxBitrate()

/**
* The maximum amount of emotes a guild can have based on the guilds boost tier.
* This does not take into account if the guild has the MORE_EMOJI feature.
*
* @return The maximum amount of emotes
*
* @since 4.0.0
*/
default int getMaxEmotes()
{
return getBoostTier().getMaxEmotes();
int maxEmotes = getFeatures().contains("MORE_EMOJI") ? 200 : 50;
return Math.max(maxEmotes, getBoostTier().getMaxEmotes());
}

/**
Expand Down

0 comments on commit cfa07ec

Please sign in to comment.