James 4:7-8
So submit to (the authority of) God. Resist the devil (stand firm against him) and he will flee from you. Come close to God (with contrite heart) and He will come close to you. Wash your hands, you sinners; and purify your (unfaithful) hearts, you double-minded (people).
God is always ready to help us in times of need. When we feel pressure from the devil, God wants to help us, but we must be willing to submit to God. When we draw near God, we can better hear His guidance, but we also need to purify our hearts. We can’t be double-minded and still hear from God.