Giving roles in a specific number of message send

So I want to give a role for sending specific number of message

Like if they manage to send 1k messages they will get a specific role

Can anyone help me on that?