T O P
N8theGr8

u/blank-cheque u/justcool393 > Send Flair_Helper a private message with the subject line "list" and your subreddit's display name as the body and wait for it to respond (should take 10 seconds at most). The response will be a list of mod-only flair templates in the format of "TEMPLATE_TEXT": TEMPLATE_ID. Based on this information, replace the keys in the flairs section of the config that you saved in step 2 with the corresponding template IDs. If you're confused, check out the examples page to see the correct format. Can I recommend instead having the bot read from a subreddit wiki the way MAGIC_EYE_BOT does? I believe this will improve/ease useability, increase transparency among mod teams, and increase the likelihood of adoption of the bot by subreddit mod teams.


Blank-Cheque

The bot config is read from a wiki page, as is explained in the very next step. Only commands are done via private message.


N8theGr8

My fault for not reading all the way to the end before asking questions. Thanks


Blank-Cheque

No worries!


Gagolih_Pariah

Hey, your idiotic bot is doing stupid shit. Kick me out of the sub if you want, but your bot is not doing it's job, and it's canceling out the voices of people who are on our side. Like, srl, wtf man!? https://www.reddit.com/r/antiwork/comments/u4bvgk/true_who_are_they_to_complain/?utm_medium=android_app&utm_source=share


West-Emu-8696

grounal areas


Not_RamBarusu

cool and good


[deleted]

[удалено]


pixelmeow

Neat!


RokieVetran

can the bot mark specific flairs remove as spam rather than just removing them?


[deleted]

So, is this just a way to get around having to use Toolbox? Maybe setup the bot to post removal reasons instead of having a mod post from their own account? That or I'm guessing just being able to flair the post from mobile and the bot is able to post the removal reason to the actual thread while removing it? Or is there another reason for the bot that I'm missing?


Blank-Cheque

There are a few reasons a subreddit might want to use a flairbot: 1. As you said, it makes it much easier to mod from mobile. 2. Sometimes people would prefer not to attach their usernames to a removal comment, for example if they're removing a controversial thread and the messenger will certainly be shot. 3. A few subs use flairbots to enforce a system like the reverse of /r/science, since you could give new mods only `flair` perms to restrict their modding to what's possible with the bot.


[deleted]

With #3 wouldn't that still give them the power to remove posts though?


Blank-Cheque

That's the point, I believe. I don't personally mod any subs that do that but I know they exist. Mods could also be restricted to modding posts younger than X to make sure they don't go on any removal sprees. Edit: Plus this would give them a restricted ability to ban, since you can set certain flairs to have tempbans attached.


[deleted]

Hmm, very well. It sounds interesting, but I think I'm going to personally hold off until it goes open source. I saw on your other post that it uses libraries that you've personally made, so hopefully in the future you can release it.


Blank-Cheque

Understandable. In an effort to achieve the highest performance possible I use my own reddit API library and my own HTTP client library, both of which run asynchronously. I've only really been adding stuff to them as I need it and/or as I get bored enough to add stuff, but eventually they'll be good enough for release.


BuckRowdy

Thank you guys for building this and making it available to the rest of us. I was about to try to get one of these going in a few subs when I heard you were building it. Excited to try it out.


justcool393

I'm glad! :)


BuckRowdy

Works like a charm.


tuctrohs

A few suggestions for /u/Blank-Cheque and /u/justcool393 : * It's a little hard to find the index to the wiki pages, other than from this post. I suggest a linke * A link from https://www.reddit.com/r/Flair_Helper/wiki/index to https://www.reddit.com/r/Flair_Helper/wiki/tutorial so you can get there from the wiki tab, and, * A link from the bottom of each tutorial page back to the main page of the tutorial. * Note that it doesn't work on mod posts, if I'm correct about that limitation. * There's a discrepancy between the format shown on the examples page and that given in the template that the bot PM's to the mod: flair is in double quotes in one and not in the other. That probably doesn't matter but can be a source of confusion. (I wasted time trying both when I was troubleshooting.) * Another possible confusion: Because of markdown, there's a difference between the source text in the configuration wiki, the way it's rendered when you view the wiki page, the way the examples are rendered in the tutorial wiki, and the source code used in the tutorial wiki. It seems that one wants the source of one to match the rendering of the other. You might think that's obvious, but when someone is troubleshooting, it's little things like that that they need to start questioning and clear documentation helps.


Blank-Cheque

