简体   繁体   English

C# Telegram Bot Api ReplyKeyboardMarkup 在里面使用 html

[英]C# Telegram Bot Api ReplyKeyboardMarkup using html inside

I wantto write telegram bot using https://github.com/TelegramBots/telegram.bot I want to use html tags inside KeyboardButton.我想使用https://github.com/TelegramBots/telegram.bot编写电报机器人我想在 KeyboardButton 中使用 html 标签。 I'm trying like this:我正在尝试这样:

public static ReplyKeyboardMarkup rkmStartButton
    {
        get
        {
            KeyboardButton btnCanal = new KeyboardButton("<b>bold</b>");

            ReplyKeyboardMarkup rkmStartButton = new ReplyKeyboardMarkup();
            rkmStartButton.ResizeKeyboard = true;

            rkmStartButton.Keyboard = new KeyboardButton[][]
            {
               new KeyboardButton[]
               {
                   btnCanal
               }
              };

            return rkmStartButton;
        }
    }

But in telegram button text looks like < b > bold < / b >, must be: bold I try many variants, but they still doesnot work.但是在电报按钮文本看起来像<b>粗体</b>,必须是:粗体我尝试了很多变体,但它们仍然不起作用。 How i can do this?我怎么能做到这一点?

不幸的是,您目前无法格式化键盘按钮文本,您可以向@BotSupport提出建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM