Browse Tag: alexa play despacito

Create a Reddit Novelty Bot that Replies to User Comments using Python

I’ve been learning to program using Python recently and started making simple bots that can be used on Reddit. I created a Chat Bot that will reply questions asked on /r/AskReddit recently and wanted to make something a little more lighter and meme worthy. I created a bot that searches for people that say ‘Sad.’ at the end of a sentence and replies with ‘this is sad, alexa play despacito’. its basically two memes in one. A lot of people now add ‘Sad.’ to the end of their comments and I reply with the ‘alexa play despacito’ meme. It’s a very simple bot that shows you how to search all users comments and you can change the parameters however you see fit. If you think of other idea’s for simple reply’s please let me know in the comments below.

I programmed the Reddit Bot in Python and use Reddit’s API Wrapper (PRAW) that lets me easily search for Reddit comments and post reply’s. I use my Raspberry Pi to run my bot since my Raspberry Pi is always on and connected to the internet. Using the Raspberry Pi allows my bot to be running 24/7 which is nice to watch it respond to people all the time. you can view my bot in action by searching for the Reddit username /u/very_slowly

Objective

To create a Reddit Bot that automatically replies to comments that end in ‘Sad.’

Material

You will need the following:

Instructions

I will go over the functions and steps I used to create my Reddit bot below and try to explain what I am going to get the Bot the work. At the bottom I will combine everything together. You should be able to simply copy and paste the final code into Python, add your bot’s API credentials and it will start replying to comment

Continue Reading