mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Collapse and show the endpoints in the docs
If we remove empty lines between these endpoints, we'll make the code shorter. Additionally, since we do no longer need `AutoSend`, the code is also a bit less convoluted.
This commit is contained in:
parent
00efbe163a
commit
94e6f0bd4d
1 changed files with 1 additions and 11 deletions
|
@ -102,10 +102,7 @@
|
||||||
//! -- no problem, reuse [`dptree::Handler::filter`], [`dptree::case!`], and
|
//! -- no problem, reuse [`dptree::Handler::filter`], [`dptree::case!`], and
|
||||||
//! other combinators in the same way!
|
//! other combinators in the same way!
|
||||||
//!
|
//!
|
||||||
//! Finally, we define our endpoints via simple `async` functions like this:
|
//! Finally, we define our endpoints:
|
||||||
//!
|
|
||||||
//! <details>
|
|
||||||
//! <summary>Show the endpoints</summary>
|
|
||||||
//!
|
//!
|
||||||
//! ```no_run
|
//! ```no_run
|
||||||
//! # use teloxide::Bot;
|
//! # use teloxide::Bot;
|
||||||
|
@ -119,23 +116,18 @@
|
||||||
//! async fn start(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
//! async fn start(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
||||||
//! todo!()
|
//! todo!()
|
||||||
//! }
|
//! }
|
||||||
//!
|
|
||||||
//! async fn help(bot: Bot, msg: Message) -> HandlerResult {
|
//! async fn help(bot: Bot, msg: Message) -> HandlerResult {
|
||||||
//! todo!()
|
//! todo!()
|
||||||
//! }
|
//! }
|
||||||
//!
|
|
||||||
//! async fn cancel(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
//! async fn cancel(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
||||||
//! todo!()
|
//! todo!()
|
||||||
//! }
|
//! }
|
||||||
//!
|
|
||||||
//! async fn invalid_state(bot: Bot, msg: Message) -> HandlerResult {
|
//! async fn invalid_state(bot: Bot, msg: Message) -> HandlerResult {
|
||||||
//! todo!()
|
//! todo!()
|
||||||
//! }
|
//! }
|
||||||
//!
|
|
||||||
//! async fn receive_full_name(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
//! async fn receive_full_name(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
|
||||||
//! todo!()
|
//! todo!()
|
||||||
//! }
|
//! }
|
||||||
//!
|
|
||||||
//! async fn receive_product_selection(
|
//! async fn receive_product_selection(
|
||||||
//! bot: Bot,
|
//! bot: Bot,
|
||||||
//! q: CallbackQuery,
|
//! q: CallbackQuery,
|
||||||
|
@ -146,8 +138,6 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! </details>
|
|
||||||
//!
|
|
||||||
//! Each parameter is supplied as a dependency by teloxide. In particular:
|
//! Each parameter is supplied as a dependency by teloxide. In particular:
|
||||||
//! - `bot: Bot` comes from the dispatcher (see below)
|
//! - `bot: Bot` comes from the dispatcher (see below)
|
||||||
//! - `msg: Message` comes from [`Update::filter_message`]
|
//! - `msg: Message` comes from [`Update::filter_message`]
|
||||||
|
|
Loading…
Reference in a new issue