This function is intended to set default parameters such as
message
or destination
inside a client as additional fields.
After setting default values the clients will be able to send messages
without passing additional arguments to the send_message
function.
set_fields(client, ...)
client | the client which will have default values set. |
---|---|
... | named arguments to set inside the client (non-named arguments will be ignored). |
Updated client.
Standard fields utilized in the package include:
message
destination
(apart from Slack service client)
verbose
any other set defaults won't have any effect.
Note: arguments to send_message
function are always
prioritized over the client fields.
client <- client_telegram("my_token") client <- set_fields(client, message = "Hello world!", destination = 12345) if (FALSE) { send_message(client) }