- Pokémon Essentials Version
- Non-applicable
Hidden Text
Hidden Text
DISCLAIMER
Compatible with all Essentials versions.
The following adds the ability to post data directly to a Discord Webhook. What possibly could you use this for? I have no idea. Maybe to troll your own server with your game, or create a channel with in-game user achievements that get broadcast into it. The possibilities boil down to your imagination.
Carefully read all the instructions .
Using the script
This script utilizes the functionality of cURL and CMD to make a proper post request to send data to a Discord Webhook. Before you even attempt to use this script you need to ensure that you have cURL on your device. The newer Windows 10 updates come with cURL natively in the system, namely:
Code:
Windows 10 build 1803 (released early May 2018)
The script is actually very simple to use. You simply need to define a target URL and a Data Hash and reference the proper function name. Be sure to check up on the Webhook documentation to see exactly what data parameters are accepted when posting to a Webhook.
You can see an example of how to use the script below:
Ruby:
url = "https://discordapp.com/api/webhooks/#{WEBHOOKIDCODE}"
data = {
"username" => "Game Dev Café",
"content" => "Feel free to grab the new EPI. Marin approved this message.",
"embeds" => [
{
"title" => "Essentials Plugin Installer",
"url" => "http://resources.luka-sj.com",
"color" => 4039390
}
]
}
DiscordWebhooks.post(url,data)
Direct link to script if you don't feel like going through the EPI.
- Credits
- Luka S.J.