telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

How to force a reply for a edited message

Open ProgramCpp opened this issue 1 year ago • 0 comments

Hi, I have the below flow for the user,

  • bot send an inline keyboard
  • user enters the input
  • bot edits the previous message sent to prompt for the next input, from a standard keyboard.

my problem is, I cannot force a reply from user to the edited message. Something like,

resp, _ := bot.Send(tgbotapi.EditMessageTextConfig{
			BaseEdit: tgbotapi.BaseEdit{
				ChatID: update.FromChat().ID,
				MessageID: update.CallbackQuery.Message.MessageID,
				// NOT POSSIBLE: cannot send forceReply when editing a message
				ReplyMarkup: tgbotapi.ForceReply{ 
					ForceReply: true,
				},
			},
			Text: "enter to-address:",
		})

thanks

ProgramCpp avatar Aug 26 '24 19:08 ProgramCpp