Discoursebot reminder to format code/logs/configs etc

Home Assistant have a banner, which is nice. But easily dismissible. A bot seems like a more engaging way to remind people, but there may need to be limits around it so it only posts once per topic (for eg).

I dunno if anyone has thought of this, but it’d be pretty rad if this existed, and I don’t have the skills to upgrade it to do this :slight_smile:

I am not following. How exactly do you imagine this working?

If someone posts an unformatted, code-like blob of text, the bot chimes in and reminds the poster to format it appropriately.

Wouldn’t it be more effective to block the post until such time as the user fixes it and formats their code? Why clutter the topic with back and forth when you can fix it at the source? There’s several discussions here about such a plugin.

3 Likes

I think @lionel-rowe built Unformatted Code Detector theme component for this.

Your mileage will vary here cause it depends on regexes and may have false positives / negatives, but I am sure it could be a reasonable starting point if you have a pathological issue.

2 Likes

Effective for whom? I don’t want to have to moderate all of them, neither do I want that on the other mods.

Having a single auto-post from a bot with a friendly reminder seems a lot less jarring than blocking a user.

I don’t think it makes sense to clutter topics with a lot of generic auto-replies. It’s better to nudge the user to properly format their post before it can be submitted.

Trust me, I spent years dealing with this at Stack Overflow. :man_shrugging:

3 Likes

Ahh that is awesome, thanks for the referral.

Yes indeed! @Mark_Walkom If you or your users spot any false negatives/positives per your use case, bug reports are always welcome (though it won’t ever have perfect coverage).

5 Likes