我的处理程序回调:
func (b *Bot) HandleView(bot *tgbotapi.BotAPI, update tgbotapi.Update) error {
zap.L().Debug("handler", zap.Reflect("HandleView", update))
smileSearch := "\xF0\x9F\x94\x8E\t"
text := fmt.Sprintf("%v <b>Please enter phrase</b>\n\n", smileSearch)
msg := tgbotapi.NewMessage(update.CallbackQuery.From.ID, text)
msg.ParseMode = "html"
if _, err := bot.Send(msg); err != nil {
return err
}
return nil
}
我需要在单独的处理程序中处理用户输入。如何在 golang 上做到这一点?
UPD:
当 HandleView 函数运行时,用户必须输入一些内容。如何为此输入设置处理程序?
UPD2:我使用了 golang 和“github.com/go-telegram-bot-api/telegram-bot-api/v5”
守着星空守着你