Fix links

This commit is contained in:
Temirkhan Myrzamadi 2020-02-14 18:28:52 +06:00
parent 41d1aebb1e
commit eebcda4dd8
6 changed files with 31 additions and 19 deletions

View file

@ -1,5 +1,5 @@
# Contributing # Contributing
Before contributing, please read our [the code style](https://github.com/teloxide/teloxide/blob/dev/CODE_STYLE.md). Before contributing, please read our [the code style](https://github.com/teloxide/teloxide/blob/master/CODE_STYLE.md).
To change the source code, fork this repository and work inside your own branch. Then send us a PR and wait for the CI to check everything. However, you'd better check changes first locally: To change the source code, fork this repository and work inside your own branch. Then send us a PR and wait for the CI to check everything. However, you'd better check changes first locally:

View file

@ -52,7 +52,7 @@ pretty_env_logger = "0.4.0"
## The ping-pong bot ## The ping-pong bot
This bot has a single message handler, which answers "pong" to each incoming message: This bot has a single message handler, which answers "pong" to each incoming message:
([Full](https://github.com/teloxide/teloxide/blob/dev/examples/ping_pong_bot/src/main.rs)) ([Full](https://github.com/teloxide/teloxide/blob/master/examples/ping_pong_bot/src/main.rs))
```rust ```rust
use teloxide::prelude::*; use teloxide::prelude::*;
@ -80,7 +80,7 @@ async fn main() {
## Commands ## Commands
Commands are defined similar to how we define CLI using [structopt](https://docs.rs/structopt/0.3.9/structopt/). This bot says "I am a cat! Meow!" on `/meow`, generates a random number within [0; 1) on `/generate`, and shows the usage guide on `/help`: Commands are defined similar to how we define CLI using [structopt](https://docs.rs/structopt/0.3.9/structopt/). This bot says "I am a cat! Meow!" on `/meow`, generates a random number within [0; 1) on `/generate`, and shows the usage guide on `/help`:
([Full](https://github.com/teloxide/teloxide/blob/dev/examples/simple_commands_bot/src/main.rs)) ([Full](https://github.com/teloxide/teloxide/blob/master/examples/simple_commands_bot/src/main.rs))
```rust ```rust
// Imports are omitted... // Imports are omitted...
@ -141,7 +141,7 @@ async fn main() {
## Guess a number ## Guess a number
Wanna see more? This is a bot, which starts a game on each incoming message. You must guess a number from 1 to 10 (inclusively): Wanna see more? This is a bot, which starts a game on each incoming message. You must guess a number from 1 to 10 (inclusively):
([Full](https://github.com/teloxide/teloxide/blob/dev/examples/guess_a_number_bot/src/main.rs)) ([Full](https://github.com/teloxide/teloxide/blob/master/examples/guess_a_number_bot/src/main.rs))
```rust ```rust
// Imports are omitted... // Imports are omitted...
@ -224,9 +224,9 @@ async fn main() {
<img src=https://github.com/teloxide/teloxide/raw/master/media/GUESS_A_NUMBER_BOT.png width="400" /> <img src=https://github.com/teloxide/teloxide/raw/master/media/GUESS_A_NUMBER_BOT.png width="400" />
</div> </div>
Our [finite automaton](https://en.wikipedia.org/wiki/Finite-state_machine), designating a user dialogue, cannot be in an invalid state. See [examples/dialogue_bot](https://github.com/teloxide/teloxide/blob/dev/examples/dialogue_bot/src/main.rs) to see a bit more complicated bot with dialogues. Our [finite automaton](https://en.wikipedia.org/wiki/Finite-state_machine), designating a user dialogue, cannot be in an invalid state. See [examples/dialogue_bot](https://github.com/teloxide/teloxide/blob/master/examples/dialogue_bot/src/main.rs) to see a bit more complicated bot with dialogues.
[See more examples](https://github.com/teloxide/teloxide/tree/dev/examples). [See more examples](https://github.com/teloxide/teloxide/tree/master/examples).
## Recommendations ## Recommendations
- Use this pattern: - Use this pattern:
@ -254,4 +254,4 @@ Our [finite automaton](https://en.wikipedia.org/wiki/Finite-state_machine), desi
The second one produces very strange compiler messages because of the `#[tokio::main]` macro. However, the examples in this README use the second variant for brevity. The second one produces very strange compiler messages because of the `#[tokio::main]` macro. However, the examples in this README use the second variant for brevity.
## Contributing ## Contributing
See [CONRIBUTING.md](https://github.com/teloxide/teloxide/blob/dev/CONTRIBUTING.md). See [CONRIBUTING.md](https://github.com/teloxide/teloxide/blob/master/CONTRIBUTING.md).

View file

@ -30,7 +30,7 @@
//! [`DialogueStage::Next`]: crate::dispatching::dialogue::DialogueStage::Next //! [`DialogueStage::Next`]: crate::dispatching::dialogue::DialogueStage::Next
//! [`CtxHandler`]: crate::dispatching::CtxHandler //! [`CtxHandler`]: crate::dispatching::CtxHandler
//! [`Dispatcher`]: crate::dispatching::Dispatcher //! [`Dispatcher`]: crate::dispatching::Dispatcher
//! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/dev/examples/dialogue_bot //! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/master/examples/dialogue_bot
#![allow(clippy::module_inception)] #![allow(clippy::module_inception)]
#![allow(clippy::type_complexity)] #![allow(clippy::type_complexity)]

View file

@ -44,7 +44,7 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! [Full](https://github.com/teloxide/teloxide/blob/dev/examples/ping_pong_bot/) //! [Full](https://github.com/teloxide/teloxide/blob/master/examples/ping_pong_bot/)
//! //!
//! ### Multiple handlers //! ### Multiple handlers
//! //!
@ -88,7 +88,7 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! [Full](https://github.com/teloxide/teloxide/blob/dev/examples/miltiple_handlers_bot/) //! [Full](https://github.com/teloxide/teloxide/blob/master/examples/miltiple_handlers_bot/)
//! //!
//! For a bit more complicated example, please see [examples/dialogue_bot]. //! For a bit more complicated example, please see [examples/dialogue_bot].
//! //!
@ -100,7 +100,7 @@
//! [`DialogueDispatcher`]: crate::dispatching::dialogue::DialogueDispatcher //! [`DialogueDispatcher`]: crate::dispatching::dialogue::DialogueDispatcher
//! [`DispatcherHandlerResult`]: crate::dispatching::DispatcherHandlerResult //! [`DispatcherHandlerResult`]: crate::dispatching::DispatcherHandlerResult
//! [`Bot`]: crate::Bot //! [`Bot`]: crate::Bot
//! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/dev/examples/dialogue_bot //! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/tree/master/examples/dialogue_bot
mod ctx_handlers; mod ctx_handlers;
pub mod dialogue; pub mod dialogue;

View file

@ -49,7 +49,7 @@
//! This bot has a single message handler, which answers "pong" to each incoming //! This bot has a single message handler, which answers "pong" to each incoming
//! message: //! message:
//! //!
//! ([Full](https://github.com/teloxide/teloxide/blob/dev/examples/ping_pong_bot/src/main.rs)) //! ([Full](https://github.com/teloxide/teloxide/blob/master/examples/ping_pong_bot/src/main.rs))
//! ```rust,no_run //! ```rust,no_run
//! use teloxide::prelude::*; //! use teloxide::prelude::*;
//! //!
@ -70,12 +70,16 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! <div align="center">
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/GUESS_A_NUMBER_BOT.png width="400" />
//! </div>
//!
//! ## Commands //! ## Commands
//! Commands are defined similar to how we define CLI using [structopt]. This //! Commands are defined similar to how we define CLI using [structopt]. This
//! bot says "I am a cat! Meow!" on `/meow`, generates a random number within //! bot says "I am a cat! Meow!" on `/meow`, generates a random number within
//! [0; 1) on `/generate`, and shows the usage guide on `/help`: //! [0; 1) on `/generate`, and shows the usage guide on `/help`:
//! //!
//! ([Full](https://github.com/teloxide/teloxide/blob/dev/examples/simple_commands_bot/src/main.rs)) //! ([Full](https://github.com/teloxide/teloxide/blob/master/examples/simple_commands_bot/src/main.rs))
//! ```rust,no_run //! ```rust,no_run
//! # use teloxide::{prelude::*, utils::command::BotCommand}; //! # use teloxide::{prelude::*, utils::command::BotCommand};
//! # use rand::{thread_rng, Rng}; //! # use rand::{thread_rng, Rng};
@ -142,11 +146,15 @@
//! } //! }
//! ``` //! ```
//! //!
//! <div align="center">
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/SIMPLE_COMMANDS_BOT.png width="400" />
//! </div>
//!
//! ## Guess a number //! ## Guess a number
//! Wanna see more? This is a bot, which starts a game on each incoming message. //! Wanna see more? This is a bot, which starts a game on each incoming message.
//! You must guess a number from 1 to 10 (inclusively): //! You must guess a number from 1 to 10 (inclusively):
//! //!
//! ([Full](https://github.com/teloxide/teloxide/blob/dev/examples/guess_a_number_bot/src/main.rs)) //! ([Full](https://github.com/teloxide/teloxide/blob/master/examples/guess_a_number_bot/src/main.rs))
//! ```rust,no_run //! ```rust,no_run
//! # #[macro_use] //! # #[macro_use]
//! # extern crate smart_default; //! # extern crate smart_default;
@ -234,11 +242,15 @@
//! } //! }
//! ``` //! ```
//! //!
//! <div align="center">
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/GUESS_A_NUMBER_BOT.png width="400" />
//! </div>
//!
//! Our [finite automaton], designating a user dialogue, cannot be in an invalid //! Our [finite automaton], designating a user dialogue, cannot be in an invalid
//! state. See [examples/dialogue_bot] to see a bit more complicated bot with //! state. See [examples/dialogue_bot] to see a bit more complicated bot with
//! dialogues. //! dialogues.
//! //!
//! [See more examples](https://github.com/teloxide/teloxide/tree/dev/examples). //! [See more examples](https://github.com/teloxide/teloxide/tree/master/examples).
//! //!
//! ## Recommendations //! ## Recommendations
//! //!
@ -272,13 +284,13 @@
//! [`async`/`.await`]: https://rust-lang.github.io/async-book/01_getting_started/01_chapter.html //! [`async`/`.await`]: https://rust-lang.github.io/async-book/01_getting_started/01_chapter.html
//! [Rust]: https://www.rust-lang.org/ //! [Rust]: https://www.rust-lang.org/
//! [finite automaton]: https://en.wikipedia.org/wiki/Finite-state_machine //! [finite automaton]: https://en.wikipedia.org/wiki/Finite-state_machine
//! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/blob/dev/examples/dialogue_bot/src/main.rs //! [examples/dialogue_bot]: https://github.com/teloxide/teloxide/blob/master/examples/dialogue_bot/src/main.rs
//! [structopt]: https://docs.rs/structopt/0.3.9/structopt/ //! [structopt]: https://docs.rs/structopt/0.3.9/structopt/
//! [@Botfather]: https://t.me/botfather //! [@Botfather]: https://t.me/botfather
#![doc( #![doc(
html_logo_url = "https://github.com/teloxide/teloxide/raw/dev/logo.svg", html_logo_url = "https://github.com/teloxide/teloxide/raw/master/logo.svg",
html_favicon_url = "https://github.com/teloxide/teloxide/raw/dev/ICON.png" html_favicon_url = "https://github.com/teloxide/teloxide/raw/master/ICON.png"
)] )]
#![allow(clippy::match_bool)] #![allow(clippy::match_bool)]

View file

@ -44,7 +44,7 @@
//! [`parse_command`]: crate::utils::command::parse_command //! [`parse_command`]: crate::utils::command::parse_command
//! [`parse_command_with_prefix`]: //! [`parse_command_with_prefix`]:
//! crate::utils::command::parse_command_with_prefix //! crate::utils::command::parse_command_with_prefix
//! [examples/admin_bot]: https://github.com/teloxide/teloxide/blob/dev/examples/miltiple_handlers_bot/ //! [examples/admin_bot]: https://github.com/teloxide/teloxide/blob/master/examples/miltiple_handlers_bot/
pub use teloxide_macros::BotCommand; pub use teloxide_macros::BotCommand;