library: tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
answer – command in tech channel which taking 3 arguments and writing like:
“/answer 1 <any text/text+photo> that’s why i cant write only “/answer” or:
if update.Message.IsCommand() {
switch update.Message.Command() {
case "answer": //that case doing well without photo. but c - the program does not see this case
handleAnswerCommand(...)
}
}
didn’t work :
if (update.Message.Photo.IsCommand() == "answer" && update.Message.Chat.ID == supportChatID){
handleAnswerCommand(bot, supportChatID, update.Message, update.Message.Photo[len(update.Message.Photo)-1].FileID, update.Message.Caption)
}
How can i identificate the command under photo (update.Message.Photo.Caption)
New contributor
iudb is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.