Sort subcommand names #68

Merged
Chiggy-Playz merged 1 commits from patch-1 into 2.0 2021-09-26 05:43:23 +00:00

View File

@ -1672,7 +1672,7 @@ class Group(GroupMixin[CogT], Command[CogT, P, T]):
"name": self.name,
"type": int(not (nested - 1)) + 1,
"description": self.short_doc or "no description",
"options": [cmd.to_application_command(nested=nested + 1) for cmd in self.commands],
"options": [cmd.to_application_command(nested=nested + 1) for cmd in sorted(self.commands, key=lambda x: x.name)],
}