Updated specific locations to be searchable, take a look at Las Vegas as an example.
7
[Request] I need a bot that can ensure links haven't been posted for X days, using a database. (Details in description)
Post Flair (click to view more posts with a particular flair)
Author Summary
lightmystic is in request
Post Body

(I requested this a bit ago, but things have happened and I believe the one person who was willing to help is unable to. So after waiting almost two months, I've decided to ask once more.)

Alright, because the title is a bit shortened, and because my goal is a bit unusual, I'll try to give background on the problem followed by my systematic idea of how it should run.
Oh, and the bot should be able to run on a Linux server, but I'll assume from what I've saw, they shouldn't have a problem with that.


My Issue

I currently run a few subreddits where people can share invite links for chat groups. Because of the nature of this, it could easily attract people who would use multiple accounts or post every 10 minutes. I did my best to solve this with the Auto Moderator but my needs exceed its capabilities.

What I would like the bot to do, in a nutshell, is to ensure that these invite links are only posted, say, once a week. I'd also like to ensure that a user doesn't use multiple accounts to get around this.

My Objectives

I've thought long and hard about exactly what I need this bot to do, and I think I have a good idea of its objectives.

  1. I need the bot to be able to use a CSV or MySQL database to list its collected information. I have MySQL servers available to my use, and CSV would be nice, though I have more room on the MySQL servers. If both features were optionally added, that's a plus, but not needed more than one.

  2. The bot should, on submission, check the author (poster's username), the link posted, the date of the post, and the post location (link). If there is not an entry for that url (should be the database key, as it should be unique per row), create a new row in the database. It should store this information to be checked later. If a row exists, move to objective #3.

  3. On submission, if link exists in the database, check author username against it. If not matching, send mod post to the subreddit containing original post link, new post link, and the usernames for each (Stored post's link > stored username, newly checked post's link > newly checked username). Next, check post date. If less than X days old, then remove post and comment that the link was posted too recently. If more than X days old, then allow the post and save the new post date to the row.

  4. As an optional measure, not required but would be appreciated, is to have the bot also save a database of submission authors and the date of their most recent post. If a new post from that author is less than X days passed their previous post, remove the post and comment that it is too new. If the post is X days or more passed their previous post, update the entry with their new post date. This is shorter, works similar to the previous feature, and both features would be able to be turned on or off per subreddit (or running simultaneous bots could be configured to simply use the feature(s) or not).

  5. I would like the bot to be able to run or "loop" continuously, so it can simply be set to run when the server starts up and continue running, rather than using a cronjob to run it every so often. If the bot is told to only check once a minute or so, that's fine too. Additionally, if there's a way to reboot the bot if it crashes, that's a plus.


I understand this is a lot to ask for and I don't expect to get everything to a T or even close, but I figured the best amount of details would help give a more clear idea of my goal and how I envisioned it. From there, I know just enough about programming to hopefully do any tweaks from there even if I don't know the particular language.

I appreciate any help with this, I'm available 24/7 for any questions or comments on the request, and I thank you for your time just reading through the post.

Have a great day and thanks for doing your part to make reddit an easier, safer place. More so, thank you for helping make my subreddits safe as well.. I cannot describe the amount of stress this will relieve me of.

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,809
Link Karma
3,096
Comment Karma
1,535
Profile updated: 5 months ago
Posts updated: 6 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago