feat(fn): all_admin_member is slice
This commit is contained in:
parent
352514d2b0
commit
e333e401f3
|
@ -1,7 +1,6 @@
|
|||
use telers::types::chat_member::ChatMember;
|
||||
|
||||
pub fn is_admin(all_admin_members: &Vec<ChatMember>, user_id: i64) -> bool {
|
||||
//fix: moderators with non full rights can use admin commands now.
|
||||
pub fn is_admin(all_admin_members: &[ChatMember], user_id: i64) -> bool {
|
||||
all_admin_members
|
||||
.iter()
|
||||
.any(|admin: &ChatMember| match admin {
|
||||
|
|
Loading…
Reference in New Issue