I'll be teaching you how to send messages to your discord channel from your botting script.
This can be useful for a number of things; Level messages, PvE drops, Out of food and a lot of other things.
I'll be using this json library, but you can re-write the code snippet so you won't need the library (If you know how).
If you want to know how you can "import" the library to your compiled script, just watch this spoiler.
Official Discord webhook API is here
Let's get started
The following code is the function to send a discord message. You want to add this anywhere in your code.
It has come to my attention that I'm a retard, and that I initialize variables inside methods. Please fix this yourself :))
Once you've got the function in your project you're ready to use it.
discordMessage("Your webhook url", "the message you want to send", "Any username really. You can use the name of the account logged in if you want");
If you don't know how to create a discord webhook, look at this spoiler.