mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-08 13:04:06 +00:00
add_user, add_group features.
This commit is contained in:
10
src/utils.rs
Normal file
10
src/utils.rs
Normal file
@ -0,0 +1,10 @@
|
||||
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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user