Hey guys.
I have tried doing the above examples without any luck.
Anyone mind telling me what I am doing wrong?
Not getting any data coming through on the channel at all.
Simba Code:
program new;
const
DiscordWebhookURL = 'http://discordapp.com/api/webhooks/602319574863708171/gVoLTLYGghVdhz_XX-6sabstnvOtRdGyOhkhUhpUW0yG0O9TH_74SFgmxTlA99qnyaj8';
DiscordWebhookJSON = '{"content" : "Test"}';
Procedure SendDiscordWebhook(WebhookURL, JSON: string);
var
HTTPClient: Integer;
begin
HTTPClient := InitializeHTTPClient(False);
writeln(HTTPClient);
PostHTTPPage(HTTPClient, WebhookURL, JSON);
writeln(GetHTTPPage(HTTPClient, DiscordWebhookURL));
FreeHTTPClient(HTTPClient);
end;
Procedure Terminator();
begin
SendDiscordWebhook(DiscordWebhookURL, DiscordWebhookJSON);
end;
begin
AddOnTerminate('Terminator'); //whenever the script terminates [safely], the Terminator() procedure will be called
SendDiscordWebhook(DiscordWebhookURL, DiscordWebhookJSON);
//rest of the script
end.