Add ability to set a flag description. #99

Merged
Soheab merged 5 commits from flags_option_description into 2.0 2021-10-16 12:27:02 +00:00
Soheab commented 2021-10-12 20:58:21 +00:00 (Migrated from github.com)

Summary

This PR adds the ability to set a flag's description that shows up in the slash command options menu. Example

This also reformats core.py with black.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
## Summary This PR adds the ability to set a flag's description that shows up in the slash command options menu. [Example](https://i.imgur.com/IqSMQ3P.png) This also reformats core.py with black. ## Checklist - [x] If code changes were made then they have been tested. - [x] I have updated the documentation to reflect the changes. - [ ] This PR fixes an issue. - [x] This PR adds something new (e.g. new method or parameters). - [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed) - [ ] This PR is **not** a code change (e.g. documentation, README, ...)
StockerMC (Migrated from github.com) requested changes 2021-10-12 22:08:21 +00:00
StockerMC (Migrated from github.com) commented 2021-10-12 22:07:18 +00:00
        self, name: str, annotation: Any, required: bool, varadic: bool, description: Optional[str] = None
```suggestion self, name: str, annotation: Any, required: bool, varadic: bool, description: Optional[str] = None ```
StockerMC (Migrated from github.com) commented 2021-10-12 22:07:59 +00:00
    name: str = MISSING
    description: str = MISSING
```suggestion name: str = MISSING description: str = MISSING ```
Soheab (Migrated from github.com) reviewed 2021-10-13 14:18:50 +00:00
Soheab (Migrated from github.com) commented 2021-10-13 14:18:50 +00:00

I don't know how I missed that. Thanks!

I don't know how I missed that. Thanks!
Soheab (Migrated from github.com) reviewed 2021-10-13 14:20:38 +00:00
Soheab (Migrated from github.com) commented 2021-10-13 14:20:37 +00:00

Whoops 🥲

Whoops 🥲
Sign in to join this conversation.
No description provided.