Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
Are there ways to use inline keyboard and comment button together?

I have a telegram bot that sends a message to a channel. I want to implement the button attached to this post (inline keyboard button), but I also want to see the comment button. When you add an inline keyboard, it disappears.

Comments button:

Example #1

Inline Keyboard Button (the text doesn't matter):

Example #2

Code Example without keyboard (Golang):

message := tgbotapi.NewPhotoUpload(channel.ID, tgbotapi.FileBytes{
    Name:  "image-name",
    Bytes: image,
})
message.Caption = "This is the caption"
message.ParseMode = "HTML"
response, err := bot.Send(message)
if err != nil {
    fmt.Println(err)
}

Code Example with keyboard (Golang):

var keyboard = tgbotapi.NewInlineKeyboardMarkup(
    tgbotapi.NewInlineKeyboardRow(
        tgbotapi.NewInlineKeyboardButtonData("Test", "test"),
    ),
)
message := tgbotapi.NewPhotoUpload(channel.ID, tgbotapi.FileBytes{
    Name:  "image-name",
    Bytes: image,
})
message.Caption = "This is the caption"
message.ParseMode = "HTML"
message.ReplyMarkup = keyboard
response, err := bot.Send(message)
if err != nil {
    fmt.Println(err)
}

Is there any way to use these feautures together?

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

You must create an inline URL button with a link, e.g.,

https://t.me/c/<groupId>/<groupMessageId + 1000000>?thread=<groupMessageId>

where groupId is the id of your group for comments, and groupMessageId is the id of message of your post in group for comments.

about 4 years ago · Juan Pablo Isaza Relatório

0

I found a simpler link for this.

https://t.me/<channelName>/<originalMessageId>?comment=1

where channelName - is username of your channel, originalMessageId is the id of the original message (not message id in the group for comments)

update It seems this is not working with messages with the inline keyboard (only with native comment button).

about 4 years ago · Juan Pablo Isaza Relatório

0

You must create an inline URL button with a link, e.g.,

https://t.me/<channelName>/<originalMessageId>?thread=<originalMessageId>

where channelName - is username of your channel, originalMessageId is the id of the original message (not message id in the group for comments)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda