Add redirect to players DB

master
Lertsenem 2020-09-17 17:29:08 +02:00
parent a454625207
commit 7b8d56bc9c
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,12 @@ class Player():
self.seeding = int(seeding) self.seeding = int(seeding)
self.twitterHandle = ( "" if twitterHandle is None else twitterHandle ) 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 # Prefix is superseeded by sponsors infos in DB
try: try:
self.prefix = PLAYERSKINS[self.gamerTag.lower()]["sponsor"] self.prefix = PLAYERSKINS[self.gamerTag.lower()]["sponsor"]