npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

telemach

v1.0.0

Published

A professional and complete library for interacting with Telegram API.

Readme

Telemach

Telemach es una librería profesional y completa para interactuar con la API de Telegram y crear bots personalizados. Esta librería facilita el envío de mensajes, imágenes, audios, botones interactivos, y el manejo de eventos de grupos, como cuando un usuario entra o sale de un grupo.

Instalación

Puedes instalar la librería a través de npm:

npm install telemach

Métodos principales

sendMessage(chatId, text)

Envía un mensaje de texto a un chat.

  • chatId: ID del chat al que se enviará el mensaje.
  • text: El texto del mensaje.

sendPhoto(chatId, photo)

Envía una foto a un chat.

  • chatId: ID del chat.
  • photo: El archivo de la foto que se enviará.

sendAudio(chatId, audio)

Envía un archivo de audio o música a un chat.

  • chatId: ID del chat.
  • audio: El archivo de audio que se enviará.

sendHtmlMessage(chatId, htmlContent)

Envía un mensaje en formato HTML.

  • chatId: ID del chat.
  • htmlContent: El contenido HTML que se enviará.

sendInlineKeyboard(chatId, text, buttons)

Envía un mensaje con un teclado interactivo.

  • chatId: ID del chat.
  • text: El texto del mensaje.
  • buttons: Un array de botones en formato JSON.

getUpdates()

Obtiene las actualizaciones de los mensajes recibidos por el bot.

monitorGroupActivity()

Monitorea eventos en un grupo, como cuando un usuario entra o sale.

Ejemplo de uso

const Telemach = require('telemach');
const bot = new Telemach('YOUR_BOT_TOKEN');

// Enviar un mensaje de texto
bot.sendMessage(123456789, '¡Hola Mundo!');

// Enviar una imagen
bot.sendPhoto(123456789, 'path_to_image.jpg');

// Enviar un archivo de audio
bot.sendAudio(123456789, 'path_to_audio.mp3');

// Enviar un mensaje con formato HTML
bot.sendHtmlMessage(123456789, '<b>Hola</b>, <i>mundo</i>');

// Enviar botones interactivos
bot.sendInlineKeyboard(123456789, 'Elige una opción', [
  [{ text: 'Opción 1', callback_data: 'opt1' }],
  [{ text: 'Opción 2', callback_data: 'opt2' }]
]);

// Monitorear actividad en grupo
bot.monitorGroupActivity();