# Anti domination bot

**URL:** https://meta.discourse.org/t/anti-domination-bot/103802
**Category:** Development
**Created:** [December 9, 2018, 1:11am UTC](https://meta.discourse.org/t/anti-domination-bot/103802 "2018-12-09T01:11:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [December 9, 2018, 1:11am UTC](https://meta.discourse.org/t/anti-domination-bot/103802/1 "2018-12-09T01:11:46Z")

</div>

First experiment with the Discourse API: a bot which discourages users from dominating a category.

This is already proving useful in our [opt-in Politics category](https://se23.life/groups/general_politics) on one of my Discourse forums.

I’m new to Discourse API development, so feedback and PRs appreciated 👍

[https://github.com/chrisbeach/anti-domination-bot](https://github.com/chrisbeach/anti-domination-bot)

[![Screenshot](https://global.discourse-cdn.com/meta/original/3X/2/3/23163cd4ebf128fe62e596ea29cd20de9e31128c.jpeg)](https://github.com/chrisbeach/anti-domination-bot/blob/master/doc/forum-screenshot.png)

### Configuration

Customise [src/main/resources/application.conf.sample](https://github.com/chrisbeach/anti-domination-bot/blob/master/src/main/resources/application.conf.sample) and save as `src/main/resources/application.conf`

See comments in file for instructions

### Running with Docker

```plaintext
docker run -t \
    -v /path/to/your/application.conf:/root/src/main/resources/application.conf \
    chrisbeach/anti-domination-bot

```

NOTE: `/path/to/your/application.conf` is the location of your customised application.conf file and must be specified as an absolute path.

### Running (Development)

NOTE: Requires [SBT](https://www.scala-sbt.org/)

```plaintext
sbt run

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 9, 2018, 1:16am UTC](https://meta.discourse.org/t/anti-domination-bot/103802/2 "2018-12-09T01:16:44Z")

</div>

I think perhaps a better way to do this is automatically limit number of posts per category per day per user. That is, every user gets 3 posts (or whatever number is comfortable) they can make in the Politics category per day.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [December 9, 2018, 1:20am UTC](https://meta.discourse.org/t/anti-domination-bot/103802/3 "2018-12-09T01:20:04Z")

</div>

> [@codinghorror](#):
>
> I think perhaps a better way to do this is automatically limit number of posts per category per day per user

Yes, that would be a better way of governing the category (although I do quite like that the bot gives a public shaming 😄).

Is there an setting in core that would allow such a rate limit, or would it need to be a plugin?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 9, 2018, 1:52am UTC](https://meta.discourse.org/t/anti-domination-bot/103802/4 "2018-12-09T01:52:44Z")

</div>

Not sure, but the “public shaming” should be a PM anyway, because “public shaming” is rarely a good idea.

Note that our just-in-time education panels only appear in the editor for the user triggering the education panel..

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [December 9, 2018, 11:51am UTC](https://meta.discourse.org/t/anti-domination-bot/103802/5 "2018-12-09T11:51:43Z")

</div>

I’m a big fan of the education panels but a) smartphone users don’t see them and b) some people choose to ignore them.
