Esempio n. 1
0
 async def calculateGeneralDPGStats(self):
     sortedDict = await self.generateLeaderboardDict(
         'average', True, 'totalDamageDealtToChampions', 'goldEarned')
     return generateLeaderboardEmbed(
         sortedDict, "Top 5 DPG players",
         "DPG is a statistic that shows how well a given player uses the gold they are given"
     )
Esempio n. 2
0
 async def calculatePickStats(self):
     data = await self.cacheControl.getStats('pick')
     sortedDict = sorted(data.items(),
                         key=operator.itemgetter(1),
                         reverse=True)
     return generateLeaderboardEmbed(sortedDict, "Highest Pick Champions",
                                     "These are the most picked champions")
Esempio n. 3
0
 async def calculateGeneralGPMStats(self, sortAcending):
     sortedDict = await self.generateLeaderboardDict(
         'averageGameTime', sortAcending, 'goldEarned', 'totalGameTime')
     lbName = "Top 5"
     if not sortAcending:
         lbName = "Bottom 5"
     return generateLeaderboardEmbed(sortedDict, f"{lbName} GPM players",
                                     "Gold Per Minute")
Esempio n. 4
0
 async def calculateGeneralDPMStats(self):
     sortedDict = await self.generateLeaderboardDict(
         'averageGameTime', True, 'totalDamageDealtToChampions',
         'totalGameTime')
     return generateLeaderboardEmbed(
         sortedDict, "Top 5 DPM players",
         "DPM is a statistic that calculates your average damage per minute"
     )
Esempio n. 5
0
 async def calculateGoldShareStats(self, highest):
     sortedDict = await self.generateLeaderboardDict(
         'averagePercent', highest, 'goldEarned', 'totalGoldAvailable')
     lbName = "Top 5"
     if not highest:
         lbName = "Bottom 5"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} gold share players",
         f"This stat tells us what your average % of your teams total gold")
Esempio n. 6
0
 async def calculateVisionScorePerMinute(self, highest):
     sortedDict = await self.generateLeaderboardDict(
         'averageGameTime', highest, 'visionScore', 'totalGameTime')
     lbName = "Top"
     if not highest:
         lbName = "Bottom"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} 5 Vision Score Per Minute Players",
         f"This stats tells us how good of a warder you are")
Esempio n. 7
0
 async def calculateGeneralVisionScoreStats(self, highest):
     sortedDict = await self.generateLeaderboardDict(
         'average', highest, 'visionScore', 'totalGames')
     lbName = "Top"
     if not highest:
         lbName = "Bottom"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} 5 Average Vision Score players",
         f"Cool Stats")
Esempio n. 8
0
 async def calculateAverageKillParticipation(self, highest):
     sortedDict = await self.generateLeaderboardDict(
         'summedAvg', highest, 'kills', 'assists', 'totalKillsAvailable')
     lbName = "Top 5"
     if not highest:
         lbName = "Bottom 5"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} KP players",
         f"Kill Participation count in the league")
Esempio n. 9
0
 async def calculateGeneralWinStats(self, highest):
     sortedDict = await self.generateLeaderboardDict(
         'averagePercent', highest, 'win', 'totalGames')
     lbName = "Top 5"
     if not highest:
         lbName = "Bottom 5"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} Winrate players",
         f"Out of {len(sortedDict)} players, these players have the {lbName} winrate"
     )
Esempio n. 10
0
 async def calculateUniqueChampionStats(self, highest):
     uniques = await self.cacheControl.getStats('unique')
     sortedDict = sorted(uniques.items(),
                         key=operator.itemgetter(1),
                         reverse=highest)
     lbName = "Top"
     if not highest:
         lbName = "Bottom"
     return generateLeaderboardEmbed(
         sortedDict, f"{lbName} 5 players by unique champions ",
         f"Unique champions played in inhouse Matches")
Esempio n. 11
0
 async def calculatePresence(self):
     bans = Counter(await self.cacheControl.getStats('ban'))
     picks = Counter(await self.cacheControl.getStats('pick'))
     presence = bans + picks
     db = self.mongoClient["Skynet"]
     collection = db["InHouses"]
     matchCount = collection.find().count()
     for key in presence:
         presence[key] = round(presence[key] / matchCount, 2)
     sortedDict = sorted(presence.items(),
                         key=operator.itemgetter(1),
                         reverse=True)
     return generateLeaderboardEmbed(
         sortedDict, "Highest Presence Champions",
         "These are the champions that were picked or banned the most")
Esempio n. 12
0
 async def calculateGeneralAverageKDAStats(self, type):
     sortedDict = await self.generateLeaderboardDict(
         'average', True, type, 'totalGames')
     return generateLeaderboardEmbed(
         sortedDict, f"Top 5 Average {type} players",
         f"Highest average {type} count in the league")
Esempio n. 13
0
 async def calculateGameCount(self):
     sortedDict = await self.generateLeaderboardDict(
         'single', True, 'totalGames')
     return generateLeaderboardEmbed(sortedDict,
                                     f"Top 5 game count players",
                                     f"Cool Stats")
Esempio n. 14
0
 async def calculateGeneralKDAStats(self, type):
     sortedDict = await self.generateLeaderboardDict('single', True, type)
     return generateLeaderboardEmbed(
         sortedDict, f"Top 5 {type} players",
         f"Highest total {type} count in the league")
Esempio n. 15
0
 async def calculateGeneralCSPMStats(self):
     sortedDict = await self.generateLeaderboardDict(
         'multiaddaverageGameTime', True, 'totalMinionsKilled',
         'neutralMinionsKilled', 'totalGameTime')
     return generateLeaderboardEmbed(sortedDict, "Top 5 CS/M players",
                                     "Just CS per Min")