diff options
author | 2021-12-01 22:45:47 +0000 | |
---|---|---|
committer | 2021-12-01 22:45:47 +0000 | |
commit | 1f1ca41b172eda41a94e4ae556a923eee2d7cc26 (patch) | |
tree | c73a24cb596a4ade6c539cdfbb11ee5def1a0846 | |
parent | Merge pull request #1868 from python-discord/subscribe-with-buttons (diff) |
Sort subscribe roles alphabetically
-rw-r--r-- | bot/exts/info/subscribe.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/info/subscribe.py b/bot/exts/info/subscribe.py index 2e6101d27..4797f2347 100644 --- a/bot/exts/info/subscribe.py +++ b/bot/exts/info/subscribe.py @@ -165,7 +165,9 @@ class Subscribe(commands.Cog): name=discord_role.name, ) ) - # Sort unavailable roles to the end of the list + + # Sort by role name, then shift unavailable roles to the end of the list + self.assignable_roles.sort(key=operator.attrgetter("name")) self.assignable_roles.sort(key=operator.methodcaller("is_currently_available"), reverse=True) @commands.cooldown(1, 10, commands.BucketType.member) |