Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Sep 3, 2024

Description

This fixes the output of the "Emojis" field in $info server: Guild.emoji_limit takes the limit of static emojis while len(Guild.emojis) takes both static and animated emojis. Since the limit is always mirrored, we can simply multiply the former by 2.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other: (write here)

Summary by Sourcery

Fix the emoji limit calculation in the server info command to correctly reflect the total limit by considering both static and animated emojis.

Bug Fixes:

  • Correct the calculation of the emoji limit in the server info command by accounting for both static and animated emojis.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 3, 2024

Reviewer's Guide by Sourcery

This pull request updates the calculation of the guild emoji limit in the info cog. It addresses a discrepancy between the displayed emoji count and the actual limit by multiplying the static emoji limit by 2 to account for both static and animated emojis.

File-Level Changes

Change Details Files
Updated emoji limit calculation in server info command
  • Changed the emoji limit calculation from guild.emoji_limit to 2*guild.emoji_limit
  • This modification accounts for both static and animated emojis in the total limit
tux/cogs/info/info.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wlinator - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@ghost ghost changed the title refactor: Update guild emoji limit calculation in info cog Update guild emoji limit calculation in info cog Sep 3, 2024
@kzndotsh kzndotsh merged commit 92cbec9 into main Sep 3, 2024
@kzndotsh kzndotsh deleted the tess-fix-emojicount branch September 3, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant