Hey,
I’m looking into a implementing a plugin that creates and manages bots as part of its’ functionality.
My requirements for these bots are:
- There is a dynamic number of them, not a predefined set amount
- They need to be able to author topics (programmatically)
From what I found so far:
- Discourse has some logic in place that checks if a user has negative id, it treats it as a bot, or skips some non-bot behavior
- This very explicit check if a user is a human, checking for a positive user id
- This is a snippet from the official
discourse-ai
plugin on handling the creation of a bot
My question is: Is manually creating a User
model with negative id
the “proper” way of creating bots?
What I’m worried about is potentially creating future problems for myself by creating a User like that.