Actions53
- Message Actions
- Channel Actions
- Thread Actions
- Reaction Actions
- Guild (Server) Actions
- Member Actions
- Role Actions
- Voice Actions
- DM Actions
- Webhook Actions
- Invite Actions
Overview
This node interacts with the Discord API to manage Discord server (guild) members, specifically allowing the removal of a role from a member. It is useful in scenarios where automated role management is needed, such as moderating user permissions or updating member roles based on certain triggers. For example, it can be used to remove a specific role from a user when they leave a group or fail to meet certain criteria.
Use Case Examples
- Remove a 'Muted' role from a user after a timeout period.
- Automatically remove a 'VIP' role when a user's subscription expires.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) where the member exists. |
| User ID | The ID of the user (member) from whom the role will be removed. |
| Role ID | The ID of the role to be removed from the member. |
| Additional Fields | Optional additional parameters such as reason for audit logs, embed messages, and other Discord-specific settings. |
Output
JSON
success- Indicates if the role removal was successful.userId- The ID of the user from whom the role was removed.roleId- The ID of the role that was removed.removed- Boolean indicating the role was removed.
Dependencies
- Discord API
- Bot token credential for authentication
Troubleshooting
- Ensure the bot has the necessary permissions to manage roles in the guild.
- Verify that the Guild ID, User ID, and Role ID are correct and that the user currently has the role to be removed.
- Common error: 'Role not found' - occurs if the role ID is invalid or the role does not exist in the guild. Check the role ID and guild membership.
- Common error: 'Missing Permissions' - occurs if the bot lacks permission to remove roles. Grant the bot appropriate role management permissions.
Links
- Discord.js GuildMember Roles - Documentation on managing roles for guild members using discord.js library.
- Discord Permissions Documentation - Official Discord documentation on permissions and role management.