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;
|
use telers::types::chat_member::ChatMember;
|
||||||
|
|
||||||
pub fn is_admin(all_admin_members: &Vec<ChatMember>, user_id: i64) -> bool {
|
pub fn is_admin(all_admin_members: &[ChatMember], user_id: i64) -> bool {
|
||||||
//fix: moderators with non full rights can use admin commands now.
|
|
||||||
all_admin_members
|
all_admin_members
|
||||||
.iter()
|
.iter()
|
||||||
.any(|admin: &ChatMember| match admin {
|
.any(|admin: &ChatMember| match admin {
|
||||||
|
|
Loading…
Reference in New Issue