관리 메뉴

Silver Library (Archived)

telegram bot with node-telegram-bot-api 본문

카테고리 없음

telegram bot with node-telegram-bot-api

Chesed Kim 2023. 3. 8. 21:44
반응형

The best scenario to begin this work would be to follow the official example.

https://www.npmjs.com/package/node-telegram-bot-api

 

node-telegram-bot-api

Telegram Bot API. Latest version: 0.61.0, last published: 2 months ago. Start using node-telegram-bot-api in your project by running `npm i node-telegram-bot-api`. There are 310 other projects in the npm registry using node-telegram-bot-api.

www.npmjs.com

 

Assume you made the telegram bot account already with @botfather. And here is the next check list.

 

#1 Identify what each specific words indicate.

#2 Be sure to run the file, which contains direct code for running your telegram bot.

#3 Make sure that you must have had that token key. Either in .env or on that file, you should include it.

#4 Turn on only a single server. Clicking X mark won't turn off the server in VSCode. You need to terminate it manually.

 

Once this is done flawlessly, then your bot will respond to your specific words based on your input, command, and listener.

 

You can even let this bot can modifying the DB as you needed. To do that, you need to make up that purposeful function in the file that we have worked on. I may update this process again once I made it.