ItsDrike / code-jam-2024

Python Discord's Code Jam 2024, Contemplative Constellations Team
MIT License
1 stars 0 forks source link

Add utility methods to `ctx` by sublcassing it #36

Closed Paillat-dev closed 1 month ago

Paillat-dev commented 1 month ago

Add utility methods to ctx, for example ctx.error that allow to show an error (ex. a parameter is required when used in combination with another) while staying in theme with the other errors. Maybe it could even then be used inside of the error_handler ext. to send the errors.

For reference:

ItsDrike commented 1 month ago

Slightly afraid what pyright will think here, it might cause issues, but if it'll work fine, it could be worth doing.