Getting Started
Now, it’s time to open Telegram to create a bot account, and obtain an authentication token for it.
Talk to @BotFather to do this.
The authentication token looks like 1234567890:AAGuR7uTRW7IZkbfpcVMKi7CLLkRYXc9cLI
.
Loading...
Open your package.json
and find:
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
and replace with
примечание
dev
script requires nodemon module, you can install it via npm i nodemon -D
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js"
},
What is this for? Now you can run bot in two modes using npm
aliases:
npm start
(ornpm run start
) - running bot for productionnpm run dev
- running bot in development mode with hot reload (bot automatically restarted after source files changed)
Open your command line and run npm start
or npm run dev
.
End. 🥳