From 7b8d56bc9c1e7b5ace612a6858245ce99be47b8b Mon Sep 17 00:00:00 2001 From: Lertsenem Date: Thu, 17 Sep 2020 17:29:08 +0200 Subject: [PATCH] Add redirect to players DB --- lokrez/smashgg.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lokrez/smashgg.py b/lokrez/smashgg.py index 19b67ee..baf40c5 100644 --- a/lokrez/smashgg.py +++ b/lokrez/smashgg.py @@ -44,6 +44,12 @@ class Player(): self.seeding = int(seeding) self.twitterHandle = ( "" if twitterHandle is None else twitterHandle ) + # Check if there's a redirect in the players DB + try: + self.gamerTag = PLAYERSKINS[self.gamerTag.lower()]["redirect"] + except: + pass + # Prefix is superseeded by sponsors infos in DB try: self.prefix = PLAYERSKINS[self.gamerTag.lower()]["sponsor"]