在使用C#的ASP.NET MVC中,我不能接收CallbackQuery。我有InlineKeyoardButton,但当我在电报机器人中点击它时,它不能工作。
一切工作,所以将只是内联按钮做不工作。
这是我的代码:
using System;
using System.Web.Mvc;
using Telegram.Bot;
using Telegram.Bot.Args;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.ReplyMarkups;
namespace F
我使用InlineKeyboardButton在电报机器人中创建按钮,如下所示。
keyboard = [[InlineKeyboardButton("Option 1", callback_data='1'),
InlineKeyboardButton("Option 2. Long text here. Long text here. Long text here.", callback_data='2'),
InlineKeyboardButton("Option
我对电报机器人中的命令视图有一些问题。我在c# asp.net中使用telegram.bot SDK:
var keyboard = new ReplyKeyboardMarkup(new[]
{
new [] // first row
{
new KeyboardButton("/help"),
new KeyboardButton("/start")
},
我想在两行或两行以上的电报机器人中制作内联键盘,我知道如何在一行中(在以下代码中)制作键盘:
StringBuilder sb = new StringBuilder(txtBody.Text); int chatId="123456789"; //not real Chat ID // Buttons InlineKeyboardButton urlButton1 = new InlineKeyboardButton(); InlineKeyboardButton urlButton2 = new InlineKeyboardButto