en-US/PoshGram-help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocalAnimation</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocalAnimation</command:noun> <maml:description> <maml:para>Sends Telegram animation message via Bot API from locally sourced animation</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send animation message to specified Telegram chat. The animation will be sourced from the local device and uploaded to telegram. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocalAnimation</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AnimationPath</maml:name> <maml:Description> <maml:para>File path to local image</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AnimationPath</maml:name> <maml:Description> <maml:para>File path to local image</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>The following animation types are supported: GIF</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> <maml:para>Get creative by sending Gifs with your bot!</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $animation = "C:\animation\animation.gif" Send-TelegramLocalAnimation -BotToken $botToken -ChatID $chat -AnimationPath $animation</maml:para> <maml:para>Sends AnimationPath message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $animation = "C:\animation\animation.gif" Send-TelegramLocalAnimation ` -BotToken $botToken ` -ChatID $chat ` -AnimationPath $animation ` -Caption "Check out this animation" ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends animation message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalAnimation.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalAnimation.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendanimation</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendanimation</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocalAudio</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocalAudio</command:noun> <maml:description> <maml:para>Sends Telegram audio message via Bot API from locally sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send audio message to specified Telegram chat. The audio will be sourced from the local device and uploaded to telegram. Several options can be specified to adjust message parameters. Telegram only supports mp3 audio.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocalAudio</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Audio</maml:name> <maml:Description> <maml:para>Local path to audio file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of the audio in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Performer</maml:name> <maml:Description> <maml:para>Performer</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>Title</maml:name> <maml:Description> <maml:para>Track Name</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Audio</maml:name> <maml:Description> <maml:para>Local path to audio file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of the audio in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Performer</maml:name> <maml:Description> <maml:para>Performer</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>Title</maml:name> <maml:Description> <maml:para>Track Name</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $audio = "C:\audio\halo_on_fire.mp3" Send-TelegramLocalAudio -BotToken $botToken -ChatID $chat -Audio $audio</maml:para> <maml:para>Sends audio message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $audio = "C:\audio\halo_on_fire.mp3" Send-TelegramLocalAudio ` -BotToken $botToken ` -ChatID $chat ` -Audio $audio ` -Caption "Check out this audio track" ` -ParseMode Markdown ` -Duration 495 ` -Performer "Metallica" ` -Title "Halo On Fire" ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends audio message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalAudio.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalAudio.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendaudio</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendaudio</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocalDocument</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocalDocument</command:noun> <maml:description> <maml:para>Sends Telegram document message via Bot API from locally sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send document message to specified Telegram chat. The document will be sourced from the local device and uploaded to Telegram. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocalDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>File</maml:name> <maml:Description> <maml:para>Local path to file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>File</maml:name> <maml:Description> <maml:para>Local path to file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>Bots can currently send files of up to 50 MB in size, this limit may be changed in the future.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $file = "C:\Logs\Log1.txt" Send-TelegramLocalDocument -BotToken $botToken -ChatID $chat -File $file</maml:para> <maml:para>Sends document message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $file = "C:\Logs\Log1.txt" Send-TelegramLocalDocument ` -BotToken $botToken ` -ChatID $chat ` -File $file ` -Caption "Check out this file" ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends document message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalDocument.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalDocument.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#senddocument</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#senddocument</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocalPhoto</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocalPhoto</command:noun> <maml:description> <maml:para>Sends Telegram photo message via Bot API from locally sourced photo image</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send photo message to specified Telegram chat. The photo will be sourced from the local device and uploaded to telegram. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocalPhoto</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>PhotoPath</maml:name> <maml:Description> <maml:para>File path to local image</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>PhotoPath</maml:name> <maml:Description> <maml:para>File path to local image</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>The following photo types are supported: JPG, JPEG, PNG, GIF, BMP, WEBP, SVG, TIFF</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $photo = "C:\photos\aphoto.jpg" Send-TelegramLocalPhoto -BotToken $botToken -ChatID $chat -PhotoPath $photo</maml:para> <maml:para>Sends photo message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $photo = "C:\photos\aphoto.jpg" Send-TelegramLocalPhoto ` -BotToken $botToken ` -ChatID $chat ` -PhotoPath $photo ` -Caption "Check out this photo" ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends photo message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalPhoto.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalPhoto.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendphoto</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendphoto</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocalVideo</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocalVideo</command:noun> <maml:description> <maml:para>Sends Telegram video message via Bot API from locally sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send video message to specified Telegram chat. The video will be sourced from the local device and uploaded to telegram. Several options can be specified to adjust message parameters. Telegram only supports mp4 videos.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocalVideo</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Video</maml:name> <maml:Description> <maml:para>Local path to video file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of sent video in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Width</maml:name> <maml:Description> <maml:para>Video width</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Height</maml:name> <maml:Description> <maml:para>Video height</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Streaming</maml:name> <maml:Description> <maml:para>Pass True, if the uploaded video is suitable for streaming</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Video</maml:name> <maml:Description> <maml:para>Local path to video file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of sent video in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Width</maml:name> <maml:Description> <maml:para>Video width</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Height</maml:name> <maml:Description> <maml:para>Video height</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Streaming</maml:name> <maml:Description> <maml:para>Pass True, if the uploaded video is suitable for streaming</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>Telegram clients support mp4 videos (other formats may be sent as Document) Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $file = "C:\videos\video.mp4" Send-TelegramLocalVideo -BotToken $botToken -ChatID $chat -Video $video</maml:para> <maml:para>Sends video message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $video = "C:\videos\video.mp4" Send-TelegramLocalVideo ` -BotToken $botToken ` -ChatID $chat ` -Video $video ` -Duration 10 ` -Width 250 ` -Height 250 ` -Caption "Check out this video" ` -ParseMode Markdown ` -Streaming $true ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends video message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalVideo.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocalVideo.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendvideo</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendvideo</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramLocation</command:name> <command:verb>Send</command:verb> <command:noun>TelegramLocation</command:noun> <maml:description> <maml:para>Sends Telegram location to indicate point on map</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send latitude and longitude points on map to specified Telegram chat.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramLocation</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Latitude</maml:name> <maml:Description> <maml:para>Latitude of the location</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Longitude</maml:name> <maml:Description> <maml:para>Longitude of the location</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Latitude</maml:name> <maml:Description> <maml:para>Latitude of the location</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Longitude</maml:name> <maml:Description> <maml:para>Longitude of the location</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $latitude = 37.621313 $longitude = -122.378955 Send-TelegramLocation -BotToken $botToken -ChatID $chat -Latitude $latitude -Longitude $longitude</maml:para> <maml:para>Sends location via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $photo = "C:\photos\aphoto.jpg" Send-TelegramLocation ` -BotToken $botToken ` -ChatID $chat ` -Latitude $latitude ` -Longitude $longitude -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends location via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocation.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramLocation.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendlocation</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendlocation</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramMediaGroup</command:name> <command:verb>Send</command:verb> <command:noun>TelegramMediaGroup</command:noun> <maml:description> <maml:para>Sends Telegram a group of photos or videos as an almbum via Bot API from locally sourced media</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send a group of photo or video as an album message to specified Telegram chat. The media will be sourced from the local device and uploaded to telegram. This function only supports sending one media type per send (Photo | Video). 2 files minimum and 10 files maximum are required for this function.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramMediaGroup</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>MediaType</maml:name> <maml:Description> <maml:para>Type of media to send</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>FilePaths</maml:name> <maml:Description> <maml:para>List of filepaths for media you want to send</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>MediaType</maml:name> <maml:Description> <maml:para>Type of media to send</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>FilePaths</maml:name> <maml:Description> <maml:para>List of filepaths for media you want to send</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Version: 6.1</maml:para> <maml:para>The following photo types are supported: JPG, JPEG, PNG, GIF, BMP, WEBP, SVG, TIFF</maml:para> <maml:para>The following video types are supported: Telegram clients support mp4 videos</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> <maml:para>This was really hard to make.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" Send-TelegramMediaGroup ` -BotToken $botToken ` -ChatID $chat ` -MediaType Photo ` -FilePaths "C:\photo\photo1.jpg","C:\photo\photo2.jpg"</maml:para> <maml:para>Uploads all provided photo files as album via Telegram Bot API.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" Send-TelegramMediaGroup ` -BotToken $botToken ` -ChatID $chat ` -MediaType Photo ` -FilePaths (Get-ChildItem C:\PhotoGroup | Select-Object -ExpandProperty FullName)</maml:para> <maml:para>Retrieves all photo file paths from C:\PhotoGroup and uploads as photo album. Keep in mind that your location must have at least 2, but not more than 10 files.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $vPath = 'C:\VideoGroup' $vFiles = @( "$vPath\first_contact.mp4", "$vPath\root_beer.mp4" ) Send-TelegramMediaGroup ` -BotToken $botToken ` -ChatID $chat ` -MediaType Video ` -FilePaths $vFiles</maml:para> <maml:para>Uploads all provided video files as album via Telegram Bot API..</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramMediaGroup.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramMediaGroup.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendmediagroup</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendmediagroup</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramTextMessage</command:name> <command:verb>Send</command:verb> <command:noun>TelegramTextMessage</command:noun> <maml:description> <maml:para>Sends Telegram text message via Bot API</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send text message to specified Telegram chat. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramTextMessage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Message</maml:name> <maml:Description> <maml:para>Text of the message to be sent</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Preview</maml:name> <maml:Description> <maml:para>Disables link previews for links in this message. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Message</maml:name> <maml:Description> <maml:para>Text of the message to be sent</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Preview</maml:name> <maml:Description> <maml:para>Disables link previews for links in this message. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1 For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" Send-TelegramTextMessage -BotToken $botToken -ChatID $chat -Message "Hello"</maml:para> <maml:para>Sends text message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" Send-TelegramTextMessage ` -BotToken $botToken ` -ChatID $chat ` -Message "Hello chat channel , check out this link: \ TechThoughts\ (http://techthoughts.info/)" ` -ParseMode Markdown ` -Preview $false ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends text message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramTextMessage.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramTextMessage.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendmessage</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendmessage</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramURLAnimation</command:name> <command:verb>Send</command:verb> <command:noun>TelegramURLAnimation</command:noun> <maml:description> <maml:para>Sends Telegram animation message via Bot API from URL sourced animation image</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send animation message to specified Telegram chat. The animation will be sourced from the provided URL and sent to Telegram. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramURLAnimation</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AnimationURL</maml:name> <maml:Description> <maml:para>URL path to animation</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AnimationURL</maml:name> <maml:Description> <maml:para>URL path to animation</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $animationURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/techthoughts.png" Send-TelegramURLAnimation -BotToken $botToken -ChatID $chat -AnimationURL $AnimationURL</maml:para> <maml:para>Sends animation message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $AnimationURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/jean.gif" Send-TelegramURLAnimation ` -BotToken $botToken ` -ChatID $chat ` -AnimationURL $AnimationURL ` -Caption "Live long, and prosper." ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends animation message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLAnimation.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLAnimation.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendanimation</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendanimation</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramURLAudio</command:name> <command:verb>Send</command:verb> <command:noun>TelegramURLAudio</command:noun> <maml:description> <maml:para>Sends Telegram audio message via Bot API from URL sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send audio message to specified Telegram chat. The file will be sourced from the provided URL and sent to Telegram. Several options can be specified to adjust message parameters. Only works for mp3 files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramURLAudio</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AudioURL</maml:name> <maml:Description> <maml:para>URL path to audio file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of the audio in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Performer</maml:name> <maml:Description> <maml:para>Performer</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>Title</maml:name> <maml:Description> <maml:para>Track Name</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>AudioURL</maml:name> <maml:Description> <maml:para>URL path to audio file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of the audio in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Performer</maml:name> <maml:Description> <maml:para>Performer</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>Title</maml:name> <maml:Description> <maml:para>Track Name</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1</maml:para> <maml:para>Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $audioURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/Tobu- -Syndec-Dusk-_NCS-Release -YouTube.mp3" Send-TelegramURLAudio -BotToken $botToken -ChatID $chat -AudioURL $audioURL</maml:para> <maml:para>Sends audio message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $audioURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/Tobu- -Syndec-Dusk-_NCS-Release -YouTube.mp3" Send-TelegramURLAudio ` -BotToken $botToken ` -ChatID $chat ` -AudioURL $audioURL ` -Caption "Check out this audio track" ` -ParseMode Markdown ` -Duration 495 ` -Performer "Metallica" ` -Title "Halo On Fire" ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends audio message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLAudio.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLAudio.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendaudio</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendaudio</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramURLDocument</command:name> <command:verb>Send</command:verb> <command:noun>TelegramURLDocument</command:noun> <maml:description> <maml:para>Sends Telegram document message via Bot API from URL sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send document message to specified Telegram chat. The file will be sourced from the provided URL and sent to Telegram. Several options can be specified to adjust message parameters. Only works for gif, pdf and zip files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramURLDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>FileURL</maml:name> <maml:Description> <maml:para>URL path to file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>FileURL</maml:name> <maml:Description> <maml:para>URL path to file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1</maml:para> <maml:para>In sendDocument, sending by URL will currently only work for gif, pdf and zip files.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $fileURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/LogExample.zip" Send-TelegramURLDocument -BotToken $botToken -ChatID $chat -FileURL $fileURL</maml:para> <maml:para>Sends document message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $fileURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/LogExample.zip" Send-TelegramURLDocument ` -BotToken $botToken ` -ChatID $chat ` -FileURL $fileURL ` -Caption "Log Files" ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends document message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLDocument.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLDocument.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#senddocument</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#senddocument</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramURLPhoto</command:name> <command:verb>Send</command:verb> <command:noun>TelegramURLPhoto</command:noun> <maml:description> <maml:para>Sends Telegram photo message via Bot API from URL sourced photo image</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send photo message to specified Telegram chat. The photo will be sourced from the provided URL and sent to Telegram. Several options can be specified to adjust message parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramURLPhoto</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>PhotoURL</maml:name> <maml:Description> <maml:para>URL path to photo</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>PhotoURL</maml:name> <maml:Description> <maml:para>URL path to photo</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $photoURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/techthoughts.png" Send-TelegramURLPhoto -BotToken $botToken -ChatID $chat -PhotoURL $photourl</maml:para> <maml:para>Sends photo message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $photoURL = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/techthoughts.png" Send-TelegramURLPhoto ` -BotToken $botToken ` -ChatID $chat ` -PhotoURL $photourl ` -Caption "DSC is a great technology" ` -ParseMode Markdown ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends photo message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLPhoto.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLPhoto.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendphoto</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendphoto</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Send-TelegramURLVideo</command:name> <command:verb>Send</command:verb> <command:noun>TelegramURLVideo</command:noun> <maml:description> <maml:para>Sends Telegram video message via Bot API from URL sourced file</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Uses Telegram Bot API to send video message to specified Telegram chat. The file will be sourced from the provided URL and sent to Telegram. Several options can be specified to adjust message parameters. Only works for gif, pdf and zip files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-TelegramURLVideo</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>VideoURL</maml:name> <maml:Description> <maml:para>URL path to video file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of sent video in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Width</maml:name> <maml:Description> <maml:para>Video width</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Height</maml:name> <maml:Description> <maml:para>Video height</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Streaming</maml:name> <maml:Description> <maml:para>Pass True, if the uploaded video is suitable for streaming</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>ChatID</maml:name> <maml:Description> <maml:para>Unique identifier for the target chat</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>VideoURL</maml:name> <maml:Description> <maml:para>URL path to video file</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Duration</maml:name> <maml:Description> <maml:para>Duration of sent video in seconds</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="5" aliases="none"> <maml:name>Width</maml:name> <maml:Description> <maml:para>Video width</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>Height</maml:name> <maml:Description> <maml:para>Video height</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>0</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>Caption</maml:name> <maml:Description> <maml:para>Brief title or explanation for media</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>ParseMode</maml:name> <maml:Description> <maml:para>Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. Default is Markdown.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Markdown</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Streaming</maml:name> <maml:Description> <maml:para>Pass True, if the uploaded video is suitable for streaming</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>DisableNotification</maml:name> <maml:Description> <maml:para>Sends the message silently. Users will receive a notification with no sound. Default is $false</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue> <dev:type> <maml:name>Boolean</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1</maml:para> <maml:para>Telegram clients support mp4 videos (other formats may be sent as Document) Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.</maml:para> <maml:para>For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $videourl = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/Intro.mp4" Send-TelegramURLVideo -BotToken $botToken -ChatID $chat -VideoURL $videourl</maml:para> <maml:para>Sends video message via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>$chat = "-#########" $videourl = "https://github.com/techthoughts2/PoshGram/raw/master/test/SourceFiles/Intro.mp4" Send-TelegramURLVideo ` -BotToken $botToken ` -ChatID $chat ` -VideoURL $videourl ` -Duration 16 ` -Width 1920 ` -Height 1080 ` -Caption "Check out this video" ` -ParseMode Markdown ` -Streaming $false ` -DisableNotification $false ` -Verbose</maml:para> <maml:para>Sends video message via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLVideo.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Send-TelegramURLVideo.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#sendvideo</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#sendvideo</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Test-BotToken</command:name> <command:verb>Test</command:verb> <command:noun>BotToken</command:noun> <maml:description> <maml:para>Validates Bot auth Token</maml:para> </maml:description> </command:details> <maml:description> <maml:para>A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Test-BotToken</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BotToken</maml:name> <maml:Description> <maml:para>Use this token to access the HTTP API</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Management.Automation.PSCustomObject (if successful)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Boolean (on failure)</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Jake Morrison - @jakemorrison - http://techthoughts.info/ This works with PowerShell Versions: 5.1, 6.0, 6.1 For a description of the Bot API, see this page: https://core.telegram.org/bots/api How do I get my channel ID? Use the getidsbot https://telegram.me/getidsbot -or- Use the Telegram web client and copy the channel ID in the address How do I set up a bot and get a token? Use the BotFather https://t.me/BotFather</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>Test-BotToken -BotToken $botToken</maml:para> <maml:para>Validates the specified Bot auth token via Telegram API</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>$botToken = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"</dev:code> <dev:remarks> <maml:para>Test-BotToken ` -BotToken $botToken ` -Verbose</maml:para> <maml:para>Validates the specified Bot auth token via Telegram API</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/techthoughts2/PoshGram/blob/master/docs/Test-BotToken.md</maml:linkText> <maml:uri>https://github.com/techthoughts2/PoshGram/blob/master/docs/Test-BotToken.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://core.telegram.org/bots/api#getme</maml:linkText> <maml:uri>https://core.telegram.org/bots/api#getme</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |