Closed anko20094 closed 2 years ago
I try do when bot received my message forward it for other users, but this code doesn't work for me:
bot.api.forward_message(to_chat_id: customer.c_id, from_chat_id: message.chat.id, message_id: message.message_id)
customer.c_id - it takes users ID from DB
and I have that error: Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: chat_id is empty")
any advice?
It looks like the parameter is called chat_id and not to_chat_id. https://core.telegram.org/bots/api#forwardmessage
chat_id
to_chat_id
Oo, yes, now it works, thank you very much:)
I try do when bot received my message forward it for other users, but this code doesn't work for me:
bot.api.forward_message(to_chat_id: customer.c_id, from_chat_id: message.chat.id, message_id: message.message_id)
customer.c_id - it takes users ID from DB
and I have that error: Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: chat_id is empty")
any advice?