Configure The Bot
Configuring the reddit API and the bot.
Last updated
Configuring the reddit API and the bot.
Last updated
We need to do some configuration before we can use the bot.
First, you will need to get some values for the configuration. These values are:
REDDIT_CLIENT_ID
REDDIT_CLIENT_SECRET
REDDIT_USERNAME
REDDIT_PASSWORD
You can get these values from here.
The next step will be the most essential in this entire section. Avoid any errors here!
Head over to the apps page under the prefs page: https://www.reddit.com/prefs/apps. Once you are here, you should scroll down and click a button saying create another app... (it could be different if it's your first app). Once you click it, you should see:
Name: you can put in any name, for example: automated-bot
Radio Buttons: where it shows you the three radio buttons, pick the third one (script).
Description: put in anything, it does not matter.
About URL: link any webpage like https://google.com
.
Redirect URI: link any webpage like https://google.com
.
Great, you created the app! Now you need to give the values to the bot.
The text under "personal use script" is your REDDIT_CLIENT_ID,
the text right next to SECRET is your REDDIT_CLIENT_SECRET
(DO NOT SHARE THIS WITH ANYONE).
The text where it says developers is your REDDIT_USERNAME
, and REDDIT_PASSWORD
is your Reddit account's password. Your information is not logged.
Next, run:
It will initialize the setup process.
Fill in the REDDIT_CLIENT_ID
and REDDIT_CLIENT_SECRET
(AGAIN, DO NOT SHARE THIS WITH ANYONE), REDDIT_USERNAME
and REDDIT_PASSWORD
The setup will prompt you a couple more times, set up the bot how you like it, and then you are good to go!
After the initial setup, the bot will create a config.toml
file in the root directory. If you need to change anything, then modify it there.