Skip to content

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

License

Notifications You must be signed in to change notification settings

Royna2544/c_cpp_telegrambot

Repository files navigation

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

Status

Build Glider (Linux)

Build Glider (macOS)

Build Glider (Windows)

CodeQL Analysis

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: OFF)
  • 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_ENABLE_LOCAL_LLM: Enable support for local LLM framework (Requires compatible hardware, e.g. NVIDIA GPU) (default: OFF)
  • TGBOTCPP_CROSS_COMPILING: Whether we are cross-compiling, can be auto detected or be manually set
  • TGBOTCPP_AUTODETECT_CROSS_COMPILING: Auto detect TGBOTCPP_CROSS_COMPILING via CMAKE_HOST_CMAKE_SYSTEM_PROCESSOR and CMAKE_SYSTEM_PROCESSOR
  • TGBOTCPP_CROSS_COMPILE_INSTALL_PATH: Path that the package is installed to (i.e. CMAKE_INSTALL_PREFIX). Default: /usr/bin (assuming debian systems)
  • TGBOTCPP_CROSS_COMPILE_CC: C Compiler that is present on remote system, can be omitted - then the following backend is disabled.
  • TGBOTCPP_CROSS_COMPILE_CXX: C++ Compiler that is present on remote system, can be omitted - then the following backend is disabled.
  • TGBOTCPP_CROSS_COMPILE_PYTHON: Python interpreter that is present on remote system, can be omitted - then the following backend is disabled.

Config file options

Section Main

  • Token: Telegram bot token
  • LogFile: Log file path
  • DatabaseCfg: Database configuration. Format: "type:filename", where type is one of "sqlite" or "protobuf", and filename is the database file path.
  • GitHubToken: Github token (Used for private repo access).
  • OptionalComponents: Enable optional components. Comma-separated list of components to enable. Supported components: "webserver", "datacollector".
  • BuildBuddyApiKey: BuildBuddy API key for Android RBE.
  • LLMConfig: LLM configuration. (local/localnet),(filepath/urlendpoint)(,authkey)

Section Network

  • PrimaryUrl: Primary socket url that is binded to. e.g. 192.168.0.X:239 or unix://path/to/file
  • SecondaryUrl: Secondary socket url.
  • LoggingUrl: Logging service socket url.

Section FilePath

  • ROMBuild: Path to use for ROMBuild module
  • KernelBuild: Path to use for KernelBuild module

About

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

Resources

License

Stars

Watchers

Forks

Contributors