quit
quit
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
y
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
tried this but it only gives a callback to console instead of sending to the bot
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
[TelegramCommand("ping", false, false, "BUTTON:Ping")]
public static async Task Ping(Update update, List<string> args)
{
// Create a new inline keyboard button with the text "Ping" and the callback data "ping"
var button = new InlineKeyboardButton
{
Text = "Ping",
CallbackData = "ping"
};

// Create a new inline keyboard markup with the button we just created
var keyboard = new InlineKeyboardMarkup(new[] { new[] { button } });

// Send a message with the text "🤖 Bot is online" and the inline keyboard markup we just created
await Telegram.client.SendMessageAsync(update.Message.Chat.Id, "🤖 Bot is online", replyMarkup: keyboard);
}
[TelegramCommand("ping", false, false, "BUTTON:Ping")]
public static async Task Ping(Update update, List<string> args)
{
// Create a new inline keyboard button with the text "Ping" and the callback data "ping"
var button = new InlineKeyboardButton
{
Text = "Ping",
CallbackData = "ping"
};

// Create a new inline keyboard markup with the button we just created
var keyboard = new InlineKeyboardMarkup(new[] { new[] { button } });

// Send a message with the text "🤖 Bot is online" and the inline keyboard markup we just created
await Telegram.client.SendMessageAsync(update.Message.Chat.Id, "🤖 Bot is online", replyMarkup: keyboard);
}
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
o
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
nvm
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
[TelegramCommand("BUTTON:Ping", false, false)] public static async Task Ping(Update update, List<string> args) => Console.WriteLine("[ESTATE] " + await Estate.TriggerEvent("Ping", args[0]));
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
AH
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
so what would it be than to send message
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
Telegram.client.SendMessage(update.Message.Chat.Id, ":robot: Bot is online", replyMarkup: keyboard);
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
instead of printing ping in telegram
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
[TELEGRAM] CallbackQuery: ping?
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
ping
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
it just prints
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
well theres no error?
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
Sure
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
so do return after?
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
but this is the command?
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
[TelegramCommand("ping", false, false)]
public static async Task Ping(Update update, List<string> args)
{
// Create a new inline keyboard button with the text "Ping" and the callback data "ping"
var button = new InlineKeyboardButton
{
Text = "Ping",
CallbackData = "ping"
};

// Create a new inline keyboard markup with the button we just created
var keyboard = new InlineKeyboardMarkup(new[] { new[] { button } });

// Send a message with the text "🤖 Bot is online" and the inline keyboard markup we just created
Telegram.client.SendMessage(update.Message.Chat.Id, "🤖 Bot is online", replyMarkup: keyboard);
[TelegramCommand("ping", false, false)]
public static async Task Ping(Update update, List<string> args)
{
// Create a new inline keyboard button with the text "Ping" and the callback data "ping"
var button = new InlineKeyboardButton
{
Text = "Ping",
CallbackData = "ping"
};

// Create a new inline keyboard markup with the button we just created
var keyboard = new InlineKeyboardMarkup(new[] { new[] { button } });

// Send a message with the text "🤖 Bot is online" and the inline keyboard markup we just created
Telegram.client.SendMessage(update.Message.Chat.Id, "🤖 Bot is online", replyMarkup: keyboard);
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
why so
72 replies
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
not printing in telegram
72 replies