Answer the question
In order to leave comments, you need to log in
Can't send response to Telgram bot?
Good, I'm trying to make a support system, I made the function of sending sms to the chat, but I can't send a response to the bot
@dp.message_handler(state = Registr.Echo)
async def Emailreggroup(message: types.Message, state: FSMContext):
chat_id = message.chat.id
text = message.text
if chat_id == config.FEEDBACK_CHAT_ID:
reply = message.reply_to_message
if reply:
await bot.send_message(
chat_id=reply.forward_from.id,
text=text,
)
else:
await bot.send_message(
chat_id=chat_id,
text='Сделай переслать, чтобы ответить автору',
)
else:
await bot.forward_message(
chat_id = config.FEEDBACK_CHAT_ID,
from_chat_id = chat_id,
message_id = message.message_id
)
await bot.send_message(
chat_id=chat_id,
text='Сообщение отправлено ожидай ответа',
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question