Create a bot on Telegram
Open Telegram app, search for @BotFather and start the chat. Send /newbot command and follow the instructions. After completing the initial steps, you’ll get the bot token.
How to get your chat ID?
- Search on Telegram for @get_id_bot
- Enter: /my_id
- You'll see your chat id in a few seconds.
How to use it?
You must first import the package
import Telegram from 'telegram-send-message';
And then you can do this to send the message:
Telegram.setToken(YOUR TELEGRAM BOT TOKEN);
Telegram.setRecipient(RECIPIENT CHAT ID);
Telegram.setMessage('Bla bla bla i'm a nerd.');
Telegram.send();
Questions?
Visit my website: http://pimvdmolen.nl