QBCore - Set player job using discord (help)

Hello, I am looking for a way to give a player a job using discord.
Function
If a player has a recruit or higher police role in discord it will set the players job to police and set the grade according to their rank (role)
usage
Something that uses badgers discord roles or api
if you know how to make something like this please let me know.
Reference

This is one for a ESX Server which works perfectly on ESX server but i need something for qbcore