Skip to content

SayaTeam/TelegraphBot

Repository files navigation

TelegraphBot

Telegraph-Uploader is a Telegram bot that helps you upload photos and create instant-view posts.
Since Telegra.ph is banned in India, this bot uses Graph.org for posts and ImgBB/Envs.sh for image hosting.

✨ Features

  • 🔗 Instant View Links → Generate instant-view links for Telegram text messages.
  • 🏞 Photo Uploads → Upload photos to ImgBB (permanent) or Envs.sh (temporary, 30 days).
  • 📝 Custom Titles → Add custom titles when creating Graph.org posts.
  • Fast & Lightweight → Powered by Pyrogram.

🚀 Easy Deployment

  1. Get your API HASH & API ID from my.telegram.org.
  2. Get your Bot Token from @BotFather.
  3. (Optional but recommended) Get an ImgBB API Key from ImgBB.

🖥️ Run Locally

  1. Clone the repository:

    git clone https://github.com/Ns-AnoNymouS/Telegraph-Uploader.git
    cd Telegraph-Uploader
  2. Create a virtual environment:

    python3 -m venv .venv
    
    # Windows
    .venv\Scripts\activate
    
    # Linux / MacOS
    source .venv/bin/activate
  3. Install dependencies:

    pip3 install -r requirements.txt
  4. Configure your .env file:

    API_HASH = "your_api_hash"
    API_ID = "your_api_id"
    BOT_TOKEN = "your_bot_token"
    
    # ImgBB (permanent hosting). If not set, bot uses Envs.sh (⚠️ expires in 30 days).
    IMGBB_API_KEY = "your_imgbb_api_key"
  5. Start the bot:

    python3 main.py

📜 Commands

/start - Check bot status & usage instructions

🤔 Usage

  • Photo Upload → Send any photo.

    • ✅ If IMGBB_API_KEY is set → uploads to ImgBB (permanent).
    • ⚠️ If not → uploads to Envs.sh (expires after 30 days).
  • Text to Instant View → Send text in the format below:

    Title: My First Post
    This is the content of my Graph.org post.
  • Custom Titles → Add a title for every post.

🛠 Built With

🤝 Contributions

Contributions are always welcome! 🎉 Fork the repo, create a branch, and submit a PR.

⚠️ Notes

  • 🖼️ ImgBB → Permanent hosting.
  • 🗑️ Envs.sh → Temporary hosting (deleted after 30 days).
  • 🇮🇳 Since Telegra.ph is banned in India, this bot uses Graph.org instead.

About

A Telegram bot that creates instant view links and uploads photos to Telegraph, providing seamless media sharing and instant viewing capabilities.

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors