A bot which reposts top-level comments from one thread and posts them as individual comments to another thread.
The intended use of this bot is to allow posting an announcement of an AMA where users can submit questions ahead of time, and have their questions delivered to the participant automatically when the AMA begins.
- Install PRAW. See the PRAW website for instructions. QuestionPosterBot is written targetting PRAW 7.5 and Python 3.8.
- Created a Reddit authorised app here
- Give the bot a name of your choosing, set its type to "script", leave the about url blank or point to this repo. Add a description if you want, and set the redirect uri to http://localhost:8080.
- Make a note of the
client_id
, which is the number found under the words "personal use script", under the name of your bot, once you have created the app. Also note yoursecret
. - Create a
praw.ini
file in the same directory as this application, formatted as shown.username
andpassword
refer to the user account you wish to run the bot under.
[QuestionBot]
username=<username>
password=<password>
client_id=<client_id>
client_secret=<secret>
- Run the script and provide it with arguments as shown:
python question_poster_bot.py <source-thread-id> <destination-thread-id> <username>
where <username>
refers to the username of the user responsible for running the script, for use with the bot's user agent.