Trying to understand how it’s legal for a POTUS to tell voters he’ll ensure…

Trying to understand how it’s legal for a POTUS to tell voters he’ll ensure their state receives funding if they vote like he tells them to while promising they won’t receive the said funding if they disobey his orders on who to vote for