improve keyboard api

This commit is contained in:
2025-05-21 17:20:52 +02:00
parent b2592d7334
commit 35ca1f0eee
9 changed files with 93 additions and 79 deletions

View File

@@ -9,12 +9,8 @@ void sighandler(int signum) {
run = false;
}
void callback(tgbot *bot, tgbot_cbquery *query) {
fprintf(stdout, "Callback called!");
}
void echo_message(tgbot *bot, tgbot_update *update) {
tgbot_send_message(bot, update->chat_id, update->text, "MARKDOWN", NULL, 0, 0);
tgbot_send_message(bot, update->chat_id, update->text, "MARKDOWN", NULL);
}
int main(void) {
@@ -38,7 +34,7 @@ int main(void) {
tgbot_update update;
while (run) {
tgbot_get_update(&bot, &update, callback);
tgbot_get_update(&bot, &update, NULL);
echo_message(&bot, &update);
}