-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use distinct annotations for command-specific properties #146
Merged
Conversation
This file contains 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
This annotation is only required for slash commands with subcommands
Also fixes using multiple subcommand groups
Allows for subcommand group data to be set
This comment has been minimized.
This comment has been minimized.
…tCommand to TextCommandData Provides a 1:1 mapping between commands and DSL, TextCommandData is applicable at any level
This reverts commit 362b7c4.
This also solves an issue with subcommands in groups not having descriptions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type: breaking
Contains a backwards incompatible change
type: enhancement
V3
Targets BotCommands 3.x.x
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.
Problem
Annotated text commands as well as slash commands suffer from several issues do to all the data being written in a single annotation:
description
of subcommand groups had a chance to not be applied on the right groupgeneralDescription
property, but this only applies to the text command itself, i.e., not on the text command variationSolution
Properties which are attribuable to only a part of a command (such as the
scope
which only can be set on the top-level command) will be in a different annotation:scope
,defaultLocked
,nsfw
,description
)description
)name
,group
,subcommand
,description
)path
,aliases
,description
) (path
is the path this annotation applies to, if empty, apply on the variation's path)path
,order
,description
,usage
,example
)Annotations which applies to text commands may appear on a single variation, but they affect the command as a whole, and are not allowed more than once per path
The description for a top-level command can be only be set on either annotations