// Hepler function to check if user has permission to do /generate command.
Hepler function to check if user has permission to do /generate command.
Hepler function to check if user has permission to do / generate command .
pub fn has_permission(invoker: &RoleId, roles: &Vec<Role>) -> bool {
    roles.into_iter().any(|role| {
        (role.name != "@everyone" && role.id == *invoker)
            || role.has_permission(Permissions::ADMINISTRATOR)
    })
}
pub fn has_permission ( invoker : & RoleId , roles : & Vec < Role > ) -> bool { roles . into_iter ( ) . any ( | role | { ( role . name != " " && role . id == * invoker ) || role . has_permission ( Permissions :: ADMINISTRATOR ) } ) }
Hepler function to check if user has permission to do /generate command.
Hepler function to check if user has permission to do / generate command .
invoker
&RoleId
roles
&Vec<Role>