Discord Tools icon

Discord Tools

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

Overview

This node operation fetches all webhooks in a specified Discord channel within a guild (server). It connects to the Discord API using a bot token, retrieves the channel by its ID, verifies the channel belongs to the specified guild, and then fetches all webhooks associated with that channel. This is useful for managing or auditing webhooks in Discord channels, such as listing webhook URLs, owners, and other metadata.

Use Case Examples

  1. Listing all webhooks in a marketing channel to audit integrations.
  2. Fetching webhooks in a support channel to manage automated responses.

Properties

Name Meaning
Guild ID The ID of the Discord server (guild) where the channel is located.
Channel ID The ID of the channel from which to fetch webhooks.
Additional Options Optional parameters for other operations but not used in 'Get Webhooks' operation.

Output

JSON

  • id - Webhook ID
  • name - Webhook name
  • avatar - Webhook avatar hash or null if none
  • channelId - ID of the channel the webhook belongs to
  • guildId - ID of the guild (server) the webhook belongs to
  • owner
    • id - ID of the webhook owner user
    • username - Username of the webhook owner user
  • token - Webhook token used for authentication
  • url - Webhook URL for sending messages

Dependencies

  • Discord API accessed via discord.js library
  • An API key credential for Discord bot authentication

Troubleshooting

  • Ensure the bot token credential is valid and has permissions to access the specified guild and channel.
  • Verify that the provided Guild ID and Channel ID are correct and that the channel belongs to the guild.
  • Check that the bot has the 'Manage Webhooks' permission in the channel to fetch webhooks.
  • If the channel does not support webhooks, the node will throw an error indicating this limitation.

Links

Discussion