Skip to content

Commit

Permalink
Small docs changes
Browse files Browse the repository at this point in the history
Desiders committed Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 283929c commit 88f172a
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions telers/src/enums.rs
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
//!
//! This module contains enums for:
//! - [`BotCommandScopeType`]: Scope of bot commands, which is used in [`BotCommandScope`].
//! - [`ChatAction`]: Type of action to broadcast.
//! - [`ChatAction`]: Type of action.
//! - [`ChatMemberStatus`]: Status of a chat member.
//! - [`ChatType`]: Type of a chat.
//! - [`ContentType`]: Type of a content.
//! - [`ContentType`]: Type of the message content.
//! - [`DiceEmoji`]: Emoji on which the dice throw animation is based.
//! - [`InlineQueryResultType`]: Type of the result, which is used in [`InlineQueryResult`].
//! - [`InputMediaType`]: Type of the media to send, which is used in [`InputMedia`].
2 changes: 1 addition & 1 deletion telers/src/filters.rs
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
//! You can create a filter with `new` method with transferring all necessary data at once, or use [`CommandBuilder`] to create a filter step by step.
//! Instead of [`CommandBuilder`] you can use [`Command`] `one`, `one_with_prefix`, `many`, `many_with_prefix` methods.
//! * [`ContentType`]:
//! Filter for checking the type of content.
//! Filter for checking the type of the message content.
//! Usually used with [`ContentTypeEnum`] (or its string representation) to check the type of content.
//! Creates with `one` or `many` methods.
//! * [`State`]:
6 changes: 6 additions & 0 deletions telers/src/filters/base.rs
Original file line number Diff line number Diff line change
@@ -9,6 +9,12 @@ use crate::{
use async_trait::async_trait;
use std::{future::Future, sync::Arc};

/// Filters are used to filter updates before processing handlers and inner middlewares.
/// You can use filters to check if the update meets the necessary conditions,
/// and if it does, the update will be processed by the handler(s) and/or inner middleware(s).
/// # Notes
/// Check out the examples to see how to create your own filters and check ready-made implementations of filters
/// to avoid writing your own filters which are already implemented.
#[async_trait]
pub trait Filter<Client = Reqwest>: Send + Sync {
/// Check if the filter passes

0 comments on commit 88f172a

Please sign in to comment.