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
2 changed files with 20 additions and 19 deletions
Showing only changes of commit b8e4d23d44 - Show all commits

View File

@ -1226,7 +1226,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
ctx.command = original
def _param_to_options(
self, name: str, annotation: Any, required: bool, varadic: bool, description=None
self, name: str, annotation: Any, required: bool, varadic: bool, description: Optional[str] = None
) -> List[Optional[ApplicationCommandInteractionDataOption]]:
if description is not None:

View File

@ -98,8 +98,8 @@ class Flag:
Whether multiple given values overrides the previous value.
"""
name: str = MISSING,
description: str = MISSING,
name: str = MISSING
description: str = MISSING
aliases: List[str] = field(default_factory=list)
attribute: str = MISSING
annotation: Any = MISSING