制作电报机器人时出错

Error in make telegram bot

我在制作电报机器人时遇到问题!!!这是错误! CS0029 Cannot implicitly convert type 'string[][]' to 'NetTelegramBotApi.Types.KeyboardButton[][]

Notice : I use C# for making bot!

请帮忙 谢谢

错误日志只说你把string当成KeyboardButton,请生成KeyboardButton.

您可以使用以下代码:

mainMenu = new ReplyKeyboardMarkup {
  Keyboard = new KeyboardButton[][] {
    new KeyboardButton[] {
      new KeyboardButton("Your Text")
    }
  }
};