replace-bot/handlers/private/support.py
tema 42a0579f2e
Изменён парсинг конфига
Добавлена обратная связь
2023-03-28 09:54:21 +03:00

21 lines
769 B
Python

from aiogram import types
from load import dp, bot, config
from keyboards.inline.support import answer_kb
@dp.message_handler(commands="feedback", state='*')
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))
@dp.message_handler(state="answer_support")
async def send_answer(message: types.Message, state):
data = await state.get_data()
await message.copy_to(data["u"])
await state.finish()