external help file | Module Name | online version | schema |
---|---|---|---|
PoshGram-help.xml |
PoshGram |
2.0.0 |
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>]
Uses Telegram Bot API to send sticker message to specified Telegram chat. The sticker will be sourced from the local device and uploaded to telegram.
$botToken = 'nnnnnnnnn:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx'
$chatID = '-nnnnnnnnn'
$sticker = 'C:\stickers\sticker.webp'
Send-TelegramLocalSticker -BotToken $botToken -ChatID $chatID -StickerPath $sticker
Sends sticker message via Telegram API
$botToken = 'nnnnnnnnn:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx'
$chatID = '-nnnnnnnnn'
$sticker = 'C:\stickers\sticker.webp'
$sendTelegramLocalStickerSplat = @{
BotToken = $botToken
ChatID = $chatID
StickerPath = $sticker
Emoji = '😀'
DisableNotification = $true
ProtectContent = $true
Verbose = $true
}
Send-TelegramLocalSticker @sendTelegramLocalStickerSplat
Sends sticker message via Telegram API
Use this token to access the HTTP API
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Unique identifier for the target chat
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
File path to the sticker you wish to send
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Emoji associated with the sticker
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Send the message silently. Users will receive a notification with no sound.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Protects the contents of the sent message from forwarding and saving
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
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).
Author: Jake Morrison - @jakemorrison - https://www.techthoughts.info/
The following sticker types are supported: WEBP, TGS, WEBM
Questions on how to set up a bot, get a token, or get your channel ID? Answers on the PoshGram documentation: https://poshgram.readthedocs.io/en/latest/PoshGram-FAQ/
https://poshgram.readthedocs.io/en/latest/Send-TelegramLocalSticker