A powerful library for interacting with the Telegram Bot API
npm install telegramsjs


telegramsjs is a powerful Node.js module that allows you to easily interact with the
Telegram API.
- Object-oriented
- Predictable abstractions
- Performant
- 100% coverage of the Telegram API
``sh`
npm install telegramsjs
yarn add telegramsjs
> Support the developer with a cup of tea—after all, solo covers the package.
> ☕ Buy me a coffee
- @telegram.ts/collection: Collection utilities for TelegramsJS.TypeScript
- @telegram.ts/types: types for Telegram API objects.TelegramsJS
- @telegram.ts/emoji: Emoji utilities for .TelegramsJS
- @telegram.ts/formatters: Formatters for text and messages in .
Install telegramsjs:
`sh`
npm install telegramsjs
yarn add telegramsjs
Afterwards we can create a quite simple example bot:
`js
// ECMAscript/TypeScript
import { TelegramClient } from "telegramsjs";
// CommonJS
const { TelegramClient } = require("telegramsjs");
const client = new TelegramClient("TELEGRAM_BOT_TOKEN");
client.on("ready", async ({ user }) => {
await user.setCommands([
{
command: "/start",
description: "Starting command",
},
]);
console.log(Bot @${user.username} is the ready status!);
});
client.on("message", async (message) => {
if (message.content === "/start" && message.author) {
await message.reply(
Hello ${message.author.username ? @${message.author.username} : message.author.firstName}!,
);
return;
}
});
client.login();
`
For more information and detailed documentation, please visit the documentation.
We welcome contributions to the development of Telegramsjs! If you have any ideas or suggestions, please visit the Official Support Server or the Official Telegram Group.
For a comprehensive example of using the library, please refer to the GitHub page.
Telegramsjs` is available under the MIT license. For more information, please refer to the LICENSE file.