From a37ddc9ce7962f7645b590bbb54f07e887303f5f Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Sun, 6 Feb 2022 15:16:07 -0800 Subject: [PATCH] [Casino] Fix for membership assignment local mode Remember that if a user does not have any games played, or any data written to the Config file, they will be passed over in the member check and a membership will not be assigned until they are present in the Config file. This fix is thanks to XamynTV#8398's research into the issue, and for posting a detailed walkthrough of the issue in the support channel. --- casino/casino.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/casino/casino.py b/casino/casino.py index 13c39f3..b55cacd 100644 --- a/casino/casino.py +++ b/casino/casino.py @@ -29,7 +29,7 @@ # Third-Party Libraries from tabulate import tabulate -__version__ = "2.4.10" +__version__ = "2.4.11" __author__ = "Redjumpman" _ = Translator("Casino", __file__) @@ -882,11 +882,11 @@ async def process_user(self, memberships, user, _global=False): else: qualified.append((name, requirements["Access"])) else: + role_list = [x.name for x in user.roles] + role_list += [x.mention for x in user.roles] if requirements["Credits"] and bal < requirements["Credits"]: continue - elif requirements["Role"] and requirements["Role"] not in [ - x.name for x in user.roles - ]: + elif requirements["Role"] and requirements["Role"] not in role_list: continue elif ( requirements["DOS"]