send_webhook_plot_code: Send Plot Code via Webhook

Description Usage Arguments Value See Also Examples

View source: R/send_functions.R

Description

Runs and saves the plot code provided. In order to save and send the file, a random name for the image will be generated and saved temporarily.

Usage

1
2
3
4
5
send_webhook_plot_code(
  ...,
  conn = get_default_discord_connection(),
  filename = tempfile(pattern = "discordr", fileext = ".png")
)

Arguments

...

Plot code to run and save

conn

Discord Connection Object containing Webhook and Username

filename

Optional - Filepath indicating where to save image; Provide to manually override the temporary directory and filename

Value

None

See Also

send_webhook_ggplot, send_webhook_file, send_webhook_message, send_webhook_console

Examples

1
2
3
4
## Not run: 
send_plot_code(plot(rnorm(5), rnorm(5), conn = conn_obj))()

## End(Not run)

jljsio/discordr documentation built on Dec. 21, 2021, 1:08 a.m.