introduct macro to automatically reply with i18n message and return from command handler
This commit is contained in:
parent
da0f33df6b
commit
e692ebceb8
1 changed files with 9 additions and 0 deletions
|
|
@ -2,5 +2,14 @@ pub mod bot;
|
|||
pub mod dl;
|
||||
pub mod op;
|
||||
pub mod sanitize;
|
||||
pub mod request;
|
||||
pub mod start;
|
||||
pub mod types;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! reply_i18n_and_return {
|
||||
($bot:expr, $chat_id:expr, $line:expr) => {
|
||||
$bot.send_message($chat_id, t!($line)).await?;
|
||||
return Ok(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue