commit cd138017ba73c9e66a75889a9c438cff66fd7a6a
parent 41b32123fb37230f2e48fbd9646794f974491ebf
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date: Fri, 12 Feb 2021 13:23:02 -0800
Make commands and arguments case insensitive.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bot.py b/bot.py
@@ -359,7 +359,7 @@ with open(os.path.join(os.path.dirname(__file__), "channels.txt"), "a+") as f:
# Create Discord bot
-bot = commands.Bot(command_prefix = ["c."])
+bot = commands.Bot(command_prefix = ["c."], case_insensitive=True)
bot.remove_command("help")
@@ -624,7 +624,7 @@ async def leaderboard(ctx, user=None):
contributor["name"] = await getUsername(contributor["author"])
# Get user rank
- temp = [x["name"].startswith(user) for x in leaderboard]
+ temp = [x["name"].lower().startswith(user.lower()) for x in leaderboard]
if (True not in temp):
embed.title = ":x: Countdown Leaderboard"
embed.description = f"User not found: `{user}`"