diff --git a/src/dispatching/dispatchers/filter/filters/message_caption.rs b/src/dispatching/dispatchers/filter/filters/message_caption.rs index f68d0837..ccb956f1 100644 --- a/src/dispatching/dispatchers/filter/filters/message_caption.rs +++ b/src/dispatching/dispatchers/filter/filters/message_caption.rs @@ -1,6 +1,19 @@ use crate::dispatching::Filter; use crate::types::Message; +/// Filter which compare caption of media with another text. +/// Returns true if the caption of media is equal to another text, otherwise false. +/// +/// NOTE: filter compares only caption of media, does not compare text of message! +/// +/// If you want to compare text of message use +/// [MessageTextFilter] +/// +/// If you want to compare text and caption use +/// [MessageTextCaptionFilter] +/// +/// [MessageTextFilter]: telebofr::dispatching::dispatchers::filter::filters::MessageTextFilter +/// [MessageTextCaptionFilter]: telebofr::dispatching::dispatchers::filter::filters::MessageTextCaptionFilter pub struct MessageCaptionFilter { text: String, } diff --git a/src/dispatching/dispatchers/filter/filters/message_text.rs b/src/dispatching/dispatchers/filter/filters/message_text.rs index 765c149e..01da11af 100644 --- a/src/dispatching/dispatchers/filter/filters/message_text.rs +++ b/src/dispatching/dispatchers/filter/filters/message_text.rs @@ -1,6 +1,19 @@ use crate::dispatching::Filter; use crate::types::Message; +/// Filter which compare message text with another text. +/// Returns true if the message text is equal to another text, otherwise false. +/// +/// NOTE: filter compares only text message, does not compare caption of media! +/// +/// If you want to compare caption use +/// [MessageCaptionFilter] +/// +/// If you want to compare text and caption use +/// [MessageTextCaptionFilter] +/// +/// [MessageCaptionFilter]: telebofr::dispatching::dispatchers::filter::filters::MessageCaptionFilter +/// [MessageTextCaptionFilter]: telebofr::dispatching::dispatchers::filter::filters::MessageTextCaptionFilter pub struct MessageTextFilter { text: String, }