feat: replace owner by administrator right
This commit is contained in:
parent
be6c76c00f
commit
6fd51ef7d8
@ -34,6 +34,12 @@ pub async fn check_if_server_enable_and_user_admin(
|
||||
match guild.member(http, UserId::new(user_id)).await {
|
||||
Ok(member) => {
|
||||
info!("Checking if user is admin");
|
||||
if let Some(perm) = member.permissions {
|
||||
if perm.administrator() {
|
||||
info!("User has administarator permission");
|
||||
return Ok((true, Some(server_config)));
|
||||
}
|
||||
}
|
||||
if member
|
||||
.permissions
|
||||
.into_iter()
|
||||
|
Loading…
Reference in New Issue
Block a user