Delete Scripts/Send-Telegram.ps1
This commit is contained in:
parent
33ceba6378
commit
d743c2ba39
1 changed files with 0 additions and 16 deletions
|
|
@ -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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue