2023-03-28 09:49:46 +03:00
|
|
|
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")
|
|
|
|
|
2023-03-30 08:57:14 +03:00
|
|
|
|
2023-03-28 09:49:46 +03:00
|
|
|
@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))
|
2023-03-30 08:57:14 +03:00
|
|
|
await message.answer("Дякую!")
|
|
|
|
|
2023-03-28 09:49:46 +03:00
|
|
|
|
|
|
|
@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()
|