Lingo.Api.Reaction (Lingo v0.4.2)

Copy Markdown View Source

Message reactions. Emojis are unicode characters or name:id for custom ones.

Every function returns {:ok, result}, :ok when Discord sends no body, or {:error, %Lingo.Error{}}. Calls go to the current bot (see Lingo.with_bot/2).

Summary

Functions

Reacts to a message, with a unicode emoji or name:id for a custom one.

Removes every reaction from a message.

Removes every reaction with one emoji from a message.

Removes the bot's reaction.

Removes another user's reaction.

Lists the users who reacted with an emoji.

Functions

create(channel_id, message_id, emoji)

Reacts to a message, with a unicode emoji or name:id for a custom one.

delete_all(channel_id, message_id)

@spec delete_all(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result()

Removes every reaction from a message.

delete_all_for_emoji(channel_id, message_id, emoji)

@spec delete_all_for_emoji(
  Lingo.Api.id(),
  Lingo.Api.id(),
  String.t() | Lingo.Type.Emoji.t()
) ::
  Lingo.Api.result()

Removes every reaction with one emoji from a message.

delete_own(channel_id, message_id, emoji)

Removes the bot's reaction.

delete_user(channel_id, message_id, emoji, user_id)

Removes another user's reaction.

list_users(channel_id, message_id, emoji, opts \\ [])

Lists the users who reacted with an emoji.