Get Server Webhooks

LoopWebhooks

Get all webhooks in a server.

  • Loop block: the blocks placed inside it run once for each item, and can use the current item's outputs.

Inputs

Server IDRequired

ID of the server to get webhooks from.

Loop Body

Blocks to run for each webhook.

Holds blocks

Outputs

Iteration Number

Current iteration (1-based).

Example: 1

Total Iterations

Total number of iterations.

Example: 3

Webhook ID

ID of the webhook.

Webhook Name

Name of the webhook.

Channel ID

Channel ID the webhook belongs to.

Server ID

Server ID the webhook belongs to.

Webhook Token

Token of the webhook (may be empty).

Webhook Type

Type of the webhook (1 = Incoming, 2 = Channel Follower, 3 = Application).

Application ID

Application ID that created the webhook (if applicable).

Build a bot using blocks like Get Server Webhooks

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: get_server_webhooks
  • Loop block: write for item := range get_server_webhooks(Args{...}) { ... } and read the current item's outputs from item. See loops.

Inputs

FieldInventScript nameValue
Server IDserver_id
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
Iteration Numberiteration_numbere.g. "1"
Total Iterationstotal_iterationse.g. "3"
Webhook IDwebhook_id
Webhook Namewebhook_name
Channel IDwebhook_channel_id
Server IDwebhook_guild_id
Webhook Tokenwebhook_token
Webhook Typewebhook_type
Application IDwebhook_application_id

Example InventScript

for serverWebhook := range get_server_webhooks(Args{server_id: trigger.server_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Webhook ID: " + serverWebhook.webhook_id,
	})
}

More webhooks blocks