Skip to content

NicoNex/uTron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uTron

Engine for Telegram bot written in pure c.

Usage

A very simple implementation is:

#include <stdlib.h>
#include "utron/utron.h"

struct bot {
    int64_t chat_id;
};

struct bot *new_bot(int64_t chat_id) {
    struct bot *b = malloc(sizeof(struct bot));
    b->chat_id = chat_id;
    return b;
}

void update_bot(struct bot *bot, struct json_object *update) {
    tg_send_message("Hello World!", bot->chat_id);
}

int main() {
    run_dispatcher("YOUR TELEGRAM API TOKEN");
}

About

Concurrent Telegram bot library written in pure C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors