Skip to main content

Module reactions

Module reactions 

Source
Expand description

InputReactions: typed parameter for reacting to messages.

API.

ยงExamples

use layer_client::reactions::InputReactions;

// Simple emoji
InputReactions::emoticon("๐Ÿ‘");

// Custom emoji (premium)
InputReactions::custom_emoji(1234567890);

// Remove all reactions
InputReactions::remove();

// Multi-reaction
use layer_tl_types::enums::Reaction;
InputReactions::from(vec![
Reaction::Emoji(layer_tl_types::types::ReactionEmoji { emoticon: "๐Ÿ‘".into() }),
Reaction::Emoji(layer_tl_types::types::ReactionEmoji { emoticon: "โค๏ธ".into() }),
]);

// Chained modifiers
InputReactions::emoticon("๐Ÿ”ฅ").big().add_to_recent();

Structsยง

InputReactions
A set of reactions to apply to a message.