NWNX:EE  8193.36.12
nwnx_webhook.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_WebHook = "NWNX_WebHook";
8 
15 void NWNX_WebHook_SendWebHookHTTPS(string host, string path, string message, string username = "", int mrkdwn = 1);
16 
25 void NWNX_WebHook_ResendWebHookHTTPS(string host, string path, string sMessage, float delay = 0.0f);
26 
28 
29 void NWNX_WebHook_SendWebHookHTTPS(string host, string path, string message, string username = "", int mrkdwn = 1)
30 {
31  string sFunc = "SendWebHookHTTPS";
32  NWNX_PushArgumentInt(mrkdwn);
33  NWNX_PushArgumentString(username);
34  NWNX_PushArgumentString(message);
37  NWNX_CallFunction(NWNX_WebHook, sFunc);
38 }
39 
40 void NWNX_WebHook_ResendWebHookHTTPS(string host, string path, string sMessage, float delay = 0.0f)
41 {
42  DelayCommand(delay, NWNX_WebHook_SendWebHookHTTPS(host, path, sMessage));
43 }
NWNX_WebHook_ResendWebHookHTTPS
void NWNX_WebHook_ResendWebHookHTTPS(string host, string path, string sMessage, float delay=0.0f)
Resends a webhook message after a defined delay.
Definition: nwnx_webhook.nss:40
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_WebHook_SendWebHookHTTPS
void NWNX_WebHook_SendWebHookHTTPS(string host, string path, string message, string username="", int mrkdwn=1)
Send a slack compatible webhook.
Definition: nwnx_webhook.nss:29