Skip to content

mkellerman/PSTelegramAPI

Repository files navigation

PSGallery VersionPSGallery Downloads

Azure PipelineAnalytics

PSTelegramAPI

PowerShell Module for Telegram APIs

Install PSTelegramAPI from PSGallery

Install-Module PSTelegramAPI -Scope CurrentUser

Examples

Import-Module PSTelegramAPI # Establish connection to Telegram$TLClient=New-TLClient-apiId $ENV:TLApiId-apiHash $ENV:TLApiHash-phoneNumber $ENV:TLPhoneNumber# Get List of User Dialogs$TLUserDialogs=Get-TLUserDialogs-TLClient $TLClient# Get latest 100 messages from each User in ListForEach ($Userin$TLUserDialog){$TLHistory=Get-TLHistory-TLClient $TLClient-Peer $User.Peer-Limit 100 } # Find a specific User$TLPeer=$TLUserDialogs.Where({$_.Peer.Username-eq'mkellerman' }).Peer # Send message to UserInvoke-TLSendMessage-TLClient $TLClient-TLPeer $TLPeer-Message 'Hello World'

Completed

  • Get-TLUserDialogs
  • Get-TLContacts
  • Get-TLHistory
  • Invoke-TLSendMessage

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published