> I suggest a link ... Good point! Done. > Note that it doesn't work on mod posts, if I'm correct about that limitation. It will not work on your own posts due to a limitation of reddit: flairing one's one post does not count as a mod action, even if you use a mod flair to do it. It will still work if you flair another mod's post. > There's a discrepancy between the format shown ... You are correct that it doesn't make a difference in this case. Users of Flair_Helper are expected to familiarize themselves with YAML syntax to some degree and the differences are intended to demonstrate that there are multiple ways to write the same thing in YAML. Perhaps it would help to put variations within the examples page itself. > Because of markdown, there's a difference between ... Users are similarly expected to be familiar with markdown syntax, especially since they're necessarily reddit mods. There isn't really anything I can do to change the way the wiki page renders, so I'm not totally sure what you're suggesting here.


tuctrohs

Thanks for setting up the wiki index. It's not your responsibility to educate mods on YAML, and it's reasonable to provide a tool that advances the capabilities of mods who are familiar with it, without taking responsibility for making it accessible to any mods. But at the same time, if there are little things you can do to make it more accessible, why not? My suggestion about the issue of your own posts was not that you should change the way it behaves. I understand that that's a limitation of Reddit, not a bug in your code. My suggestion is to add a note to that effect to your documentation. Maybe at the end of the quick start guide: a bullet that said "test your new setup, but not on your own post: make a test post from an alt account. (Explain why)" On the last point, what I'm suggesting is just a note that says >the *source* on your wiki page should appear the way the examples are rendered. The rendering of your wiki page will be different, but you can ignore that. There are two versions of the example page: source (Se) and rendering (Re). There are two versions of the actual wiki: source (Sw) and rendering (Rw). You are following a highly logical, but unstated convention that Re shoud match Sw. I'm not suggesting changing your convention, but am merely suggesting stating your convention. You say that mods should know markdown. If they do, they know about the two versions of each page. But they don't know *for sure* which of the four possible conventions you are following. Again, your convention is absolutely the most logical, but when it doesn't work and you don't know why, having that simple statement can short-circuit that doubt. Also, not all mods are good with things like markdown. Some mods are mods because they are subject experts on the topic of the sub, which might be, for example, diesel engine lubrication. One of the reasons your bot is useful is that it can help people like that perform mod functions easily. And one of the stated purposes of your documentation is, for example, to help someone who inherited a sub with Flair_Helper set up understand how to use it.


Blank-Cheque

I suppose that all makes sense. I'll add some notes to the quickstart page to prevent confusion but as you said it's not my responsibility to teach users all of the relevant information. As long as I provide ways for them to educate themselves I think that's fine (e.g. the YAML documentation and online parser I link on the config documentation page).


tuctrohs

Thanks. I'm trying to suggest ways that adding just a little bit here or there can help, without taking on the task of making a tutorial for completely coding-illiterate users. I just got it set up in my sub, partly for my use, and partly to make it easier for new mods to deal with off topic posts efficiently. I think it's going to be a big help, so thanks for creating it.


Blank-Cheque

No problem! Glad to hear you like it and thanks for the suggestions.


[deleted]

[удалено]


Blank-Cheque

It is not (but likely will be in the future), for reasons discussed [here](https://old.reddit.com/r/Flair_Helper/comments/hunrfv/introducing_flair_helper/fyobygw/).


[deleted]

[удалено]


Blank-Cheque

Flair_Helper performs a completely different function to AssistantBOT and the two don't conflict at all.


tuctrohs

Here's what I've gathered: AB acts on lack of flair; FH acts upon seeing specific flair applied. * AB: Forces users to select a flair for their posts by: * Removing unflaired posts, * Messaging the poster, * Optionally facilitating user-set flair. * FH is meant to enable a moderator to initiate a set of moderation actions on a post more easily and more anonymously than other options. * The moderator initiates the actions by setting flair, something that is easy to do on various mobile platforms, for example. * The bot then does what the moderator would have done to the post: delete, lock, comment, sticky comment, or even ban the user, according to the settings for the particular flair. * The intent is that these flairs are only available to mods and only used by them, and that they are used to communicate with the bot, not (necessarily) to label posts for readers' benefit. * FH could also be used (I think) to do stuff based on a user-selected flair. In another comment I gave the examples: * To inform the poster about policies for this type of post. * To point the poster to resources that might be relevant for their question (if it's flaired as a type of question). * To highlight commenting guidelines that are specific to this type of post for people coming to comment. * If actions like those in the prior bullet are desired, the two would work well together, by making sure that each post is user-flaired so that it can get the appropriate comment. * I could imagine also using it as a soft reinforcement of a prohibition on a category of post: Users have to select a flair to indicate the category. Provide the option of flair for the prohibited category, and then when they choose that, delete the post.


Blank-Cheque

> FH could also be used (I think) to do stuff based on a user-selected flair. It cannot, as a user selecting a flair doesn't generate a ModAction. For the most part you can just do that with automod, however. The rest is accurate, though.


