Discord Tools icon

Discord Tools

Discord utility tools - Message fetching, user info, and more

Overview

This node operation allows searching for messages containing specific text within a specified Discord channel in a guild (server). It supports filtering options such as including bot messages, case sensitivity, exact match, and message ID boundaries (before or after a certain message). This is useful for finding relevant messages quickly in active channels, for example, to locate announcements, user feedback, or specific discussions.

Use Case Examples

  1. Search for messages containing the word 'update' in a channel to find recent announcements.
  2. Find exact matches of a keyword in a channel's message history, excluding bot messages.
  3. Retrieve messages mentioning a specific user by searching for their user ID.

Properties

Name Meaning
Guild ID The ID of the Discord server (guild) where the channel is located. Required to identify the server context for the search.
Channel ID The ID of the channel within the guild where the messages will be searched. Required to specify the search location.
Limit The maximum number of messages to fetch and search through, with a maximum of 100 messages.
Search Text The text string to search for within the messages in the specified channel.
Additional Options Optional parameters to refine the search, including whether to include bot messages, search case sensitivity, exact match requirement, and message ID boundaries (before or after a specific message).

Output

JSON

  • id - The unique ID of the message.
  • content - The text content of the message.
  • author
    • id - The ID of the message author.
    • username - The username of the message author.
    • bot - Boolean indicating if the author is a bot.
  • channelId - The ID of the channel where the message was posted.
  • createdTimestamp - Timestamp when the message was created.

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.
  • The limit parameter cannot exceed 100 due to Discord API restrictions.
  • If no messages are found, verify the search text and additional options such as case sensitivity and exact match settings.
  • Common errors include 'Channel not found' if the channel ID is invalid or the bot lacks permissions, and 'Invalid channel type' if the channel is not text-based.

Links

Discussion