LemonChannels.Adapters.Discord.Outbound (lemon_channels v0.1.0)

View Source

Outbound message delivery for Discord.

Summary

Functions

Add a reaction emoji to a message.

Remove bot's own reaction from a message.

Edit a message updating content and/or components.

Send a message with components (buttons, select menus).

Functions

create_reaction(channel_id, message_id, emoji)

@spec create_reaction(integer(), integer(), binary()) ::
  {:ok, term()} | {:error, term()}

Add a reaction emoji to a message.

delete_own_reaction(channel_id, message_id, emoji)

@spec delete_own_reaction(integer(), integer(), binary()) :: :ok | {:error, term()}

Remove bot's own reaction from a message.

deliver(payload)

@spec deliver(LemonChannels.OutboundPayload.t()) :: {:ok, term()} | {:error, term()}

edit_with_components(channel_id, message_id, content, components)

@spec edit_with_components(integer(), integer(), binary(), list()) ::
  {:ok, map()} | {:error, term()}

Edit a message updating content and/or components.

send_with_components(channel_id, content, components, opts \\ [])

@spec send_with_components(integer(), binary(), list(), keyword()) ::
  {:ok, map()} | {:error, term()}

Send a message with components (buttons, select menus).