It’s easy, you listen to what the ‘angel’ says and put it up against the Word of God. A demonic angel is not going to say anything against the Word of God.
I remember reading, that when Joan of Arc was interrogated, they asked ehr a significant question about her encounters with the angels: they asked ehr if she ahd put her arms around their shoulders or waists upon embracing them in love.
If she had embraced them around the shoulders, it would have been as a lover and therefore the ‘angels,’ would have been demonic. If around the waist, it would have been as a friend and therefore non-demonic.
She said that she had embraced them around the waist.