mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Support reacting literally with non-Emojis (#320)
This commit is contained in:
parent
6d80b516f8
commit
d44961c461
3 changed files with 54 additions and 30 deletions
12
src/base.rs
12
src/base.rs
|
@ -152,7 +152,11 @@ pub enum MessageAction {
|
|||
Edit,
|
||||
|
||||
/// React to a message with an Emoji.
|
||||
React(String),
|
||||
///
|
||||
/// `:react` will by default try to convert the [String] argument to an Emoji, and error when
|
||||
/// it doesn't recognize it. The second [bool] argument forces it to be interpreted literally
|
||||
/// when it is `true`.
|
||||
React(String, bool),
|
||||
|
||||
/// Redact a message, with an optional reason.
|
||||
///
|
||||
|
@ -166,7 +170,11 @@ pub enum MessageAction {
|
|||
///
|
||||
/// If no specific Emoji to remove to is specified, then all reactions from the user on the
|
||||
/// message are removed.
|
||||
Unreact(Option<String>),
|
||||
///
|
||||
/// Like `:react`, `:unreact` will by default try to convert the [String] argument to an Emoji,
|
||||
/// and error when it doesn't recognize it. The second [bool] argument forces it to be
|
||||
/// interpreted literally when it is `true`.
|
||||
Unreact(Option<String>, bool),
|
||||
}
|
||||
|
||||
/// The type of room being created.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue