You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This a feature request for adding a __main__.py file to wumpy-interactions that would be used to manually synchronize and migrate application commands based on registered callbacks in code. This is meant as a tool for more stable bot updates.
One might argue that migrations of application commands should be managed by a third party but that has the downside of not integrating as closely to the library and being unable to generate migrations from the code.
Description
Usage
The CLI tool should be housed in the __main__.py file such that it can be invoked with:
python -m wumpy.interactions
For now, this file should only have one command migrate. This command only has one argument being where to find the InteractionApp that houses all commands, with the same format as extensions and ASGI (folder.file:variable). A typical invocation may look like this:
python-mwumpy.interactionsmigratesrc.main:app
Functionality
After being involved the CLI should load the app requested and try to find its commands. It should then fetch all commands upstream (from Discord) and compare locally. This way, a confirmation dialogue showing everything that will be changed can be outputted. To bypass this confirmation the -y flag can be added to the migrate command.
If confirmed, the CLI tool should then make the bulk-update request and respond with a summarized changelog.
Implementation
I do not want this CLI tool to be the reason that another dependency is added. Therefore it should either be implemented directly, or using a module from the standard library. It'll be implement with async and wumpy-rest to make the requests since that is already a dependency.
Tasks
This is a summarized step-by-step list of changes that need to be made:
Create the __main__.py file and setup a basic CLI
Add the file loading functionality and be able to find the InteractionApp instance
Fetch registered commands from Discord and generate informative output about what's different to what the InteractionApp has registered
Wait for confirmation and make the final request, also implementing the -y flag to skip this prompt
The text was updated successfully, but these errors were encountered:
Summary
This a feature request for adding a
__main__.py
file towumpy-interactions
that would be used to manually synchronize and migrate application commands based on registered callbacks in code. This is meant as a tool for more stable bot updates.One might argue that migrations of application commands should be managed by a third party but that has the downside of not integrating as closely to the library and being unable to generate migrations from the code.
Description
Usage
The CLI tool should be housed in the
__main__.py
file such that it can be invoked with:For now, this file should only have one command
migrate
. This command only has one argument being where to find theInteractionApp
that houses all commands, with the same format as extensions and ASGI (folder.file:variable
). A typical invocation may look like this:Functionality
After being involved the CLI should load the app requested and try to find its commands. It should then fetch all commands upstream (from Discord) and compare locally. This way, a confirmation dialogue showing everything that will be changed can be outputted. To bypass this confirmation the
-y
flag can be added to themigrate
command.If confirmed, the CLI tool should then make the bulk-update request and respond with a summarized changelog.
Implementation
I do not want this CLI tool to be the reason that another dependency is added. Therefore it should either be implemented directly, or using a module from the standard library. It'll be implement with async and
wumpy-rest
to make the requests since that is already a dependency.Tasks
This is a summarized step-by-step list of changes that need to be made:
__main__.py
file and setup a basic CLIInteractionApp
instanceInteractionApp
has registered-y
flag to skip this promptThe text was updated successfully, but these errors were encountered: