- Download Rust.
- Create a new bot using @Botfather to get a token in the format
123456789:blablabla
. - Get an twitter access token.
- Optional Step: Install PostgreSQL database
- initialize the
TWITTER_BEARER_TOKEN
,TWITTER_BEARER_TOKEN2
(to handle too many requests per second),TELOXIDE_TOKEN
andDATABASE_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>
# 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>
You can rename `.env-template` file to `.env` and put your environmental variables there.
- Run
cargo run
and enjoy the life :)
Just copy the link of the tweet and send it to the bot, It will convert tweet to telegram message:
This bot also supports Inline mode: