Fixed last commit to only send the hit on SUCCESS or CUSTOM status.

This commit is contained in:
ruri
2019-09-07 17:22:13 +02:00
parent cd7b3046aa
commit 8404844cf3
+1 -2
View File
@@ -864,14 +864,13 @@ namespace RuriLib.Runner
}
// Call the webhook
if (Settings.General.WebhookEnabled)
if (Settings.General.WebhookEnabled && (botData.Status == BotStatus.SUCCESS || botData.Status == BotStatus.CUSTOM))
{
HttpRequest request = new HttpRequest();
try
{
var toSend = new WebhookFormat(data, hitType, capturedData.ToCaptureString(), DateTime.Now, Config.Settings.Name, Config.Settings.Author);
var json = JsonConvert.SerializeObject(toSend);
//wc.UploadStringAsync(new Uri(Settings.General.WebhookURL), json);
request.PostAsync(Settings.General.WebhookURL, json, "application/json");
}
catch