Browse Source

деньги мне неси

huy
gsd 2 years ago
parent
commit
69abc00abc
  1. 26
      user_ext/buyvip.py

26
user_ext/buyvip.py

@ -1,4 +1,6 @@
import discord import discord
import aiohttp
import os
class Extension: class Extension:
def __init__(self, core): def __init__(self, core):
@ -19,12 +21,22 @@ class Extension:
Кнопочки ниже ведут на ссылки которые гарантируют покупку випа на профиль привязанный к дискорду: {player.community_url} Кнопочки ниже ведут на ссылки которые гарантируют покупку випа на профиль привязанный к дискорду: {player.community_url}
""" """
prices = []
async with aiohttp.ClientSession() as session:
async with session.get(f"{os.getenv('BACKEND_URL')}/api/external/vip", ssl=False) as response:
prices = await response.json()
view = discord.ui.View() view = discord.ui.View()
view.add_item(discord.ui.Button(label="Qiwi Месяц - 150 Рублей", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=qiwi&steam64={steam64}&cost=150")) #qiwi
view.add_item(discord.ui.Button(label="Qiwi Неделя - 75 Рублей", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=qiwi&steam64={steam64}&cost=75")) for price in prices:
view.add_item(discord.ui.Button(label="Qiwi День - 20 Рублей", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=qiwi&steam64={steam64}&cost=20")) if price["money_price"] == 0:
##### continue
view.add_item(discord.ui.Button(label="Steam Месяц - 1 Ключ маннко", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=steam")) view.add_item(discord.ui.Button(label=f"Qiwi {price['human_duration'].split()[1]} - {price['money_price']} Рублей", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=qiwi&steam64={steam64}&cost={price['money_price']}"))
view.add_item(discord.ui.Button(label="Steam Неделя - 20 Рефов", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=steam"))
view.add_item(discord.ui.Button(label="Steam День - 5 Рефов", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=steam")) #steam
for price in prices:
if price["money_price"] == 0:
continue
view.add_item(discord.ui.Button(label=f"Steam {price['human_duration'].split()[1]} - {price['item_price']}", url=f"https://tf2.pblr-nyk.pro/api/profile/current/buyvip?buy_type=steam"))
return await interaction.followup.send(content=content, view=view, ephemeral=False) return await interaction.followup.send(content=content, view=view, ephemeral=False)
Loading…
Cancel
Save