Skip to content

🔧 Telegram Bot for fixing Twitter/X, Instagram and TikTok embeds

License

Notifications You must be signed in to change notification settings

Madh93/instaray

Repository files navigation

Instaray

Latest release Go Version Go Reference License

Instaray is a simple Telegram Bot written in Go that fixes Twitter, Instagram and TikTok embeds in Telegram using FxTwitter, InstaFix and vxtiktok.

FeaturesRequirementsInstallationConfigurationContributingLicense

Features

  • 🤖 Fixes twitter.com, x.com, instagram.com and tiktok.com embeds.
  • 🔒 Support chat ID and thread ID allowlists.
  • 🐳 Production-ready Docker image for easy deployment.

Requirements

Installation

Docker

Using docker run

Use the docker run command to start Instaray. Make sure to set the required environment variables:

docker run --name instaray \
  -e INSTARAY_TELEGRAM_TOKEN=your-telegram-bot-token \
  ghcr.io/madh93/instaray:latest

Using docker compose

Create a docker-compose.yml file with the following content:

services:
  instaray:
    image: ghcr.io/madh93/instaray:latest
    restart: unless-stopped
    # volumes:
    #   - ./custom.config.toml:/var/run/ko/config.default.toml # Optional: specify a custom configuration file instead of the default one
    environment:
      - INSTARAY_TELEGRAM_TOKEN=your-telegram-bot-token

Use the docker compose up command to start Instaray:

docker compose up

From releases

Download the latest binary from the releases page:

curl -L https://github.com/Madh93/instaray/releases/latest/download/instaray$(uname -s)_$(uname -m).tar.gz | tar -xz -O instaray > /usr/local/bin/instaray
chmod +x /usr/local/bin/instaray

From source

If you have Go installed:

go install github.com/Madh93/instaray@latest

Configuration

Instaray comes with a default configuration file that you can modify to suit your needs.

Loading a custom configuration file

You can load a different configuration file by using the -config path/to/config/file flag when starting the application:

instaray -config custom.config.tml

Overriding with environment variables

Additionally, you can override the configuration values using environment variables that begin with the prefix INSTARAY_. This allows you to customize your setup without needing to modify any configuration file:

INSTARAY_LOGGING_LEVEL=debug INSTARAY_TELEGRAM_ALLOWLIST=chat_id_1,chat_id_2 instaray

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any bug fixes or enhancements.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a Pull Request.

License

This project is licensed under the MIT license.