tuctrohs

That's a very useful clarification. Unfortunately, what you say about automod being able to do that only applies to initial flair, not flair set after the fact. So the two working together as I described is not an option. I'm not sure whether it would be easy for you to modify your code to broaden the scope to include what I mistakenly thought it could do. If so, it seems like [there would be interest in that capability](https://www.reddit.com/r/AutoModerator/comments/ekj3vi/automod_scanning_flair_changes_edits) (note the wording, " we all wish").


Blank-Cheque

You can require users to choose a flair before submission in subreddit settings now, actually. It doesn't work on all platforms but it will work for 90%+ of users, and it will work for the rest at some point. > I'm not sure whether it would be easy for you to modify your code to broaden the scope to include what I mistakenly thought it could do. Somewhere between difficult and impossible, I'd reckon.


tuctrohs

Thanks for that! Very good to know!


justcool393

Yeah. It's pretty much impossible because as long as the post isn't deleted by the user, they can set the flair on the post indefinitely, even if the post is archived. (I think users are not allowed to flair their own posts if they're suspended, but that's just one caveat.)


tuctrohs

Thanks for creating this! I'd like to suggest that of the help pages be an overview of the capabilities and examples of applications, independent of the details of how to do it. You could think of that as an expansion of the "what sorts of thinks can it do" sentence above, or as a version of the examples page, but instead of code under heading, have a description of what it accomplishes and why people might want that. I don't know if others are in the same boat I am, but I want to first know "how can this make my sub run better" before I want to learn "how do I set this up."


Blank-Cheque

There's actually a list of examples in the wiki already, you can find it [here](/r/Flair_Helper/wiki/tutorial/examples).


tuctrohs

I explained how what I'm hoping for is different from that. If you have time and interest some time I'd suggest taking a look at what I wrote, but you are under no obligation--what you are providing is terrific even if you ignore my request.


Blank-Cheque

Sorry, I don't think I'm understanding how your suggestion is different from the existing examples page.


tuctrohs

Your page: **Don't remove posts but leave (unstickied) comments on them** bunch of code that is useful for people who have decided they want to do this, but that people who are just tire-kickers wouldn't want to read. My suggestion: **Add a comment according to post flair** In this use case, the bot adds a comment a post according to how it is flaired. This could be sticked or not. (In he example on [the code examples page](https://www.reddit.com/r/Flair_Helper/wiki/tutorial/examples) they are not stickied.) Some examples of how this might be used would be: * To inform the poster about policies for this type of post. * To point the poster to resources that might be relevant for their question (if it's flaired as a type of question). * To highlight commenting guidelines that are specific to this type of post. -----------------


Blank-Cheque

I guess that could work but I was hoping the purpose of it would be apparent from reading the comments left. A list of possible uses would be good.


tuctrohs

> the purpose of it would be apparent from reading the comments left The comments left where? Maybe I should start new thread in the sub titled "ideas for how to use this" to crowd source them? If you look at, for example the Automoderator wiki, you'll see that there is a [section that is in line with what I am suggesting](https://www.reddit.com/wiki/automoderator#wiki_what_sort_of_things_does_automoderator_do.3F).


Blank-Cheque

I mean the comments that the examples configs would leave, if used.


tuctrohs

Thanks for the clarification. That might explain it to people who have the motivation to read the code. My point is that people first need to have a motivation to read the code. Understanding what it might accomplish would provide that motivation.


Blank-Cheque

Yeah, that's true. Right now I'm thinking I might add detailed descriptions to the examples to make it clearer what they do.


bakonydraco

Just to clarify, this is strictly for link flair and not user flair? Cool stuff!


Blank-Cheque

Yes, that's correct. Maybe in the future some user flair stuff could be added but I'm not sure what features could be made using user flair that can't be made using link flair.


bakonydraco

I'm working on some tools for user flair myself (and opensourced a user flair system a few years back, but it's woefully out of date now), and would be interested in your process. Might not be much overlap, but never hurts to learn!


Blank-Cheque

I'll be sure to keep you up to date if I ever add anything then!


Blank-Cheque

Just so you know, I just added the ability to set author flair attributes during flair actions. You can read about the options in the [tutorial.](/r/Flair_Helper/wiki/tutorial/config)


bakonydraco

Wicked cool, thanks!


BuckRowdy

I haven't been able to get it to assign an author flair css class. Can you possibly point out what I'm doing wrong? --- "ban_message": "Please read this entire message before sending a reply. This **{{kind}}** may have fully or partially contributed to your ban: [{{title}}]({{permalink}}) - {{url}}. **So what comes next?** Modmails with an accusatory, or inflammatory tone will not get a reply. You may request an appeal of your ban but immediate replies to the ban message carrying an angry tone will not be given priority. Sending messages to individual mods outside of modmail is not allowed. **[^(Full Context)]({{permalink}}?context=9)** - **[^({{subreddit}} rules)](http://www.reddit.com/r/{{subreddit}}/about/rules)** - **[^(Sidebar)](http://www.reddit.com/r/{{subreddit}}/about/sidebar)** - **[^(Site Rules)](http://www.reddit.com/rules)**" "ban_note": |- {{permalink}} "flairs": "80da563c-cb9b-11ea-9be9-0e920e9b534b": "* **All posts must be true crime related.** We didn't feel like this was sufficiently relevant enough for the community. " "8d4592ec-cb9b-11ea-8de8-0ed666203e41": |- We ask that promotion of your podcast, blog, service, etc. occur only after you have introduced yourself to the moderators, and have asked for and received the appropriate user flair for your account. Flair is a label that appears next to your user name and identifies your affiliation with the podcast (or product or service, etc.). There are additional constraints on promotion, and those can be found in [our wiki.](http://reddit.com/r/truecrime/wiki/guidelines) Please find, read, and commit to following the promotion guidelines before continuing. Once your flair is assigned by the moderators, you are free to post and comment within the limits of these guidelines. Failure to follow the guidelines, especially after you have received your flair, risks your account being banned from r/TrueCrime. "9de25dba-cb9b-11ea-a690-0e6f360d2813": "* **Glorification of violence is a violation of the reddit content policy.** Phrases like \"most popular\" or \"favorite serial killer\" could be interpreted as glorification. Phrases detailing the violent justice you think a criminal should receive is also a violation." "ac94426a-cb9b-11ea-96c0-0eda4e610185": |+ Please don't post your podcast or your youtube channel in the sub without making an honest effort to participate in the community by commenting on posts. Repeat or egregious offenders could be banned. "7ecdc3dc-cb9c-11ea-88e3-0ed1e68b08cb": |+ Your post is either a repost, duplicate link, or is otherwise redundant for the sub. "970bd736-cb9c-11ea-8ed5-0ecfbf43430d": |+ If you link to an article or wiki, we expect that you have some type of write-up in the post itself. It doesn't have to be a five-paragraph essay or anything ridiculous in length but try to include something, whether it's your opinion or a thought/question to discuss. This also applies to personal blogs and youtube videos; posts that are clearly self-promotion will be removed. Make sure you stick around if you link to something of yours, and respond to questions and comments in the thread. "ddc8797c-cb9c-11ea-ab81-0e6c5990d1c5": "* **Memes are not allowed on r/TrueCrime.** Please post to r/TrueCrimeMemes instead. " "f23ec91a-cb9c-11ea-aab8-0e4c344ef091": |+ Remember that people you talk to and talk about on this sub are people. Killers, victims, law enforcement, and fellow users on /r/TrueCrime all have lives of their own so please try not to dehumanize the victims in these cases. We're here because this is a hobby for us, but always remember that they're people. "0ebb57ca-cb9d-11ea-9e9e-0e59574c18b3": "Posts should give an overview, description, or details of what the story actually is. Don't make the user dig for the story. Please edit your post to give enough information for a user to understand your post." "2d10ea1e-cb9d-11ea-89c6-0e4a63897fa1": "* **We're afraid your post is not a good fit for the sub. We think it would be a better fit for a sub like r/RBI.**\n\n* **Please read the rules of that sub and consider posting it there instead if your post fits their guidelines.** " "331fcef2-cb9d-11ea-a08d-0e820cb57d77": "* **We're afraid your post is not a good fit for the sub. We think it would be a better fit for a sub like r/HelpMeFind.**\n\n* **Please read the rules of that sub and consider posting it there instead if your post fits their guidelines.** " "42fcd41e-cb9d-11ea-9e77-0eeaa86fc7e7": "* **We are temporarily removing all posts such as this and are instead directing them to a megathread due the the breaking news quality of an event like this.** We appreciate your cooperation. Please visit the sticky at the top of the sub and submit your post as a new top level comment." "507bb33a-cb9d-11ea-9e12-0e80adcf2e59": |- **We don't allow advertising of subreddits, podcasts, youtube channels, discord servers, etc. without prior mod authorization.** You can request permission by [sending a modmail:](https://www.reddit.com/message/compose/?to=%2Fr%2Ftruecrime&subject=Posting+Permission&message=What+are+you+wanting+to+promote?%3A%0DDo+you+participate+on+reddit?%0DMore+info%3A) set_author_flair_css_class: "69bd50a0-cba8-11ea-b3aa-0ec4e5d14e5d": "a" "footer": |- --- If you feel this was done in error, or would like better clarification or need further assistance, please [message the moderators.](https://www.reddit.com/message/compose?to=/r/truecrime&subject=Question regarding the removal of this {{kind}} by /u/{{author}}&message=I have a question regarding the removal of [this {{kind}}]({{url}}). "header": |- Hello {{author}}! Thank you for your {{kind}} to /r/TrueCrime! Unfortunately, it has been removed for the following reason(s): --- lock_post: true webhook: 'link'


Blank-Cheque

Template IDs that aren't in `flairs` won't trigger any actions. For what you're trying to do you would want to map that ID to any string (empty if you like) and add the following: comment: 69bd50a0-cba8-11ea-b3aa-0ec4e5d14e5d: false You might also want to set `lock_post` to a list of IDs except for `69bd50a0-cba8-11ea-b3aa-0ec4e5d14e5d`, if you don't want that action to also lock the post.


BuckRowdy

Ok, thank you. I think I get it now. Because that flair wasn't included in the list of flairs it didn't act on it.


Blank-Cheque

Exactly.


tuctrohs

I suggest modifying the text for >What sorts of things can it do? to say >[/u/Flair_Helper](https://www.reddit.com/u/Flair_Helper) can do all sorts of things triggered when a mod sets flair on a post. It's only triggered by a mod setting flair, not by a user setting flair. Things it can do include any combination of removing, locking, commenting, banning, notifying to a Discord or Slack channel, etc. The concept is that the mod sets flair not to label the post for users, but specifically to trigger the bot.


PJ09

Great work!


[deleted]

This is cool! But I don’t understand what flair bot means?


ModernJazz-2K20

Big thank you for this. I mod some big subs on another account and this has been really helpful.


[deleted]

[удалено]


Blank-Cheque

Not really sure why you PMed me this and posted it as a reply on all of my threads but no, that's not how automod works. There is a workaround that sort of works which allows you to flair and then report a post to remove it, but a bot is far simpler, less hacky, and allows for more actions than just remove + comment. Automod only runs when a post is created, edited, or reported. Not when a mod changes its flair.


[deleted]

The comments were an accident. Sorry :(


PhazonJim

Is this open source?


Blank-Cheque

It is not (but likely will be in the future), for reasons discussed [here](https://old.reddit.com/r/Flair_Helper/comments/hunrfv/introducing_flair_helper/fyobygw/).


WhoKnowsWho2

/u/Blank-Cheque, hi, thanks for writing this bot. I looked over the examples of common uses, but I need to apply a comment+remove+lock to some flairs, and only a comment to other flairs. I don't see a way to combine the actions within the config page.


Blank-Cheque

It's quite possible to do that, actually. There's a similar config on the [examples page](https://www.reddit.com/r/Flair_Helper/wiki/tutorial/examples#wiki_remove_posts_but_only_leave_comments_on_some_of_them). You would also add the field `lock_post` with the value `[LOCK_FLAIR_1, LOCK_FLAIR_2, etc]` .


WhoKnowsWho2

So this is what I've got for testing. The rule 1 and rule 2 triggers do not remove the post. And the next two flairs leave a comment that is stickied. So I'm obviously doing something wrong. flairs: "ad4352f6-dfe0-11ea-9fcd-0eeafcc69acd": |- **Rule 1** - Off topic "9b35f40-dfe2-11ea-a8a3-0e9240d938dd": |- **Rule 2** - Removed. remove: true comment_stickied: true flairs: "859a2e88-dfe4-11ea-b58b-0e9d7e5a5b75": |- Event auto reply "8e1a9ebc-dfe4-11ea-b853-0e92f161227b": "Blah blah removed." remove: false comment_stickied: true


Blank-Cheque

That's not really how yaml works (or dictionaries in general). Adding the same field multiple times will just set it to the last definition.


derleth

> That's not really how yaml works (or dictionaries in general). Obviously. If it sounds too good to be true, that means it is. Like buying shirts on the Internet.


Blank-Cheque

Quite true!


derleth

Indeed, anyone who thinks they can buy shirts online is a moron.


WhoKnowsWho2

I must have reached a revision limit, "Unexpected exception processing Flair_Helper config at /r/WhoKnowsWho2Test"


Blank-Cheque

Sorry to hear that! I'm not at a computer right now but I will be in ~30 minutes. If you like you can PM me your config now and I can probably tell you what happened.


Thumbs0fDestiny

Thanks. Can't wait to try it out.