mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Small fixes
This commit is contained in:
parent
da2ce2b116
commit
18920b546f
1 changed files with 2 additions and 3 deletions
|
@ -15,7 +15,7 @@ use teloxide::{
|
||||||
dispatching::dialogue::{self, InMemStorage},
|
dispatching::dialogue::{self, InMemStorage},
|
||||||
macros::BotCommands,
|
macros::BotCommands,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
types::Me,
|
types::{Me, ParseMode},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub type MyDialogue = Dialogue<State, InMemStorage<State>>;
|
pub type MyDialogue = Dialogue<State, InMemStorage<State>>;
|
||||||
|
@ -33,7 +33,6 @@ pub enum State {
|
||||||
#[derive(BotCommands, Clone, Debug)]
|
#[derive(BotCommands, Clone, Debug)]
|
||||||
#[command(rename_rule = "lowercase")]
|
#[command(rename_rule = "lowercase")]
|
||||||
pub enum StartCommand {
|
pub enum StartCommand {
|
||||||
#[command()]
|
|
||||||
Start(String),
|
Start(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +110,7 @@ pub async fn send_message(
|
||||||
// Trying to send a message to the user
|
// Trying to send a message to the user
|
||||||
let sent_result = bot
|
let sent_result = bot
|
||||||
.send_message(id, format!("You have a new message!\n\n<i>{text}</i>"))
|
.send_message(id, format!("You have a new message!\n\n<i>{text}</i>"))
|
||||||
.parse_mode(teloxide::types::ParseMode::Html)
|
.parse_mode(ParseMode::Html)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
// And if no error is returned, success!
|
// And if no error is returned, success!
|
||||||
|
|
Loading…
Reference in a new issue