update scripts

This commit is contained in:
Alex Kup 2023-10-03 22:02:33 +03:00 committed by GitHub
parent 566cebdc96
commit a5a3637b5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 6289 additions and 5805 deletions

16
Scripts/Send-Telegram.ps1 Normal file
View file

@ -0,0 +1,16 @@
function Send-Telegram {
param (
[Parameter(Mandatory = $True)]$Text
)$token_bot = "5517149522:AAFop4_darMpTT7VgLpY2hjkDkkV1dzmGNM"
$id_chat = "-609779646"
$payload = @{
"chat_id" = $id_chat
"text" = $Text
"parse_mode" = "html"
}
Invoke-RestMethod -Uri ("https://api.telegram.org/bot{0}/sendMessage" -f $token_bot) -Method Post -ContentType "application/json;charset=utf-8" -Body (
ConvertTo-Json -Compress -InputObject $payload
)
}
Send-Telegram -Text Test