new: session scripts can now include other scripts via require('file')

This commit is contained in:
Simone Margaritelli 2021-04-04 17:17:37 +02:00
commit 8827a2af84
6 changed files with 94 additions and 20 deletions

10
_example/telegram.js Normal file
View file

@ -0,0 +1,10 @@
function sendMessage(message) {
var url = 'https://api.telegram.org/bot' + telegramToken +
'/sendMessage?chat_id=' + telegramChatId +
'&text=' + http.Encode(message);
var resp = http.Get(url, {});
if( resp.Error ) {
log("error while running sending telegram message: " + resp.Error.Error());
}
}