Skip to content
New issue

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

By clicking “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? Sign in to your account

Enhancement: Guild config helper #88

Open
JacobCoffee opened this issue Oct 11, 2024 · 0 comments
Open

Enhancement: Guild config helper #88

JacobCoffee opened this issue Oct 11, 2024 · 0 comments
Labels
database 📦 Related to the Byte database service enhancement ➕ This is a brand new feature or request help wanted 🆘 Extra attention is needed web 🌐 Related to the Byte web service

Comments

@JacobCoffee
Copy link
Owner

JacobCoffee commented Oct 11, 2024

Summary

Introduce a helper method to reduce duplication in config retrieval:

Basic Example

async def _get_config(self, service: Any, guild_id: int, schema_class: Type[Any]) -> Any:
    result = await service.get(guild_id, id_attribute="guild_id")
    return service.to_schema(schema_class, result)

Drawbacks and Impact

No response

Unresolved questions

No response


Note

We utilize Polar.sh to engage in regular as well as pledge-based > sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.
Fund with Polar
@JacobCoffee JacobCoffee added enhancement ➕ This is a brand new feature or request help wanted 🆘 Extra attention is needed web 🌐 Related to the Byte web service database 📦 Related to the Byte database service labels Oct 11, 2024
JacobCoffee added a commit that referenced this issue Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database 📦 Related to the Byte database service enhancement ➕ This is a brand new feature or request help wanted 🆘 Extra attention is needed web 🌐 Related to the Byte web service
Projects
None yet
Development

No branches or pull requests

1 participant