Добавлены донаты (#13)

This commit is contained in:
tema 2023-03-30 05:58:57 +00:00
commit 437ed25e84
6 changed files with 27 additions and 2 deletions

View File

@ -15,6 +15,8 @@ port = 3001
; if you don`t use local TelegramBotAPI Server + WebHooks -> Set settings in bot.py
link = https://example.com/parse_me
chat_id = 1234
; For feedback
[Users]
;Uncomment this variable, if you use filters to users
@ -30,3 +32,8 @@ database_link = sqlite:///db.sqlite3
;Seconds only/
time = 14400
;////////////
[payment]
payment_link = https://send.monobank.ua/jar/7nXV3s5Txd
card_number = 5375411204430461

View File

@ -2,3 +2,4 @@ from . import main
from . import admin
from . import timetable
from . import support
from . import donate

View File

@ -0,0 +1,11 @@
from aiogram import types
from load import dp, bot, config
@dp.message_handler(commands=["donate"])
async def donate(message: types.Message):
await bot.send_message(
message.chat.id,
(f"Оплптити онлайн: {config.payment_link}\n"
f"Переказ на карту: {config.card_number}\n")
)

View File

@ -9,9 +9,12 @@ async def feedback(message: types.Message, state):
await bot.send_message(message.chat.id, "Напишіть ваше повідомлення!")
await state.set_state(state="wait_for_support_message")
@dp.message_handler(state="wait_for_support_message")
async def send_admins(message: types.Message, state):
await message.copy_to(config.chat_id, reply_markup=await answer_kb(message.from_user.id))
await message.answer("Дякую!")
@dp.message_handler(state="answer_support")
async def send_answer(message: types.Message, state):

View File

@ -1,4 +1,6 @@
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from load import config
donate = InlineKeyboardMarkup()
donate.add(InlineKeyboardButton("", url="https://send.monobank.ua/jar/7nXV3s5Txd"))
donate.add(InlineKeyboardButton("", url=config.payment_link))

View File

@ -5,6 +5,7 @@ async def set_commands(dp):
await dp.bot.set_my_commands([
types.BotCommand("start", "получить список замен"),
types.BotCommand("help", "информация"),
types.BotCommand("donate", "Підтримка автора"),
types.BotCommand("link", "получить ссылку на файл"),
types.BotCommand('timetable', "Розклад"),
types.BotCommand('feedback', "Звязок з адміністратором"),