mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-11 12:31:14 +01:00
added docs
This commit is contained in:
parent
b528c1c40d
commit
c1856ff6ce
2 changed files with 26 additions and 0 deletions
|
@ -1,6 +1,19 @@
|
||||||
use crate::dispatching::Filter;
|
use crate::dispatching::Filter;
|
||||||
use crate::types::Message;
|
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 {
|
pub struct MessageCaptionFilter {
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
use crate::dispatching::Filter;
|
use crate::dispatching::Filter;
|
||||||
use crate::types::Message;
|
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 {
|
pub struct MessageTextFilter {
|
||||||
text: String,
|
text: String,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue