update scripts
This commit is contained in:
parent
566cebdc96
commit
a5a3637b5c
14 changed files with 6289 additions and 5805 deletions
16
Scripts/Send-Telegram.ps1
Normal file
16
Scripts/Send-Telegram.ps1
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue