Webhooks
This wiki explains how to create and use webhooks in BDFD.
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
$webhookCreate[]$webhookSend[]$webhookDelete[]$webhookAvatarURL[]$webhookUsername[]$webhookTitle[]$webhookDescription[]$webhookFooter[]$webhookContent[]$webhookColor[]
Support Functions Used
$webhookCreate
Creates and returns the URL of the newly created webhook.
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 🤖]
How $channelID works?
You can use $var[] or other variable functions to store the Webhook URL.
$var[Webhook;$webhookCreate[$channelID;Secret]]
Created and saved!
How
$var[]and$channelIDworks?
$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]
How $webhookCreate[], $channelID and $var[] works?
$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!
How $webhookCreate[], $channelID and $var[] works?
$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!
How $webhookCreate[], $channelID, $var[] and $authorAvatar works?
$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!
How $webhookCreate[], $channelID and $var[] works?
$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]
How $webhookCreate[], $channelID and $var[] works?
$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.]
How $webhookCreate[], $channelID and $var[] works?
$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]
How $webhookCreate[], $channelID and $var[] works?
$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!]
How $webhookCreate[], $channelID and $var[] works?
$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.]
How $webhookCreate[], $webhookDescriprion[], $channelID, $var[] works?
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]
How $authorAvatar works?