Добавлены донаты (#13)
This commit is contained in:
commit
437ed25e84
@ -15,6 +15,8 @@ port = 3001
|
|||||||
; if you don`t use local TelegramBotAPI Server + WebHooks -> Set settings in bot.py
|
; if you don`t use local TelegramBotAPI Server + WebHooks -> Set settings in bot.py
|
||||||
|
|
||||||
link = https://example.com/parse_me
|
link = https://example.com/parse_me
|
||||||
|
chat_id = 1234
|
||||||
|
; For feedback
|
||||||
|
|
||||||
[Users]
|
[Users]
|
||||||
;Uncomment this variable, if you use filters to users
|
;Uncomment this variable, if you use filters to users
|
||||||
@ -30,3 +32,8 @@ database_link = sqlite:///db.sqlite3
|
|||||||
;Seconds only/
|
;Seconds only/
|
||||||
time = 14400
|
time = 14400
|
||||||
;////////////
|
;////////////
|
||||||
|
|
||||||
|
|
||||||
|
[payment]
|
||||||
|
payment_link = https://send.monobank.ua/jar/7nXV3s5Txd
|
||||||
|
card_number = 5375411204430461
|
||||||
|
@ -2,3 +2,4 @@ from . import main
|
|||||||
from . import admin
|
from . import admin
|
||||||
from . import timetable
|
from . import timetable
|
||||||
from . import support
|
from . import support
|
||||||
|
from . import donate
|
||||||
|
11
handlers/private/donate.py
Normal file
11
handlers/private/donate.py
Normal 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")
|
||||||
|
)
|
@ -9,9 +9,12 @@ async def feedback(message: types.Message, state):
|
|||||||
await bot.send_message(message.chat.id, "Напишіть ваше повідомлення!")
|
await bot.send_message(message.chat.id, "Напишіть ваше повідомлення!")
|
||||||
await state.set_state(state="wait_for_support_message")
|
await state.set_state(state="wait_for_support_message")
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(state="wait_for_support_message")
|
@dp.message_handler(state="wait_for_support_message")
|
||||||
async def send_admins(message: types.Message, state):
|
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.copy_to(config.chat_id, reply_markup=await answer_kb(message.from_user.id))
|
||||||
|
await message.answer("Дякую!")
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(state="answer_support")
|
@dp.message_handler(state="answer_support")
|
||||||
async def send_answer(message: types.Message, state):
|
async def send_answer(message: types.Message, state):
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
||||||
|
|
||||||
|
from load import config
|
||||||
|
|
||||||
donate = InlineKeyboardMarkup()
|
donate = InlineKeyboardMarkup()
|
||||||
donate.add(InlineKeyboardButton("☕", url="https://send.monobank.ua/jar/7nXV3s5Txd"))
|
donate.add(InlineKeyboardButton("☕", url=config.payment_link))
|
||||||
|
@ -5,6 +5,7 @@ async def set_commands(dp):
|
|||||||
await dp.bot.set_my_commands([
|
await dp.bot.set_my_commands([
|
||||||
types.BotCommand("start", "получить список замен"),
|
types.BotCommand("start", "получить список замен"),
|
||||||
types.BotCommand("help", "информация"),
|
types.BotCommand("help", "информация"),
|
||||||
|
types.BotCommand("donate", "Підтримка автора"),
|
||||||
types.BotCommand("link", "получить ссылку на файл"),
|
types.BotCommand("link", "получить ссылку на файл"),
|
||||||
types.BotCommand('timetable', "Розклад"),
|
types.BotCommand('timetable', "Розклад"),
|
||||||
types.BotCommand('feedback', "Звязок з адміністратором"),
|
types.BotCommand('feedback', "Звязок з адміністратором"),
|
||||||
|
Loading…
Reference in New Issue
Block a user