Repository: python-discord/bot

Issue:
Alphabetize Default Config
The config file can use some cleaning up, just organizing a few things into alphabetical order. I can tackle this if this is a needed fix.

Examples (these are all individual items, categories and sub-categories can also be reorganized):
- [L3-L4](https://github.com/python-discord/bot/blob/0242b4e/config-default.yml#L3-L4)
- [L8-L9](https://github.com/python-discord/bot/blob/0242b4e/config-default.yml#L8-L9)
- [L13-L14](https://github.com/python-discord/bot/blob/0242b4e/config-default.yml#L13-L14)
- [L27-L30](https://github.com/python-discord/bot/blob/0242b4e/config-default.yml#L27-L30)
- ...


Discussion:
why though, what does this achieve?
I was working on another PR, and was asked to alphabetized my additions. A lot of the content in this file, and other constants files are already alphabetized, and this shouldn't be particularly difficult. 
@HassanAbouelela I don't see why not. Would you still like to do this?
Yeah sure, I can tackle it today.

Resolving patch:
diff --git a/bot/constants.py b/bot/constants.py
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -13,7 +13,7 @@
 import logging
 import os
 from collections.abc import Mapping
-from enum import Enum, IntEnum
+from enum import Enum
 from pathlib import Path
 from typing import Dict, List, Optional
 
@@ -197,8 +197,8 @@ class Bot(metaclass=YAMLGetter):
     section = "bot"
 
     prefix: str
-    token: str
     sentry_dsn: Optional[str]
+    token: str
 
 
 class Redis(metaclass=YAMLGetter):
@@ -206,29 +206,30 @@ class Redis(metaclass=YAMLGetter):
     subsection = "redis"
 
     host: str
-    port: int
     password: Optional[str]
+    port: int
     use_fakeredis: bool  # If this is True, Bot will use fakeredis.aioredis
 
 
 class Filter(metaclass=YAMLGetter):
     section = "filter"
 
-    filter_zalgo: bool
-    filter_invites: bool
     filter_domains: bool
     filter_everyone_ping: bool
+    filter_invites: bool
+    filter_zalgo: bool
     watch_regex: bool
     watch_rich_embeds: bool
 
     # Notifications are not expected for "watchlist" type filters
-    notify_user_zalgo: bool
-    notify_user_invites: bool
+
     notify_user_domains: bool
     notify_user_everyone_ping: bool
+    notify_user_invites: bool
+    notify_user_zalgo: bool
 
-    ping_everyone: bool
     offensive_msg_delete_days: int
+    ping_everyone: bool
 
     channel_whitelist: List[int]
     role_whitelist: List[int]
@@ -245,10 +246,10 @@ class Colours(metaclass=YAMLGetter):
     section = "style"
     subsection = "colours"
 
-    soft_red: int
+    bright_green: int
     soft_green: int
     soft_orange: int
-    bright_green: int
+    soft_red: int
     orange: int
     pink: int
     purple: int
@@ -265,41 +266,42 @@ class Emojis(metaclass=YAMLGetter):
     section = "style"
     subsection = "emojis"
 
-    defcon_disabled: str  # noqa: E704
-    defcon_enabled: str  # noqa: E704
-    defcon_updated: str  # noqa: E704
-
-    status_online: str
-    status_offline: str
-    status_idle: str
-    status_dnd: str
-
-    badge_staff: str
-    badge_partner: str
-    badge_hypesquad: str
     badge_bug_hunter: str
+    badge_bug_hunter_level_2: str
+    badge_early_supporter: str
+    badge_hypesquad: str
+    badge_hypesquad_balance: str
     badge_hypesquad_bravery: str
     badge_hypesquad_brilliance: str
-    badge_hypesquad_balance: str
-    badge_early_supporter: str
-    badge_bug_hunter_level_2: str
+    badge_partner: str
+    badge_staff: str
     badge_verified_bot_developer: str
 
+    defcon_disabled: str  # noqa: E704
+    defcon_enabled: str  # noqa: E704
+    defcon_updated: str  # noqa: E704
+
+    failmail: str
+
     incident_actioned: str
-    incident_unactioned: str
     incident_investigating: str
+    incident_unactioned: str
+
+    status_dnd: str
+    status_idle: str
+    status_offline: str
+    status_online: str
 
-    failmail: str
     trashcan: str
 
     bullet: str
+    check_mark: str
+    cross_mark: str
     new: str
     pencil: str
-    cross_mark: str
-    check_mark: str
 
-    upvotes: str
     comments: str
+    upvotes: str
     user: str
 
     ok_hand: str
@@ -320,6 +322,7 @@ class Icons(metaclass=YAMLGetter):
 
     filtering: str
 
+    green_checkmark: str
     guild_update: str
 
     hash_blurple: str
@@ -330,38 +333,34 @@ class Icons(metaclass=YAMLGetter):
     message_delete: str
     message_edit: str
 
+    pencil: str
+
+    questionmark: str
+
+    remind_blurple: str
+    remind_green: str
+    remind_red: str
+
     sign_in: str
     sign_out: str
 
+    superstarify: str
+    unsuperstarify: str
+
     token_removed: str
 
     user_ban: str
-    user_unban: str
-    user_update: str
-
     user_mute: str
+    user_unban: str
     user_unmute: str
+    user_update: str
     user_verified: str
-
     user_warn: str
 
-    pencil: str
-
-    remind_blurple: str
-    remind_green: str
-    remind_red: str
-
-    questionmark: str
-
-    superstarify: str
-    unsuperstarify: str
-
     voice_state_blue: str
     voice_state_green: str
     voice_state_red: str
 
-    green_checkmark: str
-
 
 class CleanMessages(metaclass=YAMLGetter):
     section = "bot"
@@ -383,8 +382,8 @@ class Categories(metaclass=YAMLGetter):
     subsection = "categories"
 
     help_available: int
-    help_in_use: int
     help_dormant: int
+    help_in_use: int
     modmail: int
     voice: int
 
@@ -393,56 +392,67 @@ class Channels(metaclass=YAMLGetter):
     section = "guild"
     subsection = "channels"
 
-    admin_announcements: int
-    admin_spam: int
-    admins: int
-    admins_voice: int
     announcements: int
-    attachment_log: int
-    big_brother_logs: int
-    bot_commands: int
     change_log: int
-    code_help_chat_1: int
-    code_help_chat_2: int
-    code_help_voice_1: int
-    code_help_voice_2: int
-    cooldown: int
-    defcon: int
-    discord_py: int
+    mailing_lists: int
+    python_events: int
+    python_news: int
+    reddit: int
+    user_event_announcements: int
+
     dev_contrib: int
     dev_core: int
     dev_log: int
+
+    meta: int
+    python_general: int
+
+    cooldown: int
+
+    attachment_log: int
     dm_log: int
+    message_log: int
+    mod_log: int
+    user_log: int
+    voice_log: int
+
+    off_topic_0: int
+    off_topic_1: int
+    off_topic_2: int
+
+    bot_commands: int
+    discord_py: int
     esoteric: int
-    general_voice: int
+    voice_gate: int
+
+    admins: int
+    admin_spam: int
+    defcon: int
     helpers: int
     incidents: int
     incidents_archive: int
-    mailing_lists: int
-    message_log: int
-    meta: int
+    mods: int
     mod_alerts: int
-    mod_announcements: int
-    mod_log: int
     mod_spam: int
-    mods: int
-    off_topic_0: int
-    off_topic_1: int
-    off_topic_2: int
     organisation: int
-    python_general: int
-    python_events: int
-    python_news: int
-    reddit: int
+
+    admin_announcements: int
+    mod_announcements: int
     staff_announcements: int
+
+    admins_voice: int
+    code_help_voice_1: int
+    code_help_voice_2: int
+    general_voice: int
     staff_voice: int
+
+    code_help_chat_1: int
+    code_help_chat_2: int
     staff_voice_chat: int
-    talent_pool: int
-    user_event_announcements: int
-    user_log: int
     voice_chat: int
-    voice_gate: int
-    voice_log: int
+
+    big_brother_logs: int
+    talent_pool: int
 
 
 class Webhooks(metaclass=YAMLGetter):
@@ -462,41 +472,44 @@ class Roles(metaclass=YAMLGetter):
     section = "guild"
     subsection = "roles"
 
-    admins: int
     announcements: int
     contributors: int
-    core_developers: int
     help_cooldown: int
-    helpers: int
-    jammers: int
-    moderators: int
     muted: int
-    owners: int
     partners: int
     python_community: int
     sprinters: int
-    team_leaders: int
     voice_verified: int
 
+    admins: int
+    core_developers: int
+    helpers: int
+    moderators: int
+    owners: int
+
+    jammers: int
+    team_leaders: int
+
 
 class Guild(metaclass=YAMLGetter):
     section = "guild"
 
     id: int
     invite: str  # Discord invite, gets embedded in chat
-    moderation_channels: List[int]
+
     moderation_categories: List[int]
-    moderation_roles: List[int]
+    moderation_channels: List[int]
     modlog_blacklist: List[int]
     reminder_whitelist: List[int]
+    moderation_roles: List[int]
     staff_roles: List[int]
 
 
 class Keys(metaclass=YAMLGetter):
     section = "keys"
 
-    site_api: Optional[str]
     github: Optional[str]
+    site_api: Optional[str]
 
 
 class URLs(metaclass=YAMLGetter):
@@ -526,9 +539,9 @@ class URLs(metaclass=YAMLGetter):
 class Reddit(metaclass=YAMLGetter):
     section = "reddit"
 
-    subreddits: list
     client_id: Optional[str]
     secret: Optional[str]
+    subreddits: list
 
 
 class AntiSpam(metaclass=YAMLGetter):
@@ -544,8 +557,8 @@ class AntiSpam(metaclass=YAMLGetter):
 class BigBrother(metaclass=YAMLGetter):
     section = 'big_brother'
 
-    log_delay: int
     header_message_limit: int
+    log_delay: int
 
 
 class CodeBlock(metaclass=YAMLGetter):
@@ -561,8 +574,8 @@ class Free(metaclass=YAMLGetter):
     section = 'free'
 
     activity_timeout: int
-    cooldown_rate: int
     cooldown_per: float
+    cooldown_rate: int
 
 
 class HelpChannels(metaclass=YAMLGetter):
@@ -585,25 +598,25 @@ class HelpChannels(metaclass=YAMLGetter):
 class RedirectOutput(metaclass=YAMLGetter):
     section = 'redirect_output'
 
-    delete_invocation: bool
     delete_delay: int
+    delete_invocation: bool
 
 
 class PythonNews(metaclass=YAMLGetter):
     section = 'python_news'
 
-    mail_lists: List[str]
     channel: int
     webhook: int
+    mail_lists: List[str]
 
 
 class VoiceGate(metaclass=YAMLGetter):
     section = "voice_gate"
 
-    minimum_days_member: int
-    minimum_messages: int
     bot_message_delete_delay: int
     minimum_activity_blocks: int
+    minimum_days_member: int
+    minimum_messages: int
     voice_ping_delete_delay: int
 
 


Test patch: