0xNima / Twideo

Simple Telegram Bot for downloading videos from Twitter via their links

Home Page:https://t.me/twideo_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twideo: Simple Telegram Bot for downloading videos from Twitter

Setting up your environment

  1. Download Rust.
  2. Create a new bot using @Botfather to get a token in the format 123456789:blablabla.
  3. Get an twitter access token.
  4. Optional Step: Install PostgreSQL database
  5. Install redis(for caching threads)
  6. initialize the TWITTER_BEARER_TOKEN, TWITTER_BEARER_TOKEN2(to handle too many requests per second), TELOXIDE_TOKEN and DATABASE_URL(optional) environmental variables:
# Unix-like
$ export TELOXIDE_TOKEN=<Your token here>
$ export TWITTER_BEARER_TOKEN=<Your bearer token here>
$ export TWITTER_BEARER_TOKEN2=<Your 2nd bearer token or just leave it blank>
$ export DATABASE_URL=<Your database url or ignore it>
$ export REDIS_URL=<Your redis url>

# Windows
$ set TELOXIDE_TOKEN=<Your token here>
$ set TWITTER_BEARER_TOKEN=<Your bearer token here>
$ set TWITTER_BEARER_TOKEN2=<Your 2nd bearer token or just leave it blank>
$ set DATABASE_URL=<Your database url or ignore it>
$ set REDIS_URL=<Your redis url>

You can rename `.env-template` file to `.env` and put your environmental variables there.
  1. Run cargo run and enjoy the life :)

Getting Started

Just copy the link of the tweet and send it to the bot, It will convert tweet to telegram message:

example

This bot also supports Inline mode:

inline-example

About

Simple Telegram Bot for downloading videos from Twitter via their links

https://t.me/twideo_bot


Languages

Language:Rust 93.5%Language:Python 6.4%Language:Procfile 0.1%