Skip to content

Webhook

Implementation of the Discord Webhook class in Luau

https://discord.com/developers/docs/resources/webhook#webhook-object

Properties

id

Webhook.id  :: string

The unique identifier for this webhook.

type

Webhook.type  :: apiTypes.WebhookType

The type of webhook, indicating its source and behavior.

guildId

Webhook.guildId  :: string?

The ID of the guild this webhook belongs to, if it’s a server webhook.

channelId

Webhook.channelId  :: string?

The ID of the channel this webhook is associated with.

user

Webhook.user  :: Classes.User?

The user who created this webhook.

name

Webhook.name  :: string?

The name of the webhook.

avatar

Webhook.avatar  :: string?

The avatar hash of the webhook.

token

Webhook.token  :: string?

The token used to authenticate webhook requests.

applicationId

Webhook.applicationId  :: string?

The ID of the application that created this webhook.

url

Webhook.url  :: string?

The URL used to execute this webhook.

Methods

The Webhook instance has no set methods!

Functions

sync

Webhook . sync (

     self: Webhook
     webhookData: apiTypes.WebhookObject
)  -> ()

Responsible for syncing data to this webhook object. This is typically called by the API when this object is created or updated.

new

Webhook . new (

     webhookData: apiTypes.WebhookObject
)  -> ()

Responsible for constructing this class.