Actions32
- Messages Actions
- Channels Actions
- Guilds Actions
- Users Actions
- Webhooks Actions
Guilds → Delete Role
AI-generatedOverview
This node provides enhanced integration with the Discord API, enabling comprehensive management of Discord guilds, channels, messages, users, webhooks, interactions, threads, auto moderation, scheduled events, and members. Specifically, for the Guilds resource and Delete Role operation, it allows you to delete a role within a specified Discord guild.
This is useful in scenarios where you want to automate role management in your Discord server, such as removing outdated or unnecessary roles programmatically without manual intervention. For example, if you have a bot that manages user permissions dynamically, this node can be used to delete roles that are no longer needed based on certain triggers or workflows.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The unique identifier of the Discord guild (server) where the role exists. |
| Role ID | The unique identifier of the role to be deleted within the specified guild. |
Output
The output JSON contains the response from the Discord API after attempting to delete the specified role. Typically, deleting a role returns an empty object or confirmation of deletion. If the deletion fails, the output may contain error information.
No binary data is involved in this operation.
Example output JSON on success:
{}
Example output JSON on failure:
{
"error": "Role not found or insufficient permissions"
}
Dependencies
- Requires an active subscription and valid API key for the external "N8N Tools API" service, which acts as a proxy or enhancer for Discord API calls.
- Requires OAuth2 credentials configured in n8n for authenticating with Discord via the N8N Tools API.
- The node internally validates the API key and subscription status before executing operations.
- No direct Discord API keys are handled; authentication is managed through the configured credentials.
Troubleshooting
- Invalid subscription or API key: If you receive errors indicating invalid subscription or API key, verify that your API key credential is correct and active.
- Permission errors: Deleting a role requires appropriate permissions in the Discord guild. Ensure the authenticated user or bot has the "Manage Roles" permission.
- Role or Guild not found: Double-check that the provided Guild ID and Role ID are correct and exist.
- Unknown operation or resource errors: These indicate misconfiguration of the node parameters; ensure the Resource is set to "Guilds" and Operation to "Delete Role".
- API rate limits: Discord enforces rate limits; if you hit these, consider adding delays or retries in your workflow.