Ok, you're moving in two directions and jumping and falling. In that case, you could take your player's velocity and use the .normalized() method to get just the direction. Then pass that to your shooting function and multiply it by how fast the bullet should go. That will send the bullet out in the direction the player is actually moving at that instant.
If you want the bullets to only go in one of eight directions, you could use .normalized().round().normalized() to get the closest direction.
So you'd basically have...
shot.set_shot_direction(velocity.normalized().round().normalized())
and
func _physics_process(delta):
velocity = SPEED * delta * direction
translate(velocity)
"direction" is now a Vector2 instead of a number.