replace-bot/handlers/private/support.py

21 lines
769 B
Python
Raw Normal View History

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()