Ensure filenames are lowercase when uploading with [p]triviaset custom (#4594)

* added .lower() to when user uploads trivia filename

* Update PR to use casefold() not lower()

Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>

Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
This commit is contained in:
Kian Bral 2020-11-16 11:42:13 -05:00 committed by GitHub
parent 1747d901d1
commit 866728371b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -625,7 +625,7 @@ class Trivia(commands.Cog):
------- -------
None None
""" """
filename = attachment.filename.rsplit(".", 1)[0] filename = attachment.filename.rsplit(".", 1)[0].casefold()
# Check if trivia filename exists in core files or if it is a command # Check if trivia filename exists in core files or if it is a command
if filename in self.trivia.all_commands or any( if filename in self.trivia.all_commands or any(