mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
commit
20d461f771
5 changed files with 14 additions and 12 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
|||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly-2022-02-02
|
||||
toolchain: nightly-2022-05-06
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
|
@ -37,7 +37,7 @@ jobs:
|
|||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly-2022-02-02
|
||||
toolchain: nightly-2022-05-06
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
|
@ -65,7 +65,7 @@ jobs:
|
|||
toolchain: beta
|
||||
features: "--features full"
|
||||
- rust: nightly
|
||||
toolchain: nightly-2022-01-17
|
||||
toolchain: nightly-2022-05-06
|
||||
features: "--all-features"
|
||||
- rust: msrv
|
||||
toolchain: "1.58.0"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
- **Declarative design.** teloxide is based upon [`dptree`], a functional [chain of responsibility] pattern that allows you to express pipelines of message processing in a highly declarative and extensible style.
|
||||
|
||||
[`dptree`]: https://github.com/p0lunin/dptree
|
||||
[`dptree`]: https://github.com/teloxide/dptree
|
||||
[chain of responsibility]: https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern
|
||||
|
||||
- **Dialogues management subsystem.** Our dialogues management subsystem is simple and easy-to-use, and, furthermore, is agnostic of how/where dialogues are stored. For example, you can just replace a one line to achieve [persistence]. Out-of-the-box storages include [Redis] and [Sqlite].
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[toolchain]
|
||||
channel = "nightly-2022-02-02"
|
||||
channel = "nightly-2022-05-06"
|
||||
components = ["rustfmt", "clippy"]
|
||||
profile = "minimal"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
//! A full-featured framework that empowers you to easily build [Telegram bots]
|
||||
//! using the [`async`/`.await`] syntax in [Rust]. It handles all the difficult
|
||||
//! stuff so you can focus only on your business logic.
|
||||
//! using [Rust]. It handles all the difficult stuff so you can focus only on
|
||||
//! your business logic.
|
||||
//!
|
||||
//! For a high-level overview, see [our GitHub repository](https://github.com/teloxide/teloxide).
|
||||
//!
|
||||
//! ([Full](https://github.com/teloxide/teloxide/blob/master/examples/throw_dice.rs))
|
||||
//! [[`examples/throw_dice.rs`](https://github.com/teloxide/teloxide/blob/master/examples/throw_dice.rs)]
|
||||
//! ```no_run
|
||||
//! use teloxide::prelude::*;
|
||||
//!
|
||||
|
@ -25,7 +25,7 @@
|
|||
//!
|
||||
//! <div align="center">
|
||||
//! <kbd>
|
||||
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/DICES_BOT.gif />
|
||||
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/throw-dice.gif width=420px />
|
||||
//! </kbd>
|
||||
//! </div>
|
||||
//!
|
||||
|
|
|
@ -160,8 +160,10 @@ pub use teloxide_macros::BotCommands;
|
|||
/// All variant attributes override the corresponding `enum` attributes.
|
||||
///
|
||||
/// 1. `#[command(rename = "rule")]`
|
||||
/// Rename one command by a rule. Allowed rules are `lowercase`, `%some_name%`,
|
||||
/// where `%some_name%` is any string, a new name.
|
||||
/// Rename one command by a rule. Allowed rules are `lowercase`, `UPPERCASE`,
|
||||
/// `PascalCase`, `camelCase`, `snake_case`, `SCREAMING_SNAKE_CASE`,
|
||||
/// `kebab-case`, `SCREAMING-KEBAB-CASE`, and `%some_name%`, where `%some_name%`
|
||||
/// is any string, a new name.
|
||||
///
|
||||
/// 2. `#[command(description = "description")]`
|
||||
/// Give your command a description. Write `"off"` for `"description"` to hide a
|
||||
|
@ -323,7 +325,7 @@ impl<'a> CommandDescriptions<'a> {
|
|||
/// assert_eq!(
|
||||
/// descriptions.username("username_of_the_bot").to_string(),
|
||||
/// "/start@username_of_the_bot — start this bot\n/help@username_of_the_bot — show this \
|
||||
/// message"
|
||||
/// message"
|
||||
/// );
|
||||
/// ```
|
||||
pub fn username(self, bot_username: &'a str) -> Self {
|
||||
|
|
Loading…
Reference in a new issue