This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
feat: get/list commands, bulk set & fix update/delete #529
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Get()
to theApplicationCommands
query builder, for fetching an individual application command.Commands()
to theApplicationCommands
query builder, for fetching all application commands.ApplicationCommand
,CreateApplicationCommand
, andUpdateApplicationCommand
.BulkOverwrite()
to theApplicationCommands
query builder, which allows overwriting all commands (global and guild still separate). Naming was defined by how it's described here.Update()
andDelete()
onApplicationCommands
query builder, where the generated URL didn't include/
as the prefix, leading to a malformed request.One of the big items I think with this change, is most users likely should shift to using
BulkOverwrite()
, which effectively defines all of their commands. The downside with the currently documented example is that if commands are added, then removed from the array, they never actually get removed from the application and/or guild.There are three items I'm still not sure about.
Get()
for singular, andCommands()
for listing. I skimmed through some of the other builders/methods and wasn't sure what was best for naming standards to differentiate 1 vs many.Commands()
should probably accept an input, which allows the command list to include localized names and descriptions. I wasn't sure if:Option
struct of some kind should be used. If this is the best option, not sure on best naming, as I don't see many of these types of structs across the project.BulkOverwrite()
?Breaking Change?
no
Checklist: