Node.js package for interacting with the Telegram Bot API. Easily send messages, photos, documents, and more using this library.
Install the package via npm:
npm install telegram-api-package
const TelegramBot = require('telegram-api-package');
// Initialize your bot with the token
const bot = new TelegramBot('YOUR_TELEGRAM_BOT_TOKEN');
// Example: Sending a message
bot.sendMessage('123456789', 'Hello from your Telegram bot!')
.then(response => {
console.log('Message sent:', response);
})
.catch(error => {
console.error('Error sending message:', error);
});
- Send text messages
- Send photos
- Send documents
- Send locations
- Edit message text
- Delete messages
For detailed API documentation, refer to the Telegram Bot API Documentation.
Contributions are welcome! Please read the Contributing Guidelines first.
This project is licensed under the MIT License - see the LICENSE file for details.