Package blue.starry.penicillin.endpoints.welcomemessages

Functions

Link copied to clipboard
fun WelcomeMessages.create(    messageData: JsonObject,     name: String? = null,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Creates a new Welcome Message that will be stored and sent in the future from the authenticating user in defined circumstances. Returns the message template if successful. Supports publishing with the same elements as Direct Messages (e.g. Quick Replies, media attachments). Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically. See the Welcome Messages overview to learn how to work with Welcome Messages.

Link copied to clipboard
fun WelcomeMessages.delete(id: Long, vararg options: Option): EmptyApiAction

Deletes a Welcome Message by the given id.

Link copied to clipboard
fun WelcomeMessages.list(    count: Int? = null,     cursor: String? = null,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.List>

Returns a list of Welcome Messages.

Link copied to clipboard
fun WelcomeMessages.show(id: Long, vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Returns a Welcome Message by the given id.

Link copied to clipboard
fun WelcomeMessages.update(    id: String,     messageData: JsonObject,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Updates a Welcome Message by the given ID. Updates to the welcome_message object are atomic. For example, if the Welcome Message currently has quick_reply defined and you only provide text, the quick_reply object will be removed from the Welcome Message.

Properties

Link copied to clipboard

Shorthand property to WelcomeMessages.list.