BuildAPCSales Bot
Status: Up and running. Monitoring it closely though :D
Thanks for your patience!
Hi r/buildapcsales,
I have been working on a Reddit bot as a side project for about a week now, since I thought it would be pretty fun (and it has been!). I came up with the idea of creating one for this subreddit because in a handful of months I will hopefully be building a PC of my own! I talked to one of the moderators of this subreddit, u/Icouldbeanyone, and they gave me the green light to make this happen.
How It Works
NOTE: For each of these fields (subject and body) capitalization does not matter, it will yield the exact same results.
To subscribe
Send a private message to u/sales__bot (notice two underscores) with the subject line as the item you want to receive notifications for, and the body of the message as "Subscribe". What the bot does is scans the first 100 most recent r/buildapcsales submissions for either a title or body of a submission that matches the item you subscribed to. Currently, it must be an exact match to the term you gave me. I will work on using some sort of search in the future, but for now this will suffice. Because of this, try to keep your terms generic, e.g. use "850 evo" instead of "Samsung 850 EVO-Series 250GB 2.5" Solid State Drive". For now, feel free to have multiple subscriptions for the same item, just so I can cover the bases. By this, I mean it is okay to subscribe to "caviar black 3tb" and "caviar black series 3tb" (notice the word "series" in the middle). Do not subscribe to two separate things like "i7-6700k" and "6700k", since everything found for the second term covers that of the first. If all the subscriptions become unmanageable, I will change this rule. Also, if/when the search feature is implemented, in theory the multiple subscriptions for the same item won't be necessary.
Unsubscribe
either reply to the original message confirming your subscription to that item with the body as "Unsubscribe", or create a new message with the item to unsubscribe from as the subject and "Unsubscribe" as the body.
Unsubscribe from all
To Unsubscribe from ALL subscriptions you have, have the subject or body be "Unsubscribe all" or some string that contains those two words (e.g. "All-unsubscribe" should work too). The other field can be whatever you want, or empty.
Get information
To get some detailed information, or view all your active subscriptions, send the bot a message with the subject as "Information" or "Help" and the body whatever you want, or empty.
Send feedback
To send me feedback, send the bot a message with the subject as "Feedback" and the body whatever you want, or empty.
Default message
If you send a message that doesn't follow the above guidelines, you will get an error message from the bot basically saying the request wasn't recognized.
My plans for this project
I will continue to update this post with any new information I would like to share with the community. I am currently a senior in college (CS degree), so my time is very limited. If there are any major (or minor) bugs, I apologize. I will try to fix them as soon as possible, but I can't guarantee any timelines.
Future Features
- I would like to add a search feature so the string the user is subscribed to doesn't have to be an exact match
- Add the Gmail API so the bot will email me if it crashes!
#Known Issues
-
If you subscribe to something like "i7-6700k" and "6700k" the bot will treat them as different items, and you can receive matches for both for the same link. That is because everything found for the second term covers that of the first (a little more explanation is above). I will have to edit the SQL query to exclude the item as a parameter, and make it match against username and link only.
-
Hopefully this one is fixed. Only time will tell!
Sometimes duplicate messages are sent for each match... I've gone through the code, database, and database queries that I use and nothing stands out as something that would cause an issue. It makes me think it is an issue in the PRAW API that the bot uses, but I dunno... It is VERY intermittent, so it is hard to track. I'll continue looking into it, and I apologize for the inconvenience.
#Credits
-
u/he_must_workout - A huge thanks for donating a Raspberry Pi (in the form of PayPal) for the bot! The Reddit community is truly amazing!
-
rweichler - Thanks for fixing a derp in the code that probably confused a lot of people!
#Developer Info
Developer Name: Tyler Brockett
Bot Code: Github Repository
Username: u/tylerbrockett
Email: tylerbrockett@gmail.com
Posted Nov 24, 2015, 1:56 PM UTC · edited