ModulesStats
Activity roles
Give a role to members while they're active, and take it back when they aren't, with rules Dexy checks on a schedule.
Roles for activity usually stay forever, even after someone stops showing up. Activity roles fix that: Dexy gives a role while a member meets a rule's conditions and takes it back when they don't. It checks everyone on a schedule, so roles keep up without anyone doing it by hand.
Activity roles are part of the Stats module. You make and edit rules on the dashboard; in chat you can list them, preview them and run them now.
Make your first activity role#
- Make the role in your server, and drag it below Dexy's highest role in your server's role list.
- On the dashboard, open your server and go to Stats ▸ Activity roles. Your rules are listed with whether they're on, their conditions and their last check.
- Press New activity role. A panel opens with four tabs: Rule, Who, Advanced and Preview.
- On Rule, give it a Name (like "Regulars"), pick the Role to give, and add a condition under Conditions, such as Messages at least 150 in 7 days.
- Open Who to choose Give it to and anyone it should Never give it to, and Advanced to choose how often Dexy checks it.
- Open Preview. It shows how many members qualify, who would get the role, who has it already and who would lose it, with each member's numbers next to the conditions. Nothing changes yet.
- Press Create. Dexy checks the rule on its schedule, every 3 hours by default. To check it straight away, press Check now on the rule in the list.
In chat#
You make and edit rules on the dashboard. In chat you can list them, preview them and run them now. Rules are known by their number (1 or #1) or their name.
How a rule works#
A rule gives one role. It has up to 5 conditions, and members get the role while they meet them.
Conditions#
| Condition | What it measures | Period |
|---|---|---|
| Messages | Messages sent in the period | Yes |
| Voice time | Minutes in voice channels in the period | Yes |
| Active days | Days with at least one message in the period, in the server's timezone | Yes |
| Time in the server | Days since the member joined | No |
| Account age | Days since the member's account was made | No |
Each condition is At least or At most an amount. Conditions with a period count over the last 7, 14, 30 or 90 days, or ever.
With more than one condition, pick All of them (a member needs every condition) or Any of them (one is enough).
Activity is counted the way Stats shows it: the server's channel filters and counted voice states apply. Member filters don't, because they decide who stats show, not who can earn a role.
Who gets it#
On the Who tab:
- Give it to: People, or People and bots.
- Never give it to: members this rule never gives the role to. Dexy leaves their roles alone.
When it runs#
On the Advanced tab, Check every sets how often Dexy checks the rule: every 3, 6 or 12 hours, or once a day. Each check:
- Looks at every member still in the server (leaving out bots unless the rule includes them, and anyone under Never give it to).
- Gives the role to members who qualify and don't have it.
- Takes it from members who have it but no longer qualify.
Role changes go out a few per second, because Fluxer allows 20 role changes every 10 seconds, so a big change takes a little while.
Turning a rule off pauses it. Deleting a rule never takes back the roles it gave.
Preview and run now#
Preview shows who would get the role and who would lose it if the rule ran now, without changing anything. On the dashboard it's the Preview tab while you edit a rule; tick Show everyone to see every member, not only the ones who qualify. Anyone can preview from chat:
d!activityroles preview 1
d!activityroles preview Regulars
d!activityroles preview 1
d!activityroles preview Regulars
To check a rule now instead of waiting for its schedule:
d!activityroles run 1
d!activityroles run 1
Rules are known by their number (1 or #1) or their name. d!activityroles list shows every rule with its conditions, how many members have each role and the last check.
Who can manage activity roles#
- Making, editing and deleting rules on the dashboard needs Manage Server (a Dexy admin), or a role with Manage activity roles in role permissions.
d!activityroles runneeds Manage Roles, or the activity roles role permission. It can be used once a minute per server.- Listing and previewing rules works for everyone who can use commands.
Roles Dexy can give#
- Dexy needs Manage Roles.
- The role must be below Dexy's highest role. If it isn't, move Dexy's role above it in your server's role list.
- Unless you're an Administrator or the owner, the role must also be below your own highest role.
- A role can have one rule, and two rules can't share a name.
Common setups#
Regulars. Messages at least 150 in 7 days, Any of them with Voice time at least 300 minutes in 7 days. Members who chat or hang out in voice get the role, and lose it after a quiet week.
Veterans. Time in the server at least 365 days. No period needed.
Inactive members. Messages at most 0 in 30 days. A role for members who've gone quiet, removed as soon as they post again.
Limits#
- A server can have 5 rules, each with up to 5 conditions.
- Rules are checked every 3 hours at the fastest.
d!activityroles runonce a minute per server.
Troubleshooting#
The rule's last check shows an error. The most common one is that Dexy couldn't change the role: give it Manage Roles and move its highest role above the role. If the role or members are gone, the error says so.
Nobody qualifies. Open Preview to see each member's values next to the conditions. Check that the channels you expect aren't hidden by a channel filter, and that the voice states you expect are counted.
Activity roles don't run at all. They're part of Stats, so they don't run while the Stats module is off. Turn it on with d!modules enable stats.
A member who should be skipped got the role. Add them to Never give it to on the Who tab.
Commands#
The activity roles commands are in the Stats command reference.