Skip to content

Royna2544/c_cpp_telegrambot

Repository files navigation

A Telegram bot, mostly used by my own uses and learning purposes

Status

Build TgBot++ (Linux)

Build TgBot++ (macOS)

Build TgBot++ (Windows)

Used languages

C C++ Kotlin Javascript SQLite3 HTML5 CSS SCSS PHP
C C++ Kotlin Javascript SQLite HTML5 CSS SCSS PHP
popen_wdt lib main C++ code Android socket client app Webpage Database support Webpage Webpage Webpage Webpage

Used external libraries

  • Abseil C++ common library - Used for logging - Link
  • C++ HTTP library - Used for website server support - Link
  • dlfcn Win32 support - Used for runtime loader for commands - Link
  • GTest - Test framework for C++ codes - Link
  • Git library 2 - Used for retrieving git root, etc - Link
  • SQLite3 - Used for one database backend, for whitelist, blacklist saving support
  • Protobuf - Used for another database backend - Link
  • TgBot-cpp - Core library for being a Telegram bot - Link
  • CppTrace - C++ Backtrace Library - Link
  • Sol2 - C++ and Lua integration - Link

Goals

  • There is no goal - I will just add stuff whichever I could and learn those while writing code for it

TODOs

  • See TODO file, though its not really updated

Cmake options

CMake options has a common prefix of 'TGBOTCPP_'

  • TGBOTCPP_BUILD_TESTS: Build the test suite (default: ON)
  • TGBOTCPP_RUST_MODULES: Enable and build command modules written with Rust language (default: OFF)
  • TGBOTCPP_LUA_MODULES: Enable support for command module written with Lua language (default: ON)
  • TGBOTCPP_LLM_SUPPORT: Enable support for LLM framework (Requires compatible hardware, e.g. NVIDIA GPU) (default: OFF)
  • TGBOTCPP_SOCKET_PACKET_VERBOSE: Enable verbose hex-view level logging for socket packets (default: OFF)

Config file options

  • TOKEN: Telegram bot token
  • LOG_FILE: Log file path
  • DATABASE_CFG: Database configuration. Format: "type:filename", where type is one of "sqlite" or "protobuf", and filename is the database file path.
  • SOCKET_CFG: Export network-socket based API configuration. Choose between "ipv4", "ipv6". Omitting this option disables the socket API.
  • GITHUB_TOKEN: Github token (Used for private repo access).
  • OPTIONAL_COMPONENTS: Enable optional components. Comma-separated list of components to enable. Supported components: "webserver", "datacollector".
  • BUILDBUDDY_API_KEY: BuildBuddy API key for Android RBE.

About

Can you believe there is a C++ written bot? Here it is

Resources

License

Stars

Watchers

Forks

Contributors 6