Act as a telegram bot tracking and sending messages
resource_types:
- name: telegram
type: docker-image
source:
repository: carlocolombo/telegram-resource
latest
stable buildlatest-dev
build from the latest commit
https://hub.docker.com/r/carlocolombo/telegram-resource/tags/
telegram_key
Required . Ask it to the BotFatherfilter
Optional. A regex string eg"/start"
flags
Optional. 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: true
Send a full featured message:
- put: answer
params:
message: answer/message
Send a simple message:
- put: answer
params:
chat_id: answer/chat_id
text: answer/text
Returns 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 typemessage
are 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