HugeFrog24 e7b13976b4 Go update
2026-02-28 18:51:48 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-28 18:51:48 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-28 18:51:48 +01:00
2026-02-28 18:51:48 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00
2026-02-11 18:39:02 +01:00

Go Telegram Multibot

A scalable, multi-bot solution for Telegram using Go, GORM, and the Anthropic API.

Design Considerations

  • AI-powered
  • Supports multiple bot profiles
  • Uses SQLite for persistence
  • Implements rate limiting and user management
  • Modular architecture
  • Comprehensive unit tests

Usage

  1. Clone the repository:

    git clone https://github.com/HugeFrog24/go-telegram-bot.git
    cd go-telegram-bot
    
  2. Copy the default config template and edit it:

    cp config/default.json config/mybot.json
    nano config/mybot.json
    

Important

Keep your config files secret and do not commit them to version control.

  1. Create data directory and run:
    mkdir -p data
    docker-compose up -d
    

Native Deployment

  1. Install using go get:

    go get -u github.com/HugeFrog24/go-telegram-bot
    cd go-telegram-bot
    
  2. Configure as above, then build:

    go build -o telegram-bot
    

Systemd Unit Setup

To enable the bot to start automatically on system boot and run in the background, set up a systemd unit.

  1. Copy the systemd unit template and edit it:

    sudo cp examples/systemd/telegram-bot.service /etc/systemd/system/telegram-bot.service
    

    Edit the service file:

    sudo nano /etc/systemd/system/telegram-bot.service
    

    Adjust the following parameters:

    • WorkingDirectory
    • ExecStart
    • User
  2. Enable and start the service:

    sudo systemctl daemon-reload
    
    sudo systemctl enable telegram-bot
    
    sudo systemctl start telegram-bot
    
  3. Check the status:

    sudo systemctl status telegram-bot
    

For more details on the systemd setup, refer to the demo service file.

Logs

Docker

docker-compose logs -f telegram-bot

Systemd

journalctl -u telegram-bot -f

Testing

The GitHub actions workflow already runs tests on every commit:

CI

However, you can run the tests locally using:

go test -race -v ./...

Storage

At the moment, a SQLite database (./data/bot.db) is used for persistent storage.

Remember to back it up regularly.

Future versions will support more robust storage backends.

Description
No description provided
Readme 144 KiB
Languages
Go 98.7%
Dockerfile 1.3%