mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
new: session scripts can now include other scripts via require('file')
This commit is contained in:
parent
2b1ff7d59f
commit
8827a2af84
6 changed files with 94 additions and 20 deletions
10
_example/telegram.js
Normal file
10
_example/telegram.js
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue