diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9b60d7eb..e990ad6a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec99c9a7..821e928f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased
+## 0.9.1 - 2022-05-27
+
+### Fixed
+
+ - Fix `#[command(rename = "...")]` for custom command names ([issue 633](https://github.com/teloxide/teloxide/issues/633)).
+
## 0.9.0 - 2022-04-27
### Added
diff --git a/Cargo.toml b/Cargo.toml
index 25c9bde4..f5f91e99 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "teloxide"
-version = "0.9.0"
+version = "0.9.1"
edition = "2021"
description = "An elegant Telegram bots framework for Rust"
repository = "https://github.com/teloxide/teloxide"
@@ -57,7 +57,7 @@ full = [
[dependencies]
teloxide-core = { version = "0.6.0", default-features = false }
-teloxide-macros = { version = "0.6.1", optional = true }
+teloxide-macros = { version = "0.6.2", optional = true }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
diff --git a/README.md b/README.md
index 3d53f0d1..0e758242 100644
--- a/README.md
+++ b/README.md
@@ -18,17 +18,17 @@
-
+
- A full-featured framework that empowers you to easily build [Telegram bots](https://telegram.org/blog/bot-revolution) using the [`async`/`.await`](https://rust-lang.github.io/async-book/01_getting_started/01_chapter.html) syntax in [Rust](https://www.rust-lang.org/). It handles all the difficult stuff so you can focus only on your business logic.
+ A full-featured framework that empowers you to easily build [Telegram bots](https://telegram.org/blog/bot-revolution) using [Rust](https://www.rust-lang.org/). It handles all the difficult stuff so you can focus only on your business logic.
## Highlights
- - **Declarative design.** teloxide is based upon [`dptree`], a functional-style [chain of responsibility] pattern that allows you to express pipelines of message processing in a highly declarative and extensible style.
+ - **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].
@@ -84,7 +84,7 @@ tokio = { version = "1.8", features = ["rt-multi-thread", "macros"] }
This bot replies with a dice throw to each received message:
-([Full](examples/throw_dice.rs))
+[[`examples/throw_dice.rs`](examples/throw_dice.rs)]
```rust,no_run
use teloxide::prelude::*;
@@ -121,7 +121,7 @@ Commands are strongly typed and defined declaratively, similar to how we define
[structopt]: https://docs.rs/structopt/0.3.9/structopt/
[serde-json]: https://github.com/serde-rs/json
-([Full](examples/command.rs))
+[[`examples/command.rs`](examples/command.rs)]
```rust,no_run
use teloxide::{prelude::*, utils::command::BotCommands};
@@ -188,7 +188,7 @@ A dialogue is typically described by an enumeration where each variant is one po
Below is a bot that asks you three questions and then sends the answers back to you:
-([Full](examples/dialogue.rs))
+[[`examples/dialogue.rs`](examples/dialogue.rs)]
```rust,ignore
use teloxide::{dispatching::dialogue::InMemStorage, prelude::*};
@@ -341,28 +341,28 @@ A: Yes, see [`examples/purchase.rs`](examples/purchase.rs).
Feel free to propose your own bot to our collection!
- - [WaffleLapkin/crate_upd_bot](https://github.com/WaffleLapkin/crate_upd_bot) -- A bot that notifies about crate updates.
- - [mxseev/logram](https://github.com/mxseev/logram) -- Utility that takes logs from anywhere and sends them to Telegram.
- - [alexkonovalov/PedigreeBot](https://github.com/alexkonovalov/PedigreeBot) -- A Telegram bot for building family trees.
- - [Hermitter/tepe](https://github.com/Hermitter/tepe) -- A CLI to command a bot to send messages and files over Telegram.
- - [mattrighetti/GroupActivityBot](https://github.com/mattrighetti/group-activity-bot-rs) -- Telegram bot that keeps track of user activity in groups.
- - [mattrighetti/libgen-bot-rs](https://github.com/mattrighetti/libgen-bot-rs) -- Telgram bot to interface with libgen
- - [dracarys18/grpmr-rs](https://github.com/dracarys18/grpmr-rs) -- A Telegram group manager bot with variety of extra features.
- - [steadylearner/subreddit_reader](https://github.com/steadylearner/Rust-Full-Stack/tree/master/commits/teloxide/subreddit_reader) -- A bot that shows the latest posts at Rust subreddit.
- - [myblackbeard/basketball-betting-bot](https://github.com/myblackbeard/basketball-betting-bot) -- The bot lets you bet on NBA games against your buddies.
- - [ArtHome12/vzmuinebot](https://github.com/ArtHome12/vzmuinebot) -- Telegram bot for food menu navigate.
- - [ArtHome12/cognito_bot](https://github.com/ArtHome12/cognito_bot) -- The bot is designed to anonymize messages to a group.
- - [pro-vim/tg-vimhelpbot](https://github.com/pro-vim/tg-vimhelpbot) -- Link `:help` for Vim in Telegram.
- - [sschiz/janitor-bot](https://github.com/sschiz/janitor-bot) -- A bot that removes users trying to join to a chat that is designed for comments.
- - [slondr/BeerHolderBot](https://gitlab.com/slondr/BeerHolderBot) -- A bot that holds your beer.
- - [MustafaSalih1993/Miss-Vodka-Telegram-Bot](https://github.com/MustafaSalih1993/Miss-Vodka-Telegram-Bot) -- A Telegram bot written in rust using "Teloxide" library.
- - [x13a/tg-prompt](https://github.com/x13a/tg-prompt) -- Telegram prompt.
- - [magnickolas/remindee-bot](https://github.com/magnickolas/remindee-bot) -- Telegram bot for managing reminders.
- - [cyberknight777/knight-bot](https://gitlab.com/cyberknight777/knight-bot) -- A Telegram bot with variety of fun features.
- - [wa7sa34cx/the-black-box-bot](https://github.com/wa7sa34cx/the-black-box-bot) -- This is the Black Box Telegram bot. You can hold any items in it.
- - [crapstone/hsctt](https://codeberg.org/crapstones-bots/hsctt) -- A Telegram bot that searches for HTTP status codes in all messages and replies with the text form.
- - [alenpaul2001/AurSearchBot](https://gitlab.com/alenpaul2001/aursearchbot) -- Telegram bot for searching AUR in inline mode.
- - [studiedlist/EddieBot](https://gitlab.com/studiedlist/eddie-bot) -- Chatting bot with several entertainment features
+ - [WaffleLapkin/crate_upd_bot](https://github.com/WaffleLapkin/crate_upd_bot) — A bot that notifies about crate updates.
+ - [mxseev/logram](https://github.com/mxseev/logram) — Utility that takes logs from anywhere and sends them to Telegram.
+ - [alexkonovalov/PedigreeBot](https://github.com/alexkonovalov/PedigreeBot) — A Telegram bot for building family trees.
+ - [Hermitter/tepe](https://github.com/Hermitter/tepe) — A CLI to command a bot to send messages and files over Telegram.
+ - [mattrighetti/GroupActivityBot](https://github.com/mattrighetti/group-activity-bot-rs) — Telegram bot that keeps track of user activity in groups.
+ - [mattrighetti/libgen-bot-rs](https://github.com/mattrighetti/libgen-bot-rs) — Telgram bot to interface with libgen
+ - [dracarys18/grpmr-rs](https://github.com/dracarys18/grpmr-rs) — A Telegram group manager bot with variety of extra features.
+ - [steadylearner/subreddit_reader](https://github.com/steadylearner/Rust-Full-Stack/tree/master/commits/teloxide/subreddit_reader) — A bot that shows the latest posts at Rust subreddit.
+ - [myblackbeard/basketball-betting-bot](https://github.com/myblackbeard/basketball-betting-bot) — The bot lets you bet on NBA games against your buddies.
+ - [ArtHome12/vzmuinebot](https://github.com/ArtHome12/vzmuinebot) — Telegram bot for food menu navigate.
+ - [ArtHome12/cognito_bot](https://github.com/ArtHome12/cognito_bot) — The bot is designed to anonymize messages to a group.
+ - [pro-vim/tg-vimhelpbot](https://github.com/pro-vim/tg-vimhelpbot) — Link `:help` for Vim in Telegram.
+ - [sschiz/janitor-bot](https://github.com/sschiz/janitor-bot) — A bot that removes users trying to join to a chat that is designed for comments.
+ - [slondr/BeerHolderBot](https://gitlab.com/slondr/BeerHolderBot) — A bot that holds your beer.
+ - [MustafaSalih1993/Miss-Vodka-Telegram-Bot](https://github.com/MustafaSalih1993/Miss-Vodka-Telegram-Bot) — A Telegram bot written in rust using "Teloxide" library.
+ - [x13a/tg-prompt](https://github.com/x13a/tg-prompt) — Telegram prompt.
+ - [magnickolas/remindee-bot](https://github.com/magnickolas/remindee-bot) — Telegram bot for managing reminders.
+ - [cyberknight777/knight-bot](https://gitlab.com/cyberknight777/knight-bot) — A Telegram bot with variety of fun features.
+ - [wa7sa34cx/the-black-box-bot](https://github.com/wa7sa34cx/the-black-box-bot) — This is the Black Box Telegram bot. You can hold any items in it.
+ - [crapstone/hsctt](https://codeberg.org/crapstones-bots/hsctt) — A Telegram bot that searches for HTTP status codes in all messages and replies with the text form.
+ - [alenpaul2001/AurSearchBot](https://gitlab.com/alenpaul2001/aursearchbot) — Telegram bot for searching AUR in inline mode.
+ - [studiedlist/EddieBot](https://gitlab.com/studiedlist/eddie-bot) — Chatting bot with several entertainment features.
## Contributing
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 7158d75f..43d17c19 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
-channel = "nightly-2022-02-02"
+channel = "nightly-2022-05-06"
components = ["rustfmt", "clippy"]
profile = "minimal"
diff --git a/src/dispatching/mod.rs b/src/dispatching.rs
similarity index 100%
rename from src/dispatching/mod.rs
rename to src/dispatching.rs
diff --git a/src/dispatching/dialogue/mod.rs b/src/dispatching/dialogue.rs
similarity index 100%
rename from src/dispatching/dialogue/mod.rs
rename to src/dispatching/dialogue.rs
diff --git a/src/dispatching/dialogue/storage/mod.rs b/src/dispatching/dialogue/storage.rs
similarity index 100%
rename from src/dispatching/dialogue/storage/mod.rs
rename to src/dispatching/dialogue/storage.rs
diff --git a/src/dispatching/repls/mod.rs b/src/dispatching/repls.rs
similarity index 100%
rename from src/dispatching/repls/mod.rs
rename to src/dispatching/repls.rs
diff --git a/src/features.txt b/src/features.txt
index 7edd2f39..32d737b3 100644
--- a/src/features.txt
+++ b/src/features.txt
@@ -15,7 +15,6 @@
| `cache-me` | Enables the [`CacheMe`](adaptors::CacheMe) bot adaptor. |
| `trace-adaptor` | Enables the [`Trace`](adaptors::Trace) bot adaptor. |
| `erased` | Enables the [`ErasedRequester`](adaptors::ErasedRequester) bot adaptor. |
-| `frunk` | Enables [`teloxide::utils::UpState`]. |
| `full` | Enables all the features except `nightly`. |
| `nightly` | Enables nightly-only features (see the [teloxide-core features]). |
diff --git a/src/lib.rs b/src/lib.rs
index f25e81a9..f53ed5c5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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 @@
//!
//!