I want to summon lightning from my server console so that it doesn't hit my player, but spawns where my player is facing. How can I do this?
/execute as <player> at @s run summon lightning_bolt ^ ^ ^5
would summon a lightning bolt five blocks in front of a player of your choosing. Keep in mind if the player is facing high up or down the lightning bolt will be in the ground or in the air.