Valorina
Valorina copied to clipboard
[FEATURE] Night Market
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
👋 Thanks for reporting!
For people willing to work on the Issue, Riot sends the night market as an additional item to the object present here called "BonusStore", make sure to style the embed similar to the current +store embed, create a new additional command called +nightmarket in here , create an additional function for nightmarket in getSkinOffers.py
async def getStore(headers, user_id, region, nightMarket=False):
session = aiohttp.ClientSession()
try:
async with session.get(f'https://pd.{region}.a.pvp.net/store/v2/storefront/{user_id}', headers=headers) as r:
data = json.loads(await r.text())
except Exception as e:
print(e)
finally:
await session.close()
if nightMarket:
if 'BonusStore' not in data:
return 404 # if "BonusStore" is not present in the object send a different response letting people know nightmarket is not enabled
nightMarketPanel = data['BonusStore']
return await getNightMarket(headers, nightMarketPanel, region)
if 'SkinsPanelLayout' not in data:
return
skinPanel = data['SkinsPanelLayout']
return await getSkinDetails(headers, skinPanel, region)