Chatid dating

Posted by / 01-Dec-2019 00:26

Chatid dating

) $jsonresult.message.text$My Token = "YOUR TOKEN HERE" $Chat ID = 123456789 $My Bot Updates = Invoke-Web Request -Uri "$($My Token)/get Updates" #Convert the result from json and put them in an array $jsonresult = [array]($My Bot Updates | Convert From-Json).result $Last Message = "" Foreach ($Result in $jsonresult) Write-Host "The Last Message sent from others to this conversation is $($Last Message)" The date of a message is super important when you have scripts a bit more complicated.If you’re in a Time Zone that uses daylight saving, you’ll end up having some issues with - 1h.It has an array of $Messages so that you can customize what to write right away without searching through the script.

$Sleep Start Time = [Int] (get-date -UFormat %s) #This will be used to check if the $Sleep Time has passed yet before sending a new notification out While ($Do Not Exit) I suggest you to go through Telegram’s documentation at to see other possible options.$Time Zone = Get-Cim Instance win32_timezone #Time Zone.Bias will have the amount of MINUTES to be subtracted from Initial Message Date, which is in seconds, that's why we're multiplying by 60 $Time Zone Bias In Seconds = ($Time Zone.However, a workaround (which I’m using) is to create a group with your own account, add the Bot and whoever friend who needs to be receiving the notifications.When using a group, the chat ID (so far I noticed this) seems to be always a negative number, something like -123456789.

Chatid dating-68Chatid dating-33Chatid dating-74

Now, what I like the most, what if Powershell can read what we’re writing into that conversation and based on that take actions? If the message equals to “Restart-Computer” then go and restart the computer.

One thought on “Chatid dating”