Actions30
- Message Actions
- User Actions
- Channel Actions
- Guild Actions
- Emoji Actions
- Analytics Actions
- Moderation Actions
- Backup Actions
- DM Actions
Overview
This node operation, 'Message Activity Heatmap' under the 'Analytics' resource, analyzes message activity in a specified Discord text channel by hour of the day. It fetches up to 100 recent messages from the channel and counts how many messages were sent during each hour, producing a heatmap of message activity. This is useful for understanding peak activity times in a Discord channel, helping server administrators or community managers optimize engagement or moderation schedules.
Use Case Examples
- A community manager wants to know the busiest hours in a Discord channel to schedule announcements or events.
- A server admin analyzes message activity patterns to adjust moderation staffing during peak times.
Properties
| Name | Meaning |
|---|---|
| Guild ID | The ID of the Discord server (guild) where the channel is located. Required to identify the server context. |
| Channel ID | The ID of the specific text channel within the guild to analyze message activity for. Required to fetch messages from the correct channel. |
| Additional Options | Optional parameters to customize the operation, such as including bot messages, filtering messages before or after certain message IDs, case sensitivity, exact match, audit log filters, and limits. For this operation, these options are not specifically used but are available in the node's properties. |
Output
JSON
channelId- The ID of the analyzed channel.guildId- The ID of the guild (server) containing the channel.heatmap- An object mapping each hour of the day (0-23) to the count of messages sent during that hour.totalMessages- The total number of messages fetched and analyzed (up to 100).
Dependencies
- Discord API access via a bot token credential
Troubleshooting
- Ensure the provided Guild ID and Channel ID are correct and that the bot has access to the specified channel; otherwise, the node will throw errors about channel not found or access issues.
- The channel must be a text-based channel; voice or category channels are not supported and will cause errors.
- The operation fetches up to 100 messages due to Discord API limitations; for larger datasets, multiple executions or different approaches are needed.
Links
- Discord API - Get Channel Messages - Official Discord API documentation for fetching messages from a channel, which this node operation uses.