This repository was archived by the owner on Jul 11, 2024. It is now read-only.
feat: get/list commands, bulk set & fix update/delete#529
Draft
lrstanley wants to merge 2 commits intoandersfylling:masterfrom
Draft
feat: get/list commands, bulk set & fix update/delete#529lrstanley wants to merge 2 commits intoandersfylling:masterfrom
lrstanley wants to merge 2 commits intoandersfylling:masterfrom
Conversation
Signed-off-by: Liam Stanley <me@liamstanley.io>
a6423e1 to
20f6314
Compare
Signed-off-by: Liam Stanley <me@liamstanley.io>
20f6314 to
65522b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 theApplicationCommandsquery builder, for fetching an individual application command.Commands()to theApplicationCommandsquery builder, for fetching all application commands.ApplicationCommand,CreateApplicationCommand, andUpdateApplicationCommand.BulkOverwrite()to theApplicationCommandsquery builder, which allows overwriting all commands (global and guild still separate). Naming was defined by how it's described here.Update()andDelete()onApplicationCommandsquery 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:Optionstruct 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: