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
Make load_extention able to some options #7394
Comments
See #5839. |
Then instead of arbitrary keyword arguments, a single optional |
Or pass the options as keyword-arguments. This would also allow just ignoring options you don't need in the current file. E.g. in one extension file: async def setup(bot: commands.Bot, *, my_option: int, **kwargs): ... And in another file: async def setup(bot: commands.Bot, **kwargs): ... |
Curious if here has been any progress on providing a canonical way to pass arguments and/or configuration from load_extension to the extensions setup call? What would be the recommended way of doing so? Extending Bot? |
Summary
If load_extension has kwargs for setup command, it'll be so good
What is the feature request for?
discord.ext.commands
The Problem
Currently load_extension cannot pass options, so it's so hard to Config extensions.
But if can pass some arguments for setup, it makes extension more customizable.
The Ideal Solution
The Current Solution
environment variable, add attribute to bot class?
Additional Context
I'm not native of English so this issue may be weird.
The text was updated successfully, but these errors were encountered: