webhook_send_message | R Documentation |
Send a message via a webhook
webhook_send_message(
webhook_url = NULL,
message = NULL,
username = NULL,
embeds = NULL,
avatar_url = NULL,
...
)
webhook_url |
A valid webhook URL as copied from a server's webhook settings screen. |
message |
Character string of message to send, limited to 2000 characters. |
username |
Discord username to display with the message. |
embeds |
Embedded objects created via |
avatar_url |
A valid URL to an avatar to be displayed with the username. |
... |
Other arguments passed to JSON/Form Params. |
Nothing
https://discord.com/developers/docs/resources/webhook#execute-webhook
## Not run:
webhook_url <- "https://discordapp.com/api/webhooks/<id>/<token>"
webhook_send_message(
webhook_url = webhook_url,
message = "Hello world!"
)
# Embedding an image
webhook_send_message(
webhook_url = webhook_url,
username = "Gargamel",
message = "Hello there",
embeds = embeds(
description = "Just another mtcars",
embed_image(url = image_url, title = "WHEEEEE")
)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.