Delete Scripts/Send-Telegram.ps1

This commit is contained in:
Alex Kup 2023-11-03 12:58:29 +03:00 committed by GitHub
parent 33ceba6378
commit d743c2ba39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,16 +0,0 @@
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