Webhooks

This wiki explains how to create and use webhooks in BDFD.

Warning

In this wiki we use functions that only work on BDScript 2. We recommend you to use the same script language to avoid problems with examples.

Content

Functions Used > $webhookCreate[] > $webhookSend[] > $webhookDelete[] > $webhookAvatarURL[] > $webhookUsername[] > $webhookTitle[] > $webhookDescription[] > $webhookFooter[] > $webhookContent[] > $webhookColor[] > Beautiful Webhook

Functions Used

Support Functions Used

$webhookCreate

Creates and returns the URL of the newly created webhook.

Danger

Webhook URLs should be kept private, don’t share them!

Limit

Only 10 webhooks can be created per channel.

Syntax

$webhookCreate[Channel ID;Username;(Avatar URL)]

Parameters

  • Channel ID (Type: Snowflake || Flag: Required): The channel in which the webhook will be created.
  • Username (Type: String || Flag: Required): Name of the webhook that will be displayed in the channel.
  • Avatar URL (Type: String || Flag: Vacantable): Avatar of the webhook that will be displayed in the channel.

Example

$nomention
$webhookCreate[$channelID;BDFD Webhook 🤖]
!example 1234abcd567ABCDEFG890H_654679203GDGJEMFNXH.6479304948

What is this?

How $channelID works?

Tip

You can use $var[] or other variable functions to store the Webhook URL.

$var[Webhook;$webhookCreate[$channelID;Secret]]
Created and saved!
!example Created and saved!

How $var[] and $channelID works?

$webhookSend

Sends message as the webhook.

Syntax

$webhookSend[Webhook URL;(Content;Title;Title URL;Description;Color hex;Author;Author icon URL;Footer;Footer icon URL;Thumbnail URL;Image URL;Add timestamp?)]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.

  • Content (Type: String || Flag: Vacantable): The text that is shown above the embed.

  • Title (Type: String || Flag: Vacantable): The text that will be used as the title.

  • Title URL (Type: URL || Flag: Vacantable): The URL that will be applied to the title.

  • Description (Type: String || Flag: Vacantable): The description that will be applied to the embed.

  • Color hex (Type: Color || Flag: Vacantable): The color hex to set the embed border color as. You can also use color integer number.

  • Author (Type: String || Flag: Vacantable ): The text that appears at the author.

  • Author icon (Type: URL || Flag: Vacantable): The image that appears next to the author.

  • Footer (Type: String || Flag: Vacantable): The text to set the footer as.

  • Footer icon (Type: URL || Flag: Vacantable): The image that appears next to the footer.

  • Thumbnail (Type: URL || Flag: Vacantable): The image to set as the thumbnail.

  • Image (Type: URL || Flag: Vacantable): The image that appears above the footer.

  • Add timestamp? (Type: Bool || Flag: Vacantable): Adds a timestamp to the footer.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookSend[$var[webhook];I'm the best webhook;Title;;It's a description!;#673ab7;;;;;;false]
!example I'm the best webhook It's a description! Footer Text Here

What is this?

$webhookDelete

Deletes the webhook.

Syntax

$webhookDelete[Webhook URL]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to delete.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookDelete[$var[webhook]]
Deleted!
!example Deleted!

What is this?

$webhookAvatarURL

Changes the webhook’s avatar.

Syntax

$webhookAvatarURL[Webhook URL;New avatar URL]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to modify.
  • New avatar URL (Type: URL || Flag: Required): The new avatar image URL for the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookAvatarURL[$var[webhook];$authorAvatar]
New avatar for webhook!
!example New avatar for webhook!

What is this?

$webhookUsername

Changes the webhook’s username.

Syntax

$webhookUsername[Webhook URL;New username]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to modify.
  • New username (Type: String || Flag: Required): The new username for the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookUsername[$var[webhook];BDFD Support]
New username for webhook!
!example New username for webhook!

What is this?

$webhookTitle

Adds title to the webhook.

Syntax

$webhookTitle[Webhook URL;Text]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.
  • Text (Type: String || Flag: Required): The title text to add to the embed of the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookTitle[$var[webhook];My Webhook Title]
!example

What is this?

$webhookDescription

Adds description to the webhook.

Syntax

$webhookDescription[Webhook URL;Text]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.
  • Text (Type: String || Flag: Required): The description text to add to the embed of the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookDescription[$var[webhook];This is a detailed description for my webhook.]
!example This is a detailed description for my webhook.

What is this?

$webhookFooter

Adds footer to the webhook.

Syntax

$webhookFooter[Webhook URL;Text]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.
  • Text (Type: String || Flag: Required): The footer text to add to the embed of the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookFooter[$var[webhook];Footer Text Here]
!example Footer Text Here

What is this?

$webhookContent

Adds content to the webhook.

Syntax

$webhookContent[Webhook URL;Text]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.
  • Text (Type: String || Flag: Required): The content text to add to the webhook.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookContent[$var[webhook];Hello from my webhook!]
!example Hello from my webhook!

What is this?

$webhookColor

Adds color to the webhook.

Syntax

$webhookColor[Webhook URL;Color hex]

Parameters

  • Webhook URL (Type: URL || Flag: Required): The URL of the webhook you want to use.
  • Color hex (Type: Color || Flag: Required): The color hex to set the embed border color as. You can also use color integer number.

Example

$nomention
$var[webhook;$webhookCreate[$channelID;Test webhook]]
$webhookColor[$var[webhook];#673ab7]
$webhookDescription[⬅️ Embed border color.] 
!example ⬅️ Embed border color.

Beautiful webhook

Here is one example of how to use a webhook.

$nomention
$var[webhook;$webhookCreate[$channelID;I'm webhook 😎;$authorAvatar]]
$webhookContent[$var[webhook];👇 Read before chatting]
$webhookTitle[$var[webhook];📚 Rules]
$webhookDescription[$var[webhook];Just be cool!]
$webhookFooter[$var[webhook];Made by BDFD]
$webhookColor[$var[webhook];#673ab7]
!example 👇 Read before chatting Just be cool! Made by BDFD

What is this?

How $authorAvatar works?