Копирование реферальной ссылки
Build and push Docker image / docker (push) Successful in 9s
Details
Build and push Docker image / docker (push) Successful in 9s
Details
This commit is contained in:
parent
3cb18ddd77
commit
a9df213714
16
bot.py
16
bot.py
|
|
@ -9,6 +9,7 @@ from datetime import time as dt_time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from telegram import (
|
from telegram import (
|
||||||
|
CopyTextButton,
|
||||||
InlineKeyboardButton,
|
InlineKeyboardButton,
|
||||||
InlineKeyboardMarkup,
|
InlineKeyboardMarkup,
|
||||||
InputFile,
|
InputFile,
|
||||||
|
|
@ -255,10 +256,21 @@ class MpakoBot:
|
||||||
await message.reply_text("Не удалось получить ссылку. Попробуй позже.")
|
await message.reply_text("Не удалось получить ссылку. Попробуй позже.")
|
||||||
return
|
return
|
||||||
link = f"https://t.me/{username}?start=ref_{user.id}"
|
link = f"https://t.me/{username}?start=ref_{user.id}"
|
||||||
|
keyboard = InlineKeyboardMarkup(
|
||||||
|
[
|
||||||
|
[
|
||||||
|
InlineKeyboardButton(
|
||||||
|
"Скопировать ссылку",
|
||||||
|
copy_text=CopyTextButton(text=link),
|
||||||
|
)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
)
|
||||||
await message.reply_text(
|
await message.reply_text(
|
||||||
"Пригласи друга:\n"
|
"Пригласи друга:\n"
|
||||||
f"{link}\n\n"
|
f"{link}\n\n"
|
||||||
"Когда друг впервые оплатит генерацию, ты получишь +3 генерации."
|
"Когда друг впервые оплатит генерацию, ты получишь +3 генерации.",
|
||||||
|
reply_markup=keyboard,
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _status(
|
async def _status(
|
||||||
|
|
@ -727,7 +739,7 @@ class MpakoBot:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if is_admin:
|
if is_admin:
|
||||||
is_premium = True
|
is_premium = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
request, position = await self._queue.enqueue(
|
request, position = await self._queue.enqueue(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue