AlphaCafe is a Twitter and Mastodon Bot written in Python that is meant to be both simple enough to easily be modified and versatile enough to handle the majority of bots handled by the now defunct Cheap Bots, Done Quick! out of the box
You simply set up your bot account, grab your API keys, add keys and desired behaviour to the config file, and drop your text, images, and video files into a folder. The bot will handle the rest!
Original bot inpsired by @YKKPanels which was created by @FIybyday using Cheap Bots, Done Quick!
- Create a new twitter account for your bot ( you need to be signed out to do this )
- Verify your phone number with twitter
- Mark your bot account as automated and link it to your main account ( Settings > Account Information > Automation )
- Go to the Twitter developer portal and sign up for free access
- Create your app, describing the purpose of the bot ( modify the existing one )
- Go to 'User Authentication set up' to set permisions to Read + Write
- Give it a some kind of schema ( I use
http://localhost/
) - Generate/Copy all auth tokens/keys/secrets/etc into the config.json
- Tweak config.json to your liking
- Drop all desired media files into a subdirectory alongside the script ( these can be nested )
- Install all required modules (
pip install -r requirements.txt
) - Run the script!
- Create a new Mastodon account for your bot ( I like using botsin.space )
- Once approved, go to profile settings and mark as a bot account
- In settings, go to the Development tab, and click create new application. Leave settings as default.
- Copy your API stuff into the config, end change enabled to true
- Install all required modules (
pip install -r requirements.txt
) - Run the script!
If you have both Twitter and Mastodon enabled, the posts will be mirrored across both platforms.
( Put it on something stable, this runs all the time. If you know how to use it, modify the service file to point to your script. This will ensure that the script gets started on bootup, and automatically restarts in case of a crash )
- @YKKBotV2 by me
- @ShitDominaeSays by me
- TWITTER_HANDLE : Only used in greeting for now
- CLIENT_ID, CLIENT_SECRET, etc : Twitter API Auth
- IMAGES_PATH : This is the folder in which all of your media is kept to be randomly picked from. All contents are scanned recursively, so you can have many subfolders
- DELAY_IN_MINUTES : This is how many minutes you would like in between posts
- INIT_WITH_POST : This will define if you would like the bot to post as soon as you start it, or wait for the timer
- TWEET_WITH_TEXT : This will tell the script if you'd like to tweet a random line from a text file
- TEXT_FILE : The text file in question.
AlphaCafe accepts a number of Args. These will override what exists in the currently used configfile, even if a new one is defined in args.
-d DELAY, --delay DELAY Set the delay between posts in minutes. Default is 30 minutes.
-i INIT, --init INIT Set whether the bot should post immediately on startup. Default is True.
-t TEXT, --text TEXT Set whether the bot should post with text. Default is False.
-r RETRY, --retry RETRY Set whether the bot should retry on error. Default is True.
-m MAX, --max MAX Set the maximum number of retries. Default is 5.
-c CONFIG, --config CONFIG Set the config file to use. Default is config.json.
Ctrl-C (SIGINT) to exit. Ctrl-\ (SIGQUIT) to instantly post a new update.
This project is licensed under the DO WHAT THE FUCK YOU WANT TO EXCEPT USE NFTS PUBLIC LICENSE