Support reacting literally with non-Emojis (#320)

This commit is contained in:
Ulyssa 2024-08-12 23:21:11 -07:00 committed by GitHub
parent 6d80b516f8
commit d44961c461
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 54 additions and 30 deletions

View file

@ -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.