Telegram sample
Using the telegram sample bundle
The telegram sample bundle in samples/telegram-bot
shows how to create a
simple command.
Prerequisites
You will need a working nodecg-io
installation. If you have non yet take a
look at installation guide. You may need to
install this bundle, so take a look at the
“Try an included sample”-Guide. It
will also tell you how to log in and how to use the GUI.
You also need:
- A telegram-bot API token. You can create your bot here.
Configure the telegram sample bundle
-
Create a new telegram service instance.
-
Enter the token and set polling to true:
{ "token": "[TOKEN]", "polling": true }
After entering it, click save.
-
Set the sample's (
telegram-bot
) dependency to be the newly created service instance (of typetelegram
). -
You can send
/test
to your bot, and it should respond with two messages.