Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ PoshGram provides functionality to send various message types to a specified Tel

- **Versatile Messaging**: Send a wide variety of message types, including text, contact, dice, animation, audio, document, photo, sticker, video, location, multi-media, poll, and venue messages. It also supports HTML and Markdown for rich text formatting.
- **Interactive Elements**: Incorporate custom keyboards and inline buttons to make your messages interactive.
Sticker Info**: Easily query sticker packs, get sticker information, and send stickers directly through PowerShell commands.
- **Sticker Info**: Easily query sticker packs, get sticker information, and send stickers directly through PowerShell commands.
- **Forum Support**: Send messages to specific forum topics (threads) within forum supergroups using the `MessageThreadID` parameter.
- **Notification Control**: Opt to send messages silently or with notifications.
- **Content Protection**: Enable features to protect messages from being forwarded or saved.
- **Flexible Application**: Use in various scenarios like integrating with task schedulers, alert systems, serverless functions, or automating chat responses.
Expand Down Expand Up @@ -75,6 +76,9 @@ Test-BotToken -BotToken $botToken
# send a basic Text Message
Send-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message 'Hello'
#------------------------------------------------------------------------------------------------
# send a message to a specific forum topic (thread)
Send-TelegramTextMessage -BotToken $botToken -ChatID $chatID -Message 'Hello forum topic!' -MessageThreadID 123
#------------------------------------------------------------------------------------------------
# get information for a Telegram sticker pack
Get-TelegramStickerPackInfo -BotToken $botToken -StickerSetName STPicard
#------------------------------------------------------------------------------------------------
Expand Down
19 changes: 18 additions & 1 deletion docs/Send-TelegramContact.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Sends Telegram phone contact message via BOT API.

