我正在使用github.com/Syfaro/telegram-bot-api在golang中编写电报机器人。我需要遵循以下条件:
我找不到如何向用户发送输入请求。有人可以帮我吗?
updates := bot.ListenForWebhook("/" + bot.Token)
for update := range updates {
chatID := update.Message.Chat.ID
if update.Message.IsCommand() {
msg := tgbotapi.NewMessage(chatID, "")
switch update.Message.Command() {
case "command":
response := tgbotapi.inputRequest(chatId, "Enter some text:") //pseudocode
msg.Text = response.Text //
bot.Send(msg) //
}
} else {
bot.Send(tgbotapi.NewMessage(chatID, "I don't know what to say"))
}
}