-
Notifications
You must be signed in to change notification settings - Fork 0
/
cdngen.py
49 lines (40 loc) · 2.01 KB
/
cdngen.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
def mapIdimg(mapid: int):
conv = {
11: "classic_sru",
12: "aram",
22: "tft",
30: "gamemodex",
21: "shared"
}
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/content/src/leagueclient/gamemodeassets/{conv[mapid]}/img/game-select-icon-active.png"
def mapIcon(data):
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/" + "/".join(data.split("/")[2:]).lower()
def defaultTileLink(champId):
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/champion-icons/{champId}.png"
def assetsLink(link):
links = link.lower().split("/")[4:]
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/assets/{'/'.join(links)}"
def tftImg(compDir):
name = compDir.split("/")[-1].lower()
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/assets/loadouts/companions/{name}"
def localeDiscordStrings(locale):
if locale == "en_us":
locale = "default"
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/{locale}/v1/discord_strings.json"
def localeChatStrings(locale):
if locale == "en_us":
locale = "default"
return f"https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-social/global/{locale}/trans.json"
def profileIcon(id):
return f"https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/profile-icons/{id}.jpg"
def availabilityImg(a):
conv = {
"chat": "https://i.imgur.com/I2XxZ5y.png",
"away": "https://i.imgur.com/X5YwSxs.png",
"dnd": "https://i.imgur.com/5I4uDSL.png",
"leagueIcon": "https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/assets/splashscreens/lol_icon.png"
}
return conv[a]
from utilities import ANIMATEDSPLASHESURL
def animatedSplashUrl(skinId):
return f"{ANIMATEDSPLASHESURL}/{skinId}.gif"