-
Notifications
You must be signed in to change notification settings - Fork 2
Core Changes
This page will give you the main changes required to run the bot.
The following instructions are intended for development on Windows.
You will need to install Python, Git, and Pipenv to modify your bot. You will also need access to your account's environmental variables and the command line.
Steps:
- Setup Git.
- Create a folder suitable for development, open the command line and clone the source code with
git clone https://github.com/cam-rod/XKCDAltTextBot.git. - Install the dependencies by running
pipenv install.
You should read the Git Pro book, it's an excellent guide for getting started with Git.
You will need to prepare a Twitter account for this bot by becoming a developer. Once your create your account, go to <dev.twitter.com> and apply for a developer account by following the instructions. You do not need to fill in the following: Callback URLs, Terms of Service URL, Privacy Policy URL. Take note of the handle of your Twitter account, and the name of the developer app; you will need these later.
Once your account is setup, navigate to the Apps page and open Details. Under the Permissions tab, click Edit and change Access permission to Read and write and save. Finally, switch to the Keys and Tokens tab, and Regenerate/Generate your Consumer API keys and Access token & access token secret.
It's not recommended to save your API keys and access tokens directly into your file for security reasons, so you will keep them in your environmental variables. Using this guide, you will save your keys and tokens here as the Variable value. Remember the Variable name in this specific order: API_KEY, API_SECRET_KEY, ACCESS_TOKEN, ACCESS_SECRET_TOKEN. (This is tedious, but you'll see why next.)