diff options
author | Trumeet <yuuta@yuuta.moe> | 2022-04-01 21:13:31 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2022-04-01 21:13:31 -0700 |
commit | 318a1ef88bb5ea09ff4cf953908aef5c76735a46 (patch) | |
tree | 9cdd8be7679e6a336af7a82ca4947b3ffdac97b2 /tdutils.h | |
download | ksyxbot-318a1ef88bb5ea09ff4cf953908aef5c76735a46.tar ksyxbot-318a1ef88bb5ea09ff4cf953908aef5c76735a46.tar.gz ksyxbot-318a1ef88bb5ea09ff4cf953908aef5c76735a46.tar.bz2 ksyxbot-318a1ef88bb5ea09ff4cf953908aef5c76735a46.zip |
First Commit
Diffstat (limited to 'tdutils.h')
-rw-r--r-- | tdutils.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tdutils.h b/tdutils.h new file mode 100644 index 0000000..c0653d5 --- /dev/null +++ b/tdutils.h @@ -0,0 +1,28 @@ +#ifndef _TDUTILS_H +#define _TDUTILS_H + +#include <td/telegram/td_c_client.h> +#include <stdbool.h> + +extern long long my_id; +extern bool closing; + +void td_init(); + +void td_free(); + +void td_loop(); + +void tg_close(); + +int td_send(void *func, void (*cb)(bool, struct TdObject *, struct TdError *, void *), void *cb_arg); + +void fetal_cb(bool successful, struct TdObject *result, struct TdError *error, void *cb_arg); + +int post_auth(); + +int handle_message(struct TdUpdateNewMessage *update); + +int handle_inline(struct TdUpdateNewInlineQuery * update); + +#endif /* _TDUTILS_H */
\ No newline at end of file |