Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram bot apiv5. need inditificate command in caption under photo. #723

Open
aboguz opened this issue Jun 12, 2024 · 0 comments
Open

Comments

@aboguz
Copy link

aboguz commented Jun 12, 2024

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)
}
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 with - program can't see that case
handleAnswerCommand(...)
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant