powercord-org / powercord

A lightweight @discord client mod focused on simplicity and performance.
MIT License
1.2k stars 147 forks source link

Emoji Utility does not respect extra slots from Nitro boosting #199

Closed NurMarvin closed 5 years ago

NurMarvin commented 5 years ago

Describe the bug When trying to clone an emoji to a server that has all the default emoji slots used, but has extra slots granted from Nitro boosting, the emoji utility won't let you clone the emoji. Same goes for creating a new emoji from the context menu on an image.

To Reproduce

  1. Have a server with at least nitro boosting tier 1
  2. Fill the emoji slots to the normal limit (50)
  3. Try cloning or creating an emoji using the emoji utitlity

Expected behavior The Emoji Utility should consider the extra slots and only produce an error if the extra slots are in use as well.

Desktop (please complete the following information):

Additional context

cloudrac3r commented 5 years ago

Haven't tested but should be as simple as changing this function to this:

EmojiUtility.getMaxEmojiSlots(guildId) {
    return (this.getGuild(guildId).premiumTier || 0)*50 + 50;
}

Maybe?