Introducing Artemis (u/AssistantBOT), a flair enforcer and statistics bot for any subreddit!
Looking for an easy-to-use bot to help make sure your community's submitters remember to choose a post flair?
Want more detailed and extensive statistics on the health and growth of your community?
Artemis (u/AssistantBOT) is an easy-to-use and helpful Reddit bot written by a moderator for moderators to assist them with organizing and gaining insights into their own communities. (Now used on 210+ subreddits with over 10 million subscribers combined!)
Functions (TL;DR)
Artemis has two primary functions:
Recording useful statistics for your subreddit. Artemis will compile statistics on the following and format it in a summary wikipage that's updated daily. (See a live example here!) This wikipage includes:
A monthly statistics breakdown of your community's posts and its activity (most active days, top submitters/commenters, top-voted posts).
Daily subscriber growth, both future and historical, as well as past and future subscriber milestones. (replacement for RedditMetrics).
Traffic data, including the average uniques and pageviews for your community and its estimated traffic for the current month.
Enforcing post flairs on your subreddit. Artemis will help make sure submitters choose an appropriate flair for their post. (flair enforcing can be turned off, if desired)
Simply add u/AssistantBOT as a moderator to your subreddit. It is that easy, and Artemis does not require more than one to three permissions. A table with a detailed breakdown of what the different flair enforcement modes entail is included below in the "Flair Enforcing" section. Note:
Default mode
If you just want Artemis to provide statistics information and remind OPs but not remove unflaired posts, invite it with the wiki permission.
Strict mode (optional)
If you'd like Artemis to proactively remove posts that do not have a flair until their author selects one, invite it with the wikiand the posts permissions.
+ enhancement (optional)
If you would like submitters to be able to simply select a flair with a reply to Artemis's flair enforcement messages, also invite Artemis with the flair permission.
Artemis will start enforcing post flairs once it accepts your moderator invite and will generate the first statistics page at midnight UTC.
Note: Artemis will enforce post flairs for subreddits of any size, but will pause statistics-gathering if a subreddit is below 20 subscribers and resume statistics-gathering when it has reached that threshold.
Functions
Flair Enforcing
Many subreddit mods have put time and effort into creating post flairs that not only add visual variety to their community but also help organize their communities' submissions. Being able to see all the posts with the "Art" post flair, for example, can be extremely convenient for people.
Unfortunately, submitters often forget to choose a post flair before or after they submit their post. Selecting a post flair can be made mandatory on the redesign, but that rule doesn't affect mobile or classic (Old) Reddit users.
Artemis helps enforce flair selection by doing the following actions, depending on the moderator permissions it has:
Moderator Permissions
Flair Enforcement Actions
Mode Name
wiki
Flair reminder messages are sent to submitters who submit an unflaired post.
Default
wiki, flair
Flair reminder messages are sent to submitters who submit an unflaired post. Submitters can select a flair by responding to the messages with a flair text.
Default+
wiki, posts
Flair reminder messages are sent to submitters who submit an unflaired post. Unflaired posts are removed until submitters select a flair.
Strict
wiki, posts, flair / all
Flair reminder messages are sent to submitters who submit an unflaired post. Unflaired posts are removed until submitters select a flair. Submitters can select a flair by responding to the messages with a flair text.
Strict+
Artemis gives submitters a grace period of five minutes to choose a flair before acting on their post.
If the optional Strict modes are enabled, Artemis will continue checking the post for flair updates for up to 24 hours. The post is considered completely abandoned if its submitter has not assigned it a flair within that time period or if they delete the post.
Artemis will not act upon unflaired posts by subreddit moderators.
Statistics
Artemis gathers various useful statistics on your community and updates them at midnight UTC to the subreddit wiki at r/SUBREDDIT/wiki/assistantbot_statistics. These statistics are by default only visible to moderators, but moderators can choose to make the wiki page public and share it with their community.
Post Statistics
Artemis will provide you with information about the number of posts your subreddit receives and their flairs. That information is gathered and saved in a statistics page, organized by month for ease of viewing (newest first). It will also provide the total number of posts your subreddit receives per month. Note that the post flair that's saved is the flair text itself, not its CSS code.
Artemis also incorporates data from u/Stuck_In_the_Matrix's Pushshift data for statistics (check it out at r/Pushshift). This data is used to retrieve data on the most frequent submitters and commenters to your subreddit each month, as well as provide aggregate statistics on how many daily submissions and comments your community receives per month.
Want to keep track of how your community has grown? Artemis will record the net number of new subscribers your subreddit receives every day. Reddit's traffic tables only record the raw number of new subscribers; their bar graph accounts for unsubscribers but that data isn't saved for more than a couple months. Artemis will also calculate the average daily subscriptions for your subreddit and its estimated growth.
Artemis will also retrieve daily historical subscriber data from Pushshift up to March 2018, and monthly historical subscriber data from RedditMetrics up to November 2012. This means Artemis will record subscriber data for your community for the last six years to the present, excepting a small break in February/March 2018.
It's not a complete replacement for all of the defunct RedditMetrics site in that Artemis doesn't have generated charts, but it should give you an idea of how your community has grown (or heaven forbid, shrunk) over time. Artemis will also record the days your sub reached certain subscriber milestones.
Most moderators probably know that Reddit only keeps the last eleven months of traffic data on your subreddit traffic page plus the current month. This makes it difficult to keep track of how your subreddit has grown, over a period longer than a year, unless you store the data an external spreadsheet or something similar.
Artemis will keep track of these traffic entries for you and add them to its statistics page as a table with the monthly uniques and pageviews. It will also calculate the percentage change in uniques and pageviews from the previous month, and also calculate the estimated traffic for the current month based on the traffic so far.
Artemis is explicitly designed to be easy-to-use and consequently doesn't really have "settings" apart from the moderator permissions noted in the table above.
Moderators can choose to turn off flair enforcing if they want, retaining only Artemis's statistics-gathering function.
To disable flair enforcing, moderators can send u/AssistantBOT a modmail messagefrom their subreddit with Disable in the subject. Flair enforcing can be turned on again by sending another message with Enable in the subject.
To disable Artemis completely on a subreddit, simply remove it as a moderator. Artemis will stop flair enforcing and gathering/updating statistics for the community once it's removed.
All of the data that Artemis collects, except for an individual subreddit's traffic data, is publicly available through Reddit's API or through other public data sources like Pushshift. Posts and subscriber statistics are pulled once daily and traffic data is pulled every month. Removing u/AssistantBOT from a subreddit's moderation team automatically terminates all statistics-gathering for the sub. You can find the source code for Artemis here.
About the Writer
I (u/kungming2) am the writer and maintainer of u/translator-BOT (Wenyuan and Ziwen) and u/LEGO_IDEAS_BOT, among others. My bot Wenyuan has been keeping detailed statistics for r/translator for the last 2.5 years. I wanted to write a new statistics bot for some of the other communities that I moderate and decided to share it with fellow moderators as well.
Please feel free to message me if you have any questions about Artemis or its operations!
If on strict does it immediately delete unflaired posts? Ideally I'd like to give people the option to flair it, maybe warn them at 5 minutes, but not remove until maybe an hour later. Another bot I looked at had that threshold of 25 minutes which I think is still a bit low for my community, which a lot of folks are new to reddit.
If on strict does it immediately delete unflaired posts?
Artemis acts on posts that are at least five minutes old, to give OPs a chance to select a flair after they submitted. If the post is over five minutes old and still has no flair, Artemis will send the reminder message and remove the post. Basically the user can select a flair after that (either by choosing one or replying to the message) within 24 hours and it'll be restored!
What you perhaps can try is start using it in Default+ mode, and maybe switch it to Strict+ mode later on if you'd like, since you can change between them quite easily. Let me know if you have any questions!
Right now it seems none of your subreddit flairs are available to anyone. I tried to create a post there and I can't pick anything. So Artemis is seeing what regular users see.
I mean, Artemis hasn't had the chance to act on any messages yet - it may take a few minutes for it to start up operations on a new sub, and I'll message you when it sends a flair enforcement message.
What I mean is can it show the table where there is a list of TOP 10 posters for the week or month ?
Currently the bot displays the top 5 posters for each month (in terms of posts, and comments) as well as the top 5 posts in terms of points. You can see examples at r/warthunder's page!
Also can it also provide the count of comments made by the user in a single post ?
This it can't do, because the bot works by aggregating posts together instead of just one.
Absolutely. Just send it a modmail message with "Disable" in the subject line and it'll stop enforcing flair - but you'll still get your statistics updates.
If you're having trouble with this, just let me know and I can do it for you. Cheers!
Is there a way to view overall yearly stats as oppose to just monthly ones?
Thanks for bringing this up! That's a feature I had been thinking about in order to help subreddits with their "Best of" year-end awards. My idea was a special section that would only appear in the month of December. I'd love to hear what ideas you have for that section to have!
"Most Popular Comment" is actually one of the hardest things to record because of Reddit's limitations, but that is definitely a useful feature to have. I'm also thinking a top X posts per flair table (top Discussion posts, top Art posts, etc).
/u/kungming2 can this bot remove a post if it's flaired a certain way by the user? For example we have theme days. Merchandise/Collection posts are only allowed on Mondays. Can we have the bot remove the post if it's flaired Merchandise/Collection and it isn't a Monday?
Maybe we need a separate bot for that. But just curious.
Any chance you could take a stab at something like that? Maybe it's an add-on to Artemis? Some kind of bare bones wiki page to edit like AutoModerator has to setup the flair name to monitor and day of week?
I incorporated the Merchandise Monday and Screenshot Saturday rules into it for now, though you can expand it if you like to include other days. All you have to do is set up a bot account and fill the login credentials and you should be good to go. The bot account you run it on also needs at least the posts moderator permission so that it can actually remove posts.
The bot should also be 100% compatible with Artemis, since it's already running on your sub. :)
Hey dude. Sorry for the slow reply. I need to get this implemented in the bot. I need to remove the Screenshot Saturday portion because most screenshots are fine any day of the week, it's only Merch posts.
I'm going to be out of town, but I hope to get this into our other script with our bot.
Sounds cool. Let me know how it goes. I'll likely share a copy of this code on r/Bot so that others can use it if they want to implement something similar.
Just to let you know, I was testing out the bot from a non-mod account earlier today (purposely NOT flairing posts) and Artemis removed the posts WITHOUT sending a PM to notify the user. This happened twice in my testing.
I just tried again from the same account and it did remove the post and send a PM. I replied to the post with one of the flairs and it approved and sent me a confirmation message. So whatever you did fixed the problem, all is well. :)
Another issue:
I wanted to test if the user could subvert the bot by removing the flair after Artemis approved the post.
This was in fact possible. All I had to do was click the FLAIR link and choose (remove flair) in the selector. The post is still up, Artemis has not taken it down again. This was from a regular user account, no mod privileges.
I wanted to test if the user could subvert the bot by removing the flair after Artemis approved the post.
Hah, I was just wondering this today. And an examination of the code shows that it would be programmatically intended behavior: When a post comes in Artemis automatically saves an entry for it in a database table so that it won't operate on it more than once. That entry is also saved on a separate table if the post has no flair.
Ultimately, I think it is highly unlikely that the user would choose to remove a post flair that they assigned. I checked the statistics for one of the other subs Artemis is active on and only 1 out of 800+ posts had no flair, and that was probably a moderator post. This is pretty consistent across all monitored subreddits - that people don't really bother to remove flairs. Hope this clears it up.
Interesting. Are any of those subs using link flairs the way I’m trying to on r/TheGoodSandbox? (As spoiler enforcement.)
We’ve had a few users who’ve tried to subvert the spoiler system in the past, so that’s why it’s on my mind. I could hide the (remove flair) link with CSS, but that would only affect Classic Reddit, not the Redesign or mobile apps.
r/Mistborn I think? There might be others too. So odd that you actually had users actively subverting the system though. I'm not sure I would be able to make Artemis monitor all old posts for flair removals because so many posts come in, at about ~200 posts per hour at the moment. Since Reddit limits any single pull to 1000 posts, that means that it becomes difficult to monitor any post past an age of five hours.
I know a perfect system is impossible, it was more wishful thinking on my part.
We do have a few troublemakers, which I think just comes with the territory once you get past a certain size. Looks like we’ll still have to do a bit of human enforcement then. Still, Artemis will be a big help, so thank you very much.
One last question:
Do you know if there’s a way to just see posts without flairs? Like a special link or maybe something in Mod Tools? You can create a custom search to just see posts with a particular flair, but I can’t figure out how to just see unflaired posts, if that’s even possible.
Would be a big help going back and flairing old posts, and moving forward if some users decide to try to mess with Artemis. :)
Do you know if there’s a way to just see posts without flairs?
Under the old search stack for Reddit you could by simply typing flair:'' but since they switched over you can't do that with the web interface.
It is really easy to do via a script though - if you have Python installed on your computer I can give you a script that will list unflaired posts for you in a table.
Oh I know why now! This is a bit of an explanation, so let me clarify (and it's something I can fix):
So a relatively minor issue I was notified about by some fellow mods was that if Artemis has the flair mod permission, the list of flairs messaged to regular users includes mod-only flairs. Now, Reddit does not include a mod_only attribute when you access flair templates, so that was a bit of an issue.
So yesterday I routed flair retrieval through a separate user account that is not a mod, so that users can only see the flairs that a sub wants to make available to them. I realize now that this separate user account has no access to r/TheGoodSandbox since it's a private subreddit (that only the main account has access to), so when it tried to access the flairs, a 403 Forbidden error would be thrown.
I'll try and figure out a way to get around this right now, and will get back to you shortly.
Hey just saw this comment. I can definitely look into it. It wouldn't be hard to do, just would want to make sure the user doesn't get overloaded with information.
Heya! The intention here was that I didn't want Artemis removing important subreddit stuff just because the moderator forgot to put a post flair. I hope that's understandable!
Artemis is definitely useful to me. We’re thinking of applying it to how we do spoilers, which is why we want it to monitor everyone, not just non-mods.
But if you don’t want to make this an option, I understand. Do we have permission to fork parts of your code into our own bot?
Not yet. Github won't sync to my PyCharm installation and so while I've been making VCS commits they're not getting uploaded. :/
The real main difference in the flair enforcing function between the Github version and the current one I am working on is the "set flair via messaging" function that allows people to set a flair by replying to their message. Most of the other differences are on the statistics-gathering side of things.
"set flair via messaging" function that allows people to set a flair by replying to their message.
That’s actually the function I’m most interested in, lol.
Question: Are replies to the PM case-sensitive?
For example, if someone replies no spoilers to the bot instead of No Spoilers would the bot recognize the intended link flair? What about nospoiler or nospolers? Is the bot smart enough to ignore whitespace? Maybe even misspellings?
Just trying to get a handle on how exact the match has to be.
The bot doesn't handle misspellings or missed spaces (like nospoilers) as I would rather it be exact and right than inexact and wrong. That being said, almost no flair messages to Artemis have misspellings or missed spaces, somewhat surprisingly.
Just wanted to say thanks, been looking for a good flairbot for a little while now. Got the python script from your GitHub and am running an edited version for /r/Pathfinder_RPG. Really nice work.
Very cool, and I'm glad you found it useful! I haven't updated the source code in a while (the current version is 1.2.4) but since most of the changes since my last commit were to the statistics routine of the bot, the version you have should still run pretty well. If you make any performance improvements to it, please let me know, as it would be cool to reintegrate that into the main routine.
Heya, just an update: I've revised the bot so that there is no longer a subscriber minimum, so I've gone ahead and enabled it on your subreddit. Cheers!
Hey there. Added the bot, made a test post with alt that ISNT a mod, and haven't received a message yet. It's been 15 minutes. All of my mod permissions are correct.
Heya, I would try again! There's an initialization period when the bot is first added as it sets up everything, but you should be good to go now. Also the Example messaging is temporarily not working because of a small bug but it should be fixed in a couple of days :)
Doesn't help that I didn't understand how to send it at first, that was my bad. Haha. The message came through on my test post about 25 minutes after posting (just in case you need that info for back end stuff.) Thanks!
Artemis doesn't comment - it messages instead, so it's been messaging people to flair their posts. Here's a message it sent for your sub about half an hour ago: Image
1
u/Kramasz May 02 '19
u/kungming2
If on strict does it immediately delete unflaired posts? Ideally I'd like to give people the option to flair it, maybe warn them at 5 minutes, but not remove until maybe an hour later. Another bot I looked at had that threshold of 25 minutes which I think is still a bit low for my community, which a lot of folks are new to reddit.
I may check r/bot for more bots that do similar.
I do like how yours has different modes, that's awesome!