This package is designed to be an easy drop in package that enables sending messages to discord webhooks system. It takes advantages of some core changes which implemented a HTTPRequest() function, so if you are having issues or getting errors, please make sure that your core is up to date first.Make sure your CORE version is commit defbbe1 or later(release date 2018-01-05)
This package was written for the POL Distro headed by Yukiko and was designed with the intention of reducing and documenting any entry or exit points of the package to make custom or sister packages directly replaceable using those same entry and exit points.
For basic usage it only requires 1 config file to be setup, and 2 lines injected into scripts.
- include ":discordbot:outbound";
- PresetDiscordMessage( message, presetType);
Message is the content that will be displayed in Discord.
presetType is the name of the settings element in the config file.
I've also done the best I can(be bothered) to make sure that the src and inc files are as documented as possible. If you don't understand something please don't hesitate to let me know and i can assist you in why I've done something a certain way and then maybe document the scripts more.
For more information on the discord side of things there are 2 pieces of documentation that i recommend reading.
First is the documenation for setting up a webhook inside discord:
Intro To Webhooks
Secondly is the developer documentation which contains info that the webhook can accept:
Developer Documentation
Thanks
I would like the thank the following people who have contributed in some way or another.
- Kevin_ - For writing the HTTPRequest() code.
- Austin - I stole these docs from your brainAI package