From 96a8d6bd8882272edf0eac8218646e765fe7227b Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 4 Aug 2021 13:02:02 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7Fixed=20blacklisting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 62247c1..83b3455 100644 --- a/bot.py +++ b/bot.py @@ -82,7 +82,7 @@ def __init__(self): ) self.token = os.environ.get("SPOTIFY_AUTH") - self.version = "1.2.5.fix" + self.version = "1.2.6" async def event_ready(self): print("\n" * 100) @@ -114,6 +114,7 @@ def is_owner(self, ctx): @commands.command(name="blacklistuser") async def blacklist_user(self, ctx, *, user: str): + user = user.lower() if ctx.author.is_mod or self.is_owner(ctx): file = self.read_json("blacklist_user") if user not in file["users"]: @@ -127,6 +128,7 @@ async def blacklist_user(self, ctx, *, user: str): @commands.command(name="unblacklistuser") async def unblacklist_user(self, ctx, *, user: str): + user = user.lower() if ctx.author.is_mod or self.is_owner(ctx): file = self.read_json("blacklist_user") if user in file["users"]: @@ -261,7 +263,7 @@ async def songrequest_command(self, ctx, *, song: str): async def song_request(self, ctx, song, song_uri, album: bool): blacklisted_users = self.read_json("blacklist_user")["users"] - if ctx.author.name in blacklisted_users: + if ctx.author.name.lower() in blacklisted_users: await ctx.send("You are blacklisted from requesting songs.") else: jscon = self.read_json("blacklist")