I need help for a API

I want to trigger a message when the player has a weapon in their hand. Is there an API to check if a player is using a weapon?

Hi mate, check this

thank you bro