Minecraft wiki entry for Death_messages, associated text: <player> was shot by <player/mob>
Appears when the player is killed by an arrow shot by a player or mob using a bow or crossbow.
When the player is killed by an arrow shot from a dispenser or summoned with /summon, the death message is <player> was shot by Arrow/Spectral Arrow.
<player> was shot by <player/mob> using <item>
Appears when the player is killed by an arrow shot by a player or mob using a renamed bow or crossbow.