Actions32
- Analytics Actions
- Moderation Actions
- Backup Actions
- Automation Actions
- Insights Actions
Overview
This node provides advanced analytics and moderation tools for Discord servers, focusing on the 'Message Activity Heatmap' operation under the 'Analytics' resource. It analyzes message activity within a specified Discord channel over a given time range, generating heatmaps and distributions of messages by hour and day. This is useful for server administrators to understand peak activity times and user engagement patterns. Practical applications include optimizing server event timings, monitoring active hours, and identifying trends in message traffic.
Use Case Examples
- Analyzing message activity in a specific channel over the past 7 days to identify peak hours and days.
- Including or excluding bot messages in the analysis to get a clearer picture of human activity.
- Setting minimum message thresholds and other filters to refine the heatmap data.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) to analyze. |
| Channel ID | The ID of the specific channel within the guild to analyze message activity. |
| Time Range (Days) | The number of days to analyze message activity, ranging from 1 to 30. |
| Additional Options | Optional parameters to customize the analysis, including whether to include bot messages, minimum messages for analysis, inclusion of attachments, spam threshold, inactive days to flag users, and maximum items to process. |
Output
JSON
channelId- The ID of the analyzed channel.timeRange- The number of days over which the analysis was performed.totalMessages- Total number of messages analyzed in the channel.heatmap- A nested object representing message counts by weekday and hour.hourlyDistribution- An object showing message counts aggregated by each hour of the day.dailyDistribution- An object showing message counts aggregated by each day (date) in ISO format.peakHour- The hour of the day with the highest message activity.peakDay- The day with the highest message activity.
Dependencies
- Discord API with bot token authentication
Troubleshooting
- Ensure the provided Guild ID and Channel ID are correct and that the channel is text-based; otherwise, the node will throw a 'Channel not found or not text-based' error.
- The bot token credential must have appropriate permissions to fetch guilds, channels, messages, and members; lack of permissions can cause failures.
- Message fetching is limited to the most recent 100 messages, which may not represent the entire time range if the channel is very active.
- If the node fails to connect or login to Discord, verify the bot token and network connectivity.
Links
- Discord.js Client Documentation - Official documentation for the Discord.js library used to interact with the Discord API.
- Discord Developer Portal - Official Discord API documentation and developer resources.