Discord User icon

Discord User

Complete Discord automation - Messages, Servers, Roles, Members, DMs

Role → Assign Role

AI-generated

Summary

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.

Discussion