Instance Method

executeWebhook(_:token:with:then:)

Executes a webhook

Declaration

func executeWebhook(_ webhookId: Snowflake, token webhookToken: String, with content: Any, then completion: ((RequestError?) -> Void)? = nil)

Parameters

webhookId

Webhook to execute

webhookToken

Token for auth to execute

content

String or dictionary containing message content

Content Params

  • content: Message to send

  • username: The username the webhook will send with the message

  • avatar_url: The url of the user the webhook will send

  • tts: Whether or not this message is tts

  • file: The url of the image to send

  • embeds: Array of embed objects to send. Refer to Embed structure