Post the latest tweets from a Twitter account to a Discord channel using a webhook without any limits.
Requires Python 3.10 and above.
NOTICE: The latest information fetched from Twitter might not always be up to date. This could be due to Twitter's rate-limiter.
- Download this repository by clicking
Code > Download ZIP
or this link Then extract the ZIP file somewhere, and goto the extractedbirdhook-master
folder and openTerminal
orCommand Prompt
inside of it. - Install the dependencies of the project by running
pip install -r requirements.txt
in the same directory/folder. - Make a copy of
config.ini.bak
and rename the new copy intoconfig.ini
. - Change the contents of
config.ini
as needed, there's descriptions for each of the value in the config file. You don't need to change the lines that starts with;
.- WARNING: It's recommended to use a separate Twitter account (a throwaway one) for fetching tweets from another account, as the account used for fetching tweets is always at risk of being put into a read-only state by Twitter.
- Where to get the
webhook_url
fromconfig.ini
:- For Desktop: Right-click a text channel's name, choose
Edit Channel
, go toIntegrations
, clickCreate Webhook
(orView Webhooks
if you already have one), select a Webhook, find theCopy Webhook URL
button below it. - For mobile (Aliucord): Download the EditWebhooks plugin, move the downloaded ZIP file to
Primary external storage > Aliucord > plugins (or /storage/emulated/0/Aliucord/plugins)
. Hold-click a text channel name, go toEdit channel > Edit webhooks > Create webhook
, click the created webhook, and then clickCopy Link
from the bottom menu. - For mobile (Vendetta): Get the Create webhooks plugin by joining the official Vendetta server, heading to the plugins forum channel, searching for
Create webhooks
, and installing it through the link in the first message of the thread at the very top. The steps are similar to Aliucord, but you need to go toWebhooks
instead ofEdit webhooks
.
- For Desktop: Right-click a text channel's name, choose
- Run the script using
python3 index.py
or clicking theindex.py
file, and everything should be good to go.- INFO: After the first run of the script, a file named
session.tw_session
will be saved in the same directory as theindex.py
script. Keep this file safe as it contains the cookies for logging into the Twitter account used for fetching tweets. As long as this file exists in the same directory/folder, it will be used for login instead of thetwitter login username
fromconfig.ini
.
- INFO: After the first run of the script, a file named