A reddit bot scanning comments for trigger phrases to reply with predefined quotes.
The class library is built on top of .NET Standard 2.0 and the console app on .NET 5.0.
Open the reddit app preferences and click on the create app button.
- name a name for your bot script
- app type choose script
- description you can leave this blank
- about url you can leave this blank
- redirect url type http://127.0.0.1 (not needed for this use case)
Click on the create app button. The created app will be editable now.
Now enter the name of your reddit bot account under developers and press return.
Note down your app client id (the smaller random text on the top left) and app client secret (the longer random text right to the secret label).
Do not share this information and keep it to yourself!
Open the latest release. If you are running Windows, you will most likely need the RedditQuoteBot.Console_x.x.x_standalone_win-x64.zip archive.
Download the archive and extract it somewhere on your PC.
Open the Config.ini file and fill in the following information:
- AppClientId the smaller random text from step 0
- AppClientSecret the larger random text from step 0
- BotUserName the reddit name of your bot account
- BotUserPassword the reddit password of your bot account
There are a few more settings within Config.ini. You may want to change these, take note of the comments.
Open the Subreddits.txt file. Enter each subreddit you wish your bot to observe as a new line.
Open the IgnoredUserNames.txt file. The bot will not reply to users listed here.
Open the TriggerPhrases.txt file. Write a new line for each phrase the bot should reply to.
Please note that the check is case insensitive (there is no difference between we did it
and WE did IT
).
Also note that the phrases are not checked as whole words. If your phrase is use it
, then the bot will trigger on comments like we should abuse it
.
Open the Quotes.txt file.
Each line is a potential quote of the bot to use. Use the {br}
macro for line breaks within the same quote.
There are a few more macros available like {author}
or {subreddit}
. Check the comments in Quotes.txt for more information.
Please note that the quotes are interpreted as reddit markdown. So you might need to escape characters like # when used in your quotes. You can make use of this markdown for formatting as well.
Start RedditQuoteBot.Console. The console app will crash when the credentials are invalid (or other settings are invalid).
Otherwise enjoy your very own reddit bot! Just try to follow the reddit Bottiquette and stop when asked to.