3 changed files with 103 additions and 0 deletions
@ -0,0 +1,30 @@ |
|||||
|
import discord |
||||
|
|
||||
|
class Extension: |
||||
|
def __init__(self, core): |
||||
|
@core.tree.command(name = "buyvip", description = "Купить випку") |
||||
|
async def buyvip( |
||||
|
interaction: discord.Interaction |
||||
|
): |
||||
|
await interaction.response.defer(thinking=True) |
||||
|
steam64 = await self.core.GetSteam64OfDiscord(interaction.user) |
||||
|
player = await self.core.GetPlayer(steam64, steam64) |
||||
|
content = f""" |
||||
|
Ознакомиться с випкой можно: |
||||
|
(кратко) https://tf2.pblr-nyk.pro/#VIPSection |
||||
|
(подробно) https://vk.com/topic-173269854_48239948 |
||||
|
|
||||
|
Ниже кнопочки покупки используя киви или стим. |
||||
|
После покупки если ты играешь тебя кикнет, чтоб перезайти. |
||||
|
Кнопочки ниже ведут на ссылки которые гарантируют покупку випа на профиль привязанный к дискорду: {player.community_url} |
||||
|
""" |
||||
|
|
||||
|
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")) |
||||
|
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")) |
||||
|
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")) |
||||
|
##### |
||||
|
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="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")) |
||||
|
return await interaction.followup.send(content=content, view=view, ephemeral=False) |
@ -0,0 +1,51 @@ |
|||||
|
import discord |
||||
|
import random |
||||
|
import asyncio |
||||
|
|
||||
|
class Extension: |
||||
|
def __init__(self, core): |
||||
|
@core.tree.command(name = "freevip", description = "Получить бесплатную випку") |
||||
|
async def freevip( |
||||
|
interaction: discord.Interaction |
||||
|
): |
||||
|
await interaction.response.defer(thinking=True) |
||||
|
steam64 = await self.core.GetSteam64OfDiscord(interaction.user) |
||||
|
player = await self.core.GetPlayer(steam64, steam64) |
||||
|
|
||||
|
if player.permition: |
||||
|
return await interaction.followup.send(content="У тебя уже есть права, бесплатная випка тебе не нужна!") |
||||
|
|
||||
|
a = random.randint(1, 999) |
||||
|
b = random.randint(1, 999) |
||||
|
c = random.randint(1, 999) |
||||
|
d = a * b - c |
||||
|
primer = f"{a} x {b} - {c} = ?" |
||||
|
|
||||
|
await interaction.followup.send(content=f""" |
||||
|
Молодец что решился на такой шаг! |
||||
|
Бесплатная випка позволит тебе оценить, стоит ли тратить 20 рублей с обедов на платную випку. |
||||
|
Тебе будет дан день чтоб оценить все ее прелести, с момента когда ты согласишься. |
||||
|
Если ты решил всетаки ее купить, то введи команду /buyvip |
||||
|
|
||||
|
Випка будет выдана на профиль: {player.community_url} |
||||
|
Нехочешь решать пример?? Иди на наш сайт и жми просто на кнопку, бесплатный вип! |
||||
|
Сейчас тебе дано 60 секунд чтоб решить пример ниже, ответ присылаешь же в этот канал, тупо цифирками: |
||||
|
{primer}""", ephemeral=False) |
||||
|
|
||||
|
def check(message: discord.Message): |
||||
|
return message.author == interaction.user and message.channel.id == interaction.channel_id |
||||
|
|
||||
|
try: |
||||
|
msg = await core.wait_for("message", timeout = 60, check=check) |
||||
|
except asyncio.TimeoutError: |
||||
|
return await interaction.channel.send(content = "Ты дурачек, какая тебе випка бесплатная!", delete_after=10) |
||||
|
|
||||
|
try: |
||||
|
result = int(msg.content) |
||||
|
except: |
||||
|
return await interaction.channel.send(content = f"Ну ты и дебил, что сложно написать в ответ, число??\nКстате, тебе нужно было тупо написать {d}", delete_after=10) |
||||
|
|
||||
|
if result != d: |
||||
|
return await interaction.channel.send(content = f"Иди математику учи, дуралей.\nКстате, тебе нужно было тупо написать {d}", delete_after=10) |
||||
|
|
||||
|
return await interaction.channel.send(content = await player.freevip()) |
Loading…
Reference in new issue