added docs

This commit is contained in:
P0lunin 2019-10-23 19:21:48 +03:00
parent b528c1c40d
commit c1856ff6ce
2 changed files with 26 additions and 0 deletions

View file

@ -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,
}

View file

@ -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,
}