```
Send-TelegramContact [-BotToken] <String> [-ChatID] <String> [-PhoneNumber] <String> [-FirstName] <String>
[[-LastName] <String>] [-DisableNotification] [-ProtectContent] [<CommonParameters>]
[[-LastName] <String>] [-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -48,6 +49,7 @@ $sendTelegramContactSplat = @{
LastName = $lastName
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramContact @sendTelegramContactSplat
Expand Down Expand Up @@ -163,6 +165,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
18 changes: 17 additions & 1 deletion docs/Send-TelegramDice.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sends Telegram animated emoji that will display a random value.

```
Send-TelegramDice [-BotToken] <String> [-ChatID] <String> [-Emoji] <String> [-DisableNotification]
[-ProtectContent] [<CommonParameters>]
[-ProtectContent] [[-MessageThreadID] <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -42,6 +42,7 @@ $sendTelegramDiceSplat = @{
ChatID = $chatID
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
Emoji = $emoji
}
Expand Down Expand Up @@ -128,6 +129,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
18 changes: 17 additions & 1 deletion docs/Send-TelegramLocalAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sends Telegram animation message via Bot API from locally sourced animation
```
Send-TelegramLocalAnimation [-BotToken] <String> [-ChatID] <String> [-AnimationPath] <String>
[[-Caption] <String>] [[-ParseMode] <String>] [-HasSpoiler] [-DisableNotification] [-ProtectContent]
[<CommonParameters>]
[[-MessageThreadID] <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -49,6 +49,7 @@ $sendTelegramLocalAnimationSplat = @{
HasSpoiler = $true
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalAnimation @sendTelegramLocalAnimationSplat
Expand Down Expand Up @@ -197,6 +198,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
19 changes: 18 additions & 1 deletion docs/Send-TelegramLocalAudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Sends Telegram audio message via Bot API from locally sourced file
```
Send-TelegramLocalAudio [-BotToken] <String> [-ChatID] <String> [-Audio] <String> [[-Caption] <String>]
[[-ParseMode] <String>] [[-Duration] <Int32>] [[-Performer] <String>] [[-Title] <String>]
[[-FileName] <String>] [-DisableNotification] [-ProtectContent] [<CommonParameters>]
[[-FileName] <String>] [-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -53,6 +54,7 @@ $sendTelegramLocalAudioSplat = @{
FileName = 'halo_on_fire.mp3'
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalAudio @sendTelegramLocalAudioSplat
Expand Down Expand Up @@ -249,6 +251,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
18 changes: 17 additions & 1 deletion docs/Send-TelegramLocalDocument.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sends Telegram document message via Bot API from locally sourced file
```
Send-TelegramLocalDocument [-BotToken] <String> [-ChatID] <String> [-File] <String> [[-Caption] <String>]
[[-ParseMode] <String>] [-DisableContentTypeDetection] [-DisableNotification] [-ProtectContent]
[<CommonParameters>]
[[-MessageThreadID] <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -48,6 +48,7 @@ $sendTelegramLocalDocumentSplat = @{
ParseMode = 'MarkdownV2'
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalDocument @sendTelegramLocalDocumentSplat
Expand Down Expand Up @@ -196,6 +197,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
19 changes: 18 additions & 1 deletion docs/Send-TelegramLocalPhoto.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Sends Telegram photo message via Bot API from locally sourced photo image

```
Send-TelegramLocalPhoto [-BotToken] <String> [-ChatID] <String> [-PhotoPath] <String> [[-Caption] <String>]
[[-ParseMode] <String>] [-HasSpoiler] [-DisableNotification] [-ProtectContent] [<CommonParameters>]
[[-ParseMode] <String>] [-HasSpoiler] [-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -48,6 +49,7 @@ $sendTelegramLocalPhotoSplat = @{
HasSpoiler = $true
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalPhoto @sendTelegramLocalPhotoSplat
Expand Down Expand Up @@ -196,6 +198,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
18 changes: 17 additions & 1 deletion docs/Send-TelegramLocalSticker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sends Telegram sticker message via Bot API from locally sourced sticker image

```
Send-TelegramLocalSticker [-BotToken] <String> [-ChatID] <String> [-StickerPath] <String> [[-Emoji] <String>]
[-DisableNotification] [-ProtectContent] [<CommonParameters>]
[-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -45,6 +45,7 @@ $sendTelegramLocalStickerSplat = @{
Emoji = '😀'
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalSticker @sendTelegramLocalStickerSplat
Expand Down Expand Up @@ -145,6 +146,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
19 changes: 18 additions & 1 deletion docs/Send-TelegramLocalVideo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Sends Telegram video message via Bot API from locally sourced file
```
Send-TelegramLocalVideo [-BotToken] <String> [-ChatID] <String> [-Video] <String> [[-Duration] <Int32>]
[[-Width] <Int32>] [[-Height] <Int32>] [[-FileName] <String>] [[-Caption] <String>] [[-ParseMode] <String>]
[-HasSpoiler] [-Streaming] [-DisableNotification] [-ProtectContent] [<CommonParameters>]
[-HasSpoiler] [-Streaming] [-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>]
[<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -55,6 +56,7 @@ $sendTelegramLocalVideoSplat = @{
Streaming = $true
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocalVideo @sendTelegramLocalVideoSplat
Expand Down Expand Up @@ -280,6 +282,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
18 changes: 17 additions & 1 deletion docs/Send-TelegramLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sends Telegram location to indicate point on map

```
Send-TelegramLocation [-BotToken] <String> [-ChatID] <String> [-Latitude] <Single> [-Longitude] <Single>
[-DisableNotification] [-ProtectContent] [<CommonParameters>]
[-DisableNotification] [-ProtectContent] [[-MessageThreadID] <Int32>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -44,6 +44,7 @@ $sendTelegramLocationSplat = @{
Longitude = $longitude
DisableNotification = $true
ProtectContent = $true
MessageThreadID = 123
Verbose = $true
}
Send-TelegramLocation @sendTelegramLocationSplat
Expand Down Expand Up @@ -144,6 +145,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MessageThreadID
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Expand Down
Loading