There's a lot off with that code.
BULLET I think should be an "onready var" not "const" if you want to do anything with it. The player variable needs to be attached to the actual player node. not the script. So you have to use get_node() with the path to the player. For example, if the enemy and player are on the same level in the node hierarchy, then you can do "get_node("../Player")" assuming the player is named "Player". You should get familiar with how nodes work, as you will use them a lot.
Direction is a simple number (1), so I don't believe you can use member function on it. What you probably want to do is compare the enemy position to the player position. If they are under the same node (meaning they are in the same level together) then you can do this:
$dealer.flip_h = position.x < player.position.x
Or something like that, I'm just doing this in my head now.