mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-08 13:04:06 +00:00
10 lines
337 B
Rust
10 lines
337 B
Rust
![]() |
use telegram_bot::*;
|
||
|
|
||
|
pub(crate) fn get_title(message: &telegram_bot::Message) -> String {
|
||
|
match &message.chat {
|
||
|
MessageChat::Supergroup(chat) => chat.title.clone(),
|
||
|
MessageChat::Group(chat) => chat.title.clone(),
|
||
|
MessageChat::Private(chat) => "PRIVATE".to_string(),
|
||
|
_ => "PRIVATE".to_string()
|
||
|
}
|
||
|
}
|