Actions32
- Analytics Actions
- Moderation Actions
- Backup Actions
- Automation Actions
- Insights Actions
Overview
This node provides advanced analytics and insights for Discord servers (guilds). Specifically, the 'Role Distribution' operation analyzes the distribution of roles within a Discord server, reporting on the number of members assigned to each role, their relative percentages, and identifying the most popular role. This is useful for server administrators who want to understand role engagement and membership distribution across their server.
Use Case Examples
- A server admin wants to see which roles have the most members to optimize role management and permissions.
- Analyzing role distribution to identify inactive or underused roles for cleanup or reorganization.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) to analyze. |
| Time Range (Days) | Number of days to analyze (1-30). Relevant for time-based insights but not specifically used in role distribution. |
| Additional Options | Collection of optional parameters such as including bots, minimum messages, spam threshold, inactive days, and max limit for processing. These options are more relevant for other operations but available as input. |
Output
JSON
guildId- The ID of the Discord server analyzed.totalRoles- Total number of roles in the server.totalMembers- Total number of members in the server.roles- Array of role objects with details including role ID, name, color, member count, percentage of total members, and position.mostPopular- The role with the highest member count.
Dependencies
- Discord API
Troubleshooting
- Ensure the provided Guild ID is correct and the bot has permissions to fetch roles and members in the server.
- If the node fails to fetch roles or members, verify the Discord API credentials and bot token are valid and have appropriate scopes.
- Large servers with many roles and members may cause rate limiting or timeouts; consider using the 'maxLimit' option to limit processing.
Links
- Discord.js Guild Roles Documentation - Details on fetching and handling roles in a Discord guild.
- Discord Developer Portal - Official Discord API documentation and developer resources.