https://github.com/fadhil-riyanto/fadhil-riyanto-bot
Fadhil personal telegram bot
https://github.com/fadhil-riyanto/fadhil-riyanto-bot
telegram-bot telegram-bot-api tgbot
Last synced: 8 months ago
JSON representation
Fadhil personal telegram bot
- Host: GitHub
- URL: https://github.com/fadhil-riyanto/fadhil-riyanto-bot
- Owner: fadhil-riyanto
- License: gpl-3.0
- Created: 2024-07-28T15:46:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-02T00:38:12.000Z (11 months ago)
- Last Synced: 2025-02-05T21:59:24.435Z (10 months ago)
- Topics: telegram-bot, telegram-bot-api, tgbot
- Language: C++
- Homepage:
- Size: 474 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
## Fadhil's telegram bot
personal assistant telegram bot
## Dependencies
- [TgBot](https://github.com/reo7sp/tgbot-cpp)
- Boost
- OpenSSL
- [fmt](https://github.com/fmtlib/fmt)
- Zlib
- cURL
- [log.c](https://github.com/fadhil-riyanto/log.c-patched) (submodule)
- [pugixml](https://github.com/zeux/pugixml) (submodule, checkout tags newest please)
- [inih](https://github.com/benhoyt/inih) (submodule)
- [googletest](https://github.com/google/googletest) (test)
## build instructions
currenly, supported platform only linux. I have no plans to make a windows version.
make sure all dependencies are installed, and you need several GB of ram.
### 1. Install dependencies
pacman
```
sudo pacman -Syu
sudo pacman -S cmake boost openssl zlib curl fmt
```
optional (testing)
```
sudo pacman -S gtest
```
### 2. build tgbot-cpp from source
```
git clone https://github.com/fadhil-riyanto/tgbot-cpp
cd tgbot-cpp
cmake .
make -j4
sudo make install
```
### 3. build telegram-bot-api server
this server make your bot fast than default api.telegram.org
```
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
cd telegram-bot-api
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target install
```
nb: use `-DCMAKE_BUILD_TYPE=debug` if you want debug binary mode
start the service, you need api_id and api_hash from https://my.telegram.org/
```
telegram-bot-api --api-id=YOUR_API_ID --api-hash=YOUR_API_HASH --local --http-ip-address=127.0.0.1
```
### 4. build the bot
```
git clone https://github.com/fadhil-riyanto/fadhil-riyanto-bot.git
cd fadhil-riyanto-bot
git submodule update
mkdir build
cmake ..
make -j4
```
### 4. build server mode
This will use api.telegram.org instead selfhosted server, you can skip step 3
add `add_compile_definitions("-DSERVER_ENV")` to the CMakeLists.txt
## Licence
license: [GPL-3.0](https://github.com/fadhil-riyanto/fadhil-riyanto-bot/blob/master/license)
## Maintainer
Fadhil Riyanto