From a188ace669b3709d2148540d377c1498d45134c9 Mon Sep 17 00:00:00 2001 From: Chiggy-Playz <49774426+Chiggy-Playz@users.noreply.github.com> Date: Mon, 20 Sep 2021 18:11:21 +0530 Subject: [PATCH] Sort subcommand names --- discord/ext/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index fa1e4212..a0d3f5e6 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -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)], } -- 2.47.2