百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

telebot

> 编程语言
开源

C 语言中的 Telegram Bot API

190 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

C 语言中的 Telegram Bot API

Telebot

C Library for Telegram bot API that uses json-c and libcurl. Head over to Telegram Bots page to read about how to register your brand new bot with Telegram platform and see it in action using telebot.

Building

You need to install libraries and build tools such as CMake. On Debian-based Linux distributions you can do it as follows:

bash
sudo apt-get install libcurl4-openssl-dev libjson-c-dev cmake binutils make

On Mac OSX, first install macports from MacPorts and in Terminal

bash
sudo port install cmake json-c curl

To build the library run following commands:

bash
cd [your repository]
mkdir -p build && cd build
cmake ..
make

For debug build

bash
mkdir -p build && cd build
cmake .. -DDEBUG=1
make

Testing

Place Telegam Bot API Token in .token file in the root folder of the repository, and run as below

bash
./build/test/testbot

Sample

Following sample creates a simple dummy bot which echoes back the messages sent to it. A more comprehensive test bot is built as testbot executable under Build/test folder. It supports various commands to test APIs, polls, custom keyboards, and multimedia sending. The executable expects and reads bot token from .token file on the same location.

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言