Skip to content

Commit 287cd46

Browse files
committed
docs: update README and command documentation
1 parent 88122c7 commit 287cd46

3 files changed

Lines changed: 81 additions & 5 deletions

File tree

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,22 @@ Use this link to invite the bot to your server:
7474
### Quick Setup
7575

7676
1. **Invite the bot** using the link above
77-
2. **Set the verified role**: `/role verified @YourVerifiedRole`
77+
2. **Add a default role**: `/role add @Verified` (given to all verified users)
7878
3. **Add allowed domains**: `/domain add @university.edu` (use `@*.edu` for all .edu domains)
7979
4. **Create a verification button**: `/button #verification-channel "Click to Verify"`
8080
5. Done! Users can now verify themselves
8181

82+
### Advanced: Domain-Specific Roles
83+
84+
You can assign different roles based on which email domain the user verifies with:
85+
86+
```
87+
/domainrole add domain:@staff.company.com role:@Staff
88+
/domainrole add domain:@*.edu role:@Student
89+
```
90+
91+
Users will receive their domain-specific roles **plus** any default roles you've configured.
92+
8293
---
8394

8495
## 📝 Commands
@@ -94,9 +105,24 @@ Use this link to invite the bot to your server:
94105

95106
| Command | Description |
96107
|---------|-------------|
97-
| `/role verified [role]` | Set or view the role given after verification |
108+
| `/role add <role>` | Add a default role given to all verified users |
109+
| `/role remove <role>` | Remove a role from the default roles list |
110+
| `/role list` | View all default roles |
98111
| `/role unverified [role]` | Set or view the optional role for unverified members |
99112

113+
### 🎭 Domain-Specific Roles
114+
115+
Assign different roles based on email domain:
116+
117+
| Command | Description |
118+
|---------|-------------|
119+
| `/domainrole add <domain> <role>` | Add a role for a specific email domain |
120+
| `/domainrole remove <domain> <role>` | Remove a role from a domain |
121+
| `/domainrole list` | View all domain-role mappings |
122+
| `/domainrole clear <domain>` | Remove all roles for a domain |
123+
124+
> 💡 **Example:** `/domainrole add @*.edu @Student` gives the Student role to anyone with a .edu email
125+
100126
### 📧 Domain Management
101127

102128
| Command | Description |

docs/commands.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,38 @@ The following commands require administrator permissions.
1919

2020
Configure which roles are assigned during the verification process.
2121

22+
#### Default Roles
23+
24+
Default roles are given to **all** verified users, regardless of their email domain.
25+
2226
| Command | Description |
2327
|---------|-------------|
24-
| `/role verified [role]` | Set or view the role given to users after successful verification |
28+
| `/role add <role>` | Add a role to the default roles list |
29+
| `/role remove <role>` | Remove a role from the default roles list |
30+
| `/role list` | View all configured default roles |
2531
| `/role unverified [role]` | Set or view the optional role for unverified members (select current role to disable) |
2632

33+
#### Domain-Specific Roles
34+
35+
Assign different roles based on which email domain the user verifies with. Users receive their domain-specific roles **plus** any default roles.
36+
37+
| Command | Description |
38+
|---------|-------------|
39+
| `/domainrole add <domain> <role>` | Add a role for a specific email domain |
40+
| `/domainrole remove <domain> <role>` | Remove a role from a specific domain |
41+
| `/domainrole list` | View all domain-role mappings |
42+
| `/domainrole clear <domain>` | Remove all roles for a specific domain |
43+
44+
#### Domain Role Examples
45+
46+
| Setup | Result |
47+
|-------|--------|
48+
| Default: `@Member`<br>Domain: `@*.edu``@Student` | User with `@stanford.edu` gets: `@Student`, `@Member` |
49+
| Default: `@Verified`<br>Domain: `@company.com``@Employee`, `@Staff` | User with `@company.com` gets: `@Employee`, `@Staff`, `@Verified` |
50+
| Domain: `@*.harvard.edu``@Harvard`<br>Domain: `@*.edu``@Student` | User with `@cs.harvard.edu` gets: `@Harvard`, `@Student` (all matching patterns) |
51+
52+
> 💡 **Tip:** When using `/domainrole add`, the domain field autocompletes with your configured domains from `/domain add`.
53+
2754
### 📧 Domain Management
2855

2956
Control which email domains are allowed for verification.
@@ -120,3 +147,15 @@ The unverified role can be used to:
120147
- Make a verification channel visible only to unverified users
121148
- Restrict access to most channels until users verify
122149
- Combined with `/settings auto-unverified`, automatically restrict new members
150+
151+
### Role Display in Verification
152+
153+
When domain-specific roles are configured, the verification modal shows users which roles they will receive:
154+
155+
```
156+
Accepted domains:
157+
1. @*.edu → Student, Member
158+
2. @company.com → Employee, Member
159+
```
160+
161+
This helps users understand what access they'll get before verifying.

src/commands/help.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,28 @@ module.exports = {
1717
{
1818
name: '🚀 Quick Setup (4 Steps)',
1919
value:
20-
'**1.** `/role verified <role>` - Set the role for verified users\n' +
20+
'**1.** `/role add <role>` - Add a default role for verified users\n' +
2121
'**2.** `/domain add <domains>` - Add allowed email domains\n' +
2222
'**3.** `/button <channel>` - Create verification embed\n' +
2323
'**4.** `/status` - Verify everything is configured'
2424
},
2525
{
2626
name: '👥 Role Configuration',
2727
value:
28-
'`/role verified` - Set/view role given after verification\n' +
28+
'`/role add` - Add a default role (given to all verified users)\n' +
29+
'`/role remove` - Remove a default role\n' +
30+
'`/role list` - View all default roles\n' +
2931
'`/role unverified` - Set/view optional role for unverified members'
3032
},
33+
{
34+
name: '🎭 Domain-Specific Roles',
35+
value:
36+
'`/domainrole add` - Assign roles for specific email domains\n' +
37+
'`/domainrole remove` - Remove a role from a domain\n' +
38+
'`/domainrole list` - View all domain-role mappings\n' +
39+
'`/domainrole clear` - Remove all roles for a domain\n' +
40+
'*Users get domain roles + default roles on verification*'
41+
},
3142
{
3243
name: '📧 Domain Management',
3344
value:

0 commit comments

Comments
 (0)