telegram desktop download
telegram web
https://telegram.org/dl/webogram
google app
telegram
How to Create a Telegram Bot and Send Message via bot API
https://www.youtube.com/watch?v=UhZtrhV7t3U
download telegram desktop -> add botfather to contact -> create new -> get bot name and token
#install powershell 7
https://www.howtogeek.com/663684/how-to-install-powershell-7-on-windows-10/
install-module poshgram
get-command -module poshgram
get-help Send-TelegramTextMessage -example
PS C:\Users\bob> get-module -name poshgram -listavailable
Directory: C:\Users\bob\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 1.12.0 PoshGram Desk {Get-TelegramStickerPackInfo, Send-Tele…
PS C:\Users\bob> get-volume
DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size
----------- ------------ -------------- --------- ------------ ----------------- ------------- ----
C NTFS Fixed Healthy OK 679.58 GB 930.16 GB
NTFS Fixed Healthy OK 392.21 MB 823 MB
Unknown Fixed Healthy Unknown 0 B 0 B
PS C:\Users\bob> $volume = get-volume -errorAction stop | where-object {$_.DriveLetter -eq 'c'}
PS C:\Users\bob> $sizeRemaining = [math]::round($volume.SizeRemaining/1024/1024/1024,2)
PS C:\Users\bob> $percentFree = [int](($sizeRemaining/$volume.Size)*100)
PS C:\Users\bob> $botToken = "xxx"
PS C:\Users\bob> $chat = "-493233924"
PS C:\Users\bob> Send-TelegramTextMessage -BotToken $botToken -ChatID $chat -Message "$sizeRemaining GB ($percentFree%) free on C:\"
ok result
-- ------
True @{message_id=7; from=; chat=; date=1596923063; text=682.29 GB (73%) free on C:\}
reference:
https://www.youtube.com/watch?v=IABNJEl2ZWk&t=1535s
telegram bot
https://core.telegram.org/bots
poshgram command
https://github.com/techthoughts2/PoshGram
No comments:
Post a Comment