From ddb7f4e0820df824b30ad014a5facb3768ab0bc7 Mon Sep 17 00:00:00 2001 From: Arthur Jovart Date: Sun, 29 Aug 2021 01:27:44 +0200 Subject: [PATCH] [BREAKING] Make case_insensitive default to True on groups and commands --- discord/ext/commands/bot.py | 2 +- discord/ext/commands/core.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index b4da6100..a113dc07 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -1075,7 +1075,7 @@ class Bot(BotBase, discord.Client): when passing an empty string, it should always be last as no prefix after it will be matched. case_insensitive: :class:`bool` - Whether the commands should be case insensitive. Defaults to ``False``. This + Whether the commands should be case insensitive. Defaults to ``True``. This attribute does not carry over to groups. You must set it to every group if you require group commands to be case insensitive as well. description: :class:`str` diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 35b7e840..f122e9ad 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -1135,10 +1135,10 @@ class GroupMixin(Generic[CogT]): A mapping of command name to :class:`.Command` objects. case_insensitive: :class:`bool` - Whether the commands should be case insensitive. Defaults to ``False``. + Whether the commands should be case insensitive. Defaults to ``True``. """ def __init__(self, *args: Any, **kwargs: Any) -> None: - case_insensitive = kwargs.get('case_insensitive', False) + case_insensitive = kwargs.get('case_insensitive', True) self.all_commands: Dict[str, Command[CogT, Any, Any]] = _CaseInsensitiveDict() if case_insensitive else {} self.case_insensitive: bool = case_insensitive super().__init__(*args, **kwargs)