Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I found support for a new api with anonymous polls in the dev branch.
poll := tgbotapi.SendPollConfig{BaseChat, "Question", []x}
bot.Send(poll)
It is possible, somewhere you look at the documentation in the wrong place.
Here is the official doc on api methods, the sendPoll method publishes a poll https://core.telegram.org/bots/api#sendpoll
Another question is that the go-telegram-bot-api library you are using may not yet support this method. You can write it down and make a pull request about it.
Yes, you can.
A poll is the most common bot that consults a database and stores data in it.
An example for quiz, maybe it will be useful to someone
poll := tgbotapi.SendPollConfig{
BaseChat: tgbotapi.BaseChat{
ChatID: update.Message.Chat.ID,
},
Question: "Answer to the Ultimate Question of Life, the Universe, and Everything",
Type: "quiz",
Options: []string{"41", "42", "32", "1"},
CorrectOptionID: 1,
}
bot.Send(poll)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question