What does admin_js.admin.badges.trigger_type.user_change mean in Discourse?

Hi,I came across the configuration admin_js.admin.badges.trigger_type.user_change in Discourse and I’m not sure what it refers to. Could someone explain its exact meaning and how it works in the context of badge triggers?
In fact,I’ve created the following SQL badge query:

SELECT user_id, current_timestamp AS granted_at 
FROM gamification_scores
WHERE (:backfill OR user_id IN (:user_ids))
GROUP BY 1
HAVING SUM(score) > 1

I want this badge to trigger in real time, meaning it should be awarded immediately when the conditions are met.
Any help or suggestions would be greatly appreciated!Thanks in advance!

4 Likes

I’ve gone through the guide, but I still have some questions. It mentions that badges can be triggered every minute, but it doesn’t explain exactly how to implement this. There’s an example for triggering badges when posts are edited, but I was hoping for something more frequent.

Additionally, it mentions that badges will trigger at least once per day, but it seems like that’s not happening. Could anyone help clarify how I can set up more frequent badge triggers, or if there’s something I might have missed?

Thank you in advance for your help!