mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-25 04:24:20 +00:00
Hide suffix in /help
if in a private chat
This commit is contained in:
parent
8f6d0a1511
commit
8fee150c41
1 changed files with 6 additions and 1 deletions
|
@ -57,7 +57,12 @@ pub async fn handler_specific(bot: &Bot, message: &Message, target: &str) -> Com
|
|||
None => anyhow::bail!("Non è stato possibile trovare il comando specificato."),
|
||||
};
|
||||
|
||||
let text = format!("❓ Il comando {}{}:\n\n{}", target.command, suffix, target.description);
|
||||
let display_suffix = match message.chat.is_private() {
|
||||
false => &suffix,
|
||||
true => "",
|
||||
};
|
||||
|
||||
let text = format!("❓ Il comando {}{}:\n\n{}", target.command, display_suffix, target.description);
|
||||
|
||||
let _reply = bot
|
||||
.send_message(message.chat.id, text)
|
||||
|
|
Loading…
Reference in a new issue