Merge pull request #169 from Obi-Wan3/master

[StealEmoji] update to use guild.emoji_limit
ww_develop
bobloy 4 years ago committed by GitHub
commit af3de08da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,16 +16,16 @@ log = logging.getLogger("red.fox_v3.stealemoji")
async def check_guild(guild, emoji): async def check_guild(guild, emoji):
if len(guild.emojis) >= 100: if len(guild.emojis) >= 2 * guild.emoji_limit:
return False return False
if len(guild.emojis) < 50: if len(guild.emojis) < guild.emoji_limit:
return True return True
if emoji.animated: if emoji.animated:
return sum(e.animated for e in guild.emojis) < 50 return sum(e.animated for e in guild.emojis) < guild.emoji_limit
else: else:
return sum(not e.animated for e in guild.emojis) < 50 return sum(not e.animated for e in guild.emojis) < guild.emoji_limit
class StealEmoji(Cog): class StealEmoji(Cog):

Loading…
Cancel
Save