From 3236131377e335cd53f4897315322dc1df33056b Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 29 Dec 2020 17:09:49 +0300 Subject: [PATCH] Move Mystem to external lib. add /omedeto --- src/commands.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/commands.rs b/src/commands.rs index 39e70b9..5811ba2 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -219,6 +219,14 @@ pub(crate) async fn omedeto(api: Api, message: Message, mystem: &mut MyStem) -> ); debug!("{:?}", result); + match api + .send(message.text_reply(result.trim()).parse_mode(ParseMode::Html)) + .await + { + Ok(_) => debug!("/omedeto command sent to {}", message.chat.id()), + Err(_) => warn!("/omedeto command sent failed to {}", message.chat.id()), + } + // '^я [а-яА-Я]+(-[а-яА-Я]+(_[а-яА-Я]+)*)*$' Ok(()) }