{"id":22502729,"url":"https://github.com/muhammadabir64/telegram-bot-nodejs","last_synced_at":"2026-05-04T06:31:21.190Z","repository":{"id":157016814,"uuid":"591631838","full_name":"muhammadabir64/telegram-bot-nodejs","owner":"muhammadabir64","description":"Lets build a Telegram bot using NodeJS","archived":false,"fork":false,"pushed_at":"2023-01-21T11:03:24.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T01:11:25.903Z","etag":null,"topics":["automation","bot","nodejs","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muhammadabir64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-21T10:56:23.000Z","updated_at":"2023-01-21T10:59:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"9625347f-2231-4a77-8c47-06d78c812256","html_url":"https://github.com/muhammadabir64/telegram-bot-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadabir64%2Ftelegram-bot-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadabir64%2Ftelegram-bot-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadabir64%2Ftelegram-bot-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadabir64%2Ftelegram-bot-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammadabir64","download_url":"https://codeload.github.com/muhammadabir64/telegram-bot-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245937974,"owners_count":20696989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","nodejs","telegram-bot-api"],"created_at":"2024-12-06T23:21:29.841Z","updated_at":"2026-05-04T06:31:21.144Z","avatar_url":"https://github.com/muhammadabir64.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"To create a Telegram bot using Node.js, you will need to install the `node-telegram-bot-api` package. This package provides an easy-to-use interface for interacting with the Telegram Bot API.\n\nHere is an example of a basic Telegram bot that can respond to messages:\n\n```javascript\nconst TelegramBot = require('node-telegram-bot-api');\n\n// replace with your own token\nconst token = 'YOUR_TOKEN';\n\nconst bot = new TelegramBot(token, {polling: true});\n\nbot.on('message', (msg) =\u003e {\n  const chatId = msg.chat.id;\n  bot.sendMessage(chatId, 'Hello World!');\n});\n```\n\nIn this example, the bot will listen for incoming messages and respond with \"Hello World!\" when a message is received. The `polling: true` option tells the bot to use long polling to receive updates from Telegram.\n\nYou will need to replace `YOUR_TOKEN` with the token you received from the Bot Father after creating your bot.\n\nYou can also use commands to make the bot do specific things. For example, you can make the bot respond to the command '/start' like this:\n\n```javascript\nbot.onText(/\\/start/, (msg) =\u003e {\n  const chatId = msg.chat.id;\n  bot.sendMessage(chatId, 'Welcome! How can I help you today?');\n});\n```\nThis is just a simple example, you can make your bot more complex by using more advanced features of the Telegram Bot API, such as sending photos, audio, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadabir64%2Ftelegram-bot-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammadabir64%2Ftelegram-bot-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadabir64%2Ftelegram-bot-nodejs/lists"}