Add brief Attribute to BridgeSlashCommand #1676
Merged
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.
Summary
Fixes #1619.
When tackling the issue at hand, I found in the source code that in the bridged prefixed commands, it actually removes the value of the description and switches it over to the brief. And so if we add a brief in the command, the description would replace the brief to its value. (see lines)
pycord/discord/ext/bridge/core.py
Lines 82 to 86 in fe49522
So it's either we remove briefs altogether in bridge commands or add briefs for bridged slash commands. I went for the latter.
I also saw in the source for bridged slash commands that apparently, if you have a brief in the command, it would mark it as a description instead? this would also cause problems if the user simply puts both a brief and description which further justifies why I chose the latter. (see lines)
pycord/discord/ext/bridge/core.py
Lines 74 to 78 in fe49522
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.