add_user, add_group features.

This commit is contained in:
AB
2020-11-29 16:23:27 +03:00
parent 61474a07c5
commit c848b4b632
5 changed files with 212 additions and 44 deletions

10
src/utils.rs Normal file
View 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()
}
}