Actions44
- Message Actions
- User Profile Actions
- Server Actions
- Channel Actions
- Role Actions
- Member Actions
- Presence Actions
- Invite Actions
Role → Assign Role
AI-generatedSummary
Assigns a role to a member in a Discord server.
Inputs
- serverId (required) — The ID of the Discord server.
- roleId (required) — The ID of the role to assign.
- memberId (required) — The ID of the member to assign the role to.
Output shape
success: boolean, memberId: string, roleId: string
The operation fetches the guild by serverId, fetches the member by memberId, and adds the roleId to the member's roles collection. Returns a success flag along with the member and role IDs.