-
Notifications
You must be signed in to change notification settings - Fork 0
/
embeds.py
167 lines (110 loc) · 5.48 KB
/
embeds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#ANY EMBEDS FOR THE PROGRAM WILL BE HANDELED HERE
import heroTimes, profile, heroList, heroIconLinks, careerStats
import heroIconLinks
from discord import Embed
#PARAMATERIZE THIS LINK TO USER INPUT
overBuffLink = "https://www.overbuff.com/players/pc/SkeeCoops-1827"
#ROLE EMBEDS
#EMBED FOR SENDING TOP DPS
def sendTopDPS():
embed = Embed(title=profile.getName()+"'s top DPS heroes:", color=0xf04c9e)
sortedDPS = heroTimes.getTopDPS()
msg = ""
for i in range(0, len(heroList.dpsList)):
msg = msg + str(i+1) + ") "+ str(sortedDPS[i][0].capitalize()) + "\n"
embed.add_field(name="Most played to least played:", value=msg)
topHero = sortedDPS[0][0].capitalize()
hUrl = heroIconLinks.heroUrl[topHero]
embed.set_thumbnail(url=hUrl)
return embed
#EMBED FOR SENDING TOP TANKS
def sendTopTanks():
embed = Embed(title=profile.getName()+"'s top tank heroes:", color=0xf04c9e)
sortedTanks = heroTimes.getTopTanks()
msg = ""
for i in range(0, len(heroTimes.tankTimes)):
msg = msg + str(i+1) + ") "+ str(sortedTanks[i][0].capitalize()) + "\n"
embed.add_field(name="Most played to least played:", value=msg)
topHero = sortedTanks[0][0].capitalize()
hUrl = heroIconLinks.heroUrl[topHero]
embed.set_thumbnail(url=hUrl)
return embed
#EMBED FOR SENDING TOP SUPPOROTS
def sendTopSupports():
embed = Embed(title=profile.getName()+"'s top support heroes:", color=0xf04c9e)
sortedSupports = heroTimes.getTopSupports()
msg = ""
for i in range(0, len(heroTimes.supportTimes)):
msg = msg + str(i+1) + ") "+ str(sortedSupports[i][0].capitalize()) + "\n"
embed.add_field(name="Most played to least played:", value=msg)
topHero = sortedSupports[0][0].capitalize()
hUrl = heroIconLinks.heroUrl[topHero]
embed.set_thumbnail(url=hUrl)
return embed
#will take top 3 heroes from each role and embed it all together
#inclue rank and level
#thumbnail of user icon
def sendOverall():
top3DPS = heroTimes.getTop3DPS()
top3Tanks = heroTimes.getTop3Tanks()
top3Support = heroTimes.getTop3Support()
#have 9 characters to display
playerRank = profile.getRank()
playerLevel = profile.getLevel()
playerName = profile.getName()
playerIcon = profile.getUserIcon()
playerRankIcon = profile.getRankIcon()
#*, name, value, inline
embed = Embed(title=playerName+"'s Profile:", color=0xf04c9e)
embed.add_field(name="Rank: ", value=playerRank, inline=True)
embed.add_field(name="Level: ", value=playerLevel, inline=True)
embed.add_field(name= " --------------------------------------------------------------------------- ", value=" \n\u200b ", inline=False)
embed.add_field(name="Top 3 Tanks: ", value=top3Tanks, inline=True)
embed.add_field(name="Top 3 DPS: ", value=top3DPS, inline=True)
embed.add_field(name="Top 3 Supports: ", value=top3Support, inline=True)
embed.set_thumbnail(url=playerIcon)
embed.set_image(url=playerRankIcon)
return embed
# PROFILE EMBEDS ----------------------------------------------------------------------
def sendLevel():
embed = Embed(title=profile.getName()+"'s Level", color=0xf04c9e)
embed.add_field(name="Level:", value=profile.getLevel())
embed.set_thumbnail(url=profile.getUserIcon())
borderType = profile.getBorder()
embed.add_field(name= "Border:", value= borderType, inline= True)
return embed
def sendRank():
embed = Embed(title=profile.getName()+"'s Rank", color=0xf04c9e)
embed.add_field(name="Rank:", value=profile.getRank())
embed.set_thumbnail(url=profile.getRankIcon())
return embed
#DEBUG THIS --------------------------------------------------------------------------
def sendAvgStatsQP():
#Discord Embed
avgStats = careerStats.getQpAvgStats()
playerIcon = profile.getUserIcon()
playerName = profile.getName()
#avgStats = [elims average, death average, final blows average, healing done average, damage done average]
embed = Embed(title=playerName+"'s Quickplay Career Average Stats (per 10 minutes):", url=overBuffLink , color=0xf04c9e)
embed.add_field(name="Average Eliminations: ", value=avgStats[0], inline=False)
embed.add_field(name="Average Damage: ", value=avgStats[4], inline=False)
embed.add_field(name="Average Final Blows: ", value=avgStats[2],inline=False)
embed.add_field(name= "Average Healing: ", value=avgStats[3], inline =False)
embed.add_field(name="Average Deaths: ", value=avgStats[1], inline=False)
embed.set_thumbnail(url=playerIcon)
return embed
#DEBUG THIS --------------------------------------------------------------------------
def sendAvgStatsComp():
#Discord Embed
avgStats = careerStats.getCompAvgStats()
playerIcon = profile.getUserIcon()
playerName = profile.getName()
#avgStats = [elims average, death average, final blows average, healing done average, damage done average]
embed = Embed(title=playerName+"'s Competitive Career Average Stats (per 10 minutes):", url=overBuffLink , color=0xf04c9e)
embed.add_field(name="Average Eliminations: ", value=avgStats[0], inline=False)
embed.add_field(name="Average Damage: ", value=avgStats[4], inline=False)
embed.add_field(name="Average Final Blows: ", value=avgStats[2],inline=False)
embed.add_field(name= "Average Healing: ", value=avgStats[3], inline =False)
embed.add_field(name="Average Deaths: ", value=avgStats[1], inline=False)
embed.set_thumbnail(url=playerIcon)
return embed