Act as a telegram bot tracking and sending messages
resource_types:
- name: telegram
type: docker-image
source:
repository: carlocolombo/telegram-resourcelateststable buildlatest-devbuild from the latest commit
https://hub.docker.com/r/carlocolombo/telegram-resource/tags/
telegram_keyRequired . Ask it to the BotFatherfilterOptional. A regex string eg"/start"flagsOptional. String of flags eg"mi"for multiline and case insensitive. Check more on mdn
resources:
- name: start
type: telegram
source:
filter: '/start'
flags: i
telegram_key: {{telegram_bot_token}}Fetching messages:
- get: start
trigger: trueSend a full featured message:
- put: answer
params:
message: answer/messageSend a simple message:
- put: answer
params:
chat_id: answer/chat_id
text: answer/textReturns the recent messages sent to the telegram bot, if filter is defined it will return only the messages matching the regex
Outputs 1 file:
message: Contains the message as retrieved from telegram api, it is a json rappresenting an update object. Only update of typemessageare supported right now
text and chat_id or message are required, if all present message has precedence over the pair chat_id text
text: Text of the message to be sentchat_id: Unique identifier for the target chat or username of the target channel (in the format@channelusername)message: A json rappresenting a full message to be sent using the api, https://core.telegram.org/bots/api#sendmessage