An easy was to use the discord-rpc library
An explanation
Inputs taken:
userID userdetail userstate lrgImgKey lrgImgTxt smlImgKey smlImgTxt
An example
const richPresence = ;;
or you can run node example.js
to see an example
If you are having errors about needing git follow this guide (https://www.atlassian.com/git/tutorials/install-git)
More instructions are provided in the example.js file
Note: The only reason this can work is because of the nice people who made the module discord-rpc, This is only a thing so that you can do this in one line if you want to :)