Skip to content

fix: rely on guild id instead of guild for buckets #1541

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

AstreaTSS
Copy link
Member

Pull Request Type

  • Feature addition
  • Bugfix
  • Documentation update
  • Code refactor
  • Tests improvement
  • CI/CD pipeline enhancement
  • Other: [Replace with a description]

Description

This PR fixes Buckets so that it uses guild_id instead of guild for verifying a guild exists for its various buckets. This allows it to work in scenarios where the guild attribute itself may return None, IE in scenarios where the guild cache is disabled. This also is likely less expensive than using the guild attribute.

Changes

  • See the above and diff - there isn't a whole lot going on here.

Related Issues

Test Scenarios

  • Set the guild cache to a null cache.
  • Use a cooldown involving a guild.

Python Compatibility

  • I've ensured my code works on Python 3.10.x
  • I've ensured my code works on Python 3.11.x

Checklist

  • I've run the pre-commit code linter over all edited files
  • I've tested my changes on supported Python versions
  • I've added tests for my code, if applicable
  • I've updated / added documentation, where applicable

@Developer89899 Developer89899 merged commit 0945662 into interactions-py:unstable Aug 26, 2023
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants