Reddit Greeter Bot
This is a simple example on how a "greeter bot" for Reddit could be coded. It was an assignment for my programming class. Its task is to greet all of the post authors in a specified subreddit with a set greeting (by posting it as a comment on their latest post).
- Only greets every author once
- Obeys the official Reddit API rules
- Stores the settings in a separate file
- Customize the settings in
- The bot will now greet existing posts, as well as watch for new ones
The greeting is formatted in the same way as an ordinary Reddit comment, which means it is formatted using markdown. Something worth noting is that Reddit requires double newlines (\n\n) instead of just one.
To include the author's name in the greeting, use this: