简体   繁体   中英

Error in make telegram bot

i have problem in make telegram bot!!!and this is the Error! CS0029 Cannot implicitly convert type 'string[][]' to 'NetTelegramBotApi.Types.KeyboardButton[][]

Notice : I use C# for making bot!

please help thanks

错误日志仅表示您将string作为KeyboardButton放置,请生成KeyboardButton

You can use the following code:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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