Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can text in telegram bot's text works as Html attribute?

if (update.getMessage().getText().equalsIgnoreCase("/register")) {
                    try {
                        SendMessage sendMessage = new SendMessage();
                        sendMessage.setChatId(update.getMessage().getChatId().toString());
                        sendMessage.setReplyToMessageId(update.getMessage().getMessageId());
                        sendMessage.setText("Press <a href=\"https://sso.***.com/account/register\">" +
                                "HERE</a> to register");
                        execute(sendMessage);
                    } catch (TelegramApiException e) {
                        e.printStackTrace();
                    }
                }

I am trying to add Html button to SendMessage.setText, but this not work.
Did i do it wrong somewhere?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Your question isn’t clear at all. But i think you can add:

sendMessage.enableHtml(true);

You can check Tabnine

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading