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

exuxmafuapi

v1.121.0

Published

API wrapper for ExuXmafu services

Downloads

139

Readme

exuxmarfoAPI

Node.js ESM port of pyTelegramBotAPI (telebot).

Version

4.33.0

Features

  • ESM-native - Pure ES module architecture for Node.js 18+
  • Architectural fidelity - Mirrors pyTelegramBotAPI's module separation
    • TeleBot - Core bot class (event registry, polling engine)
    • apihelper - Raw HTTP request compilation and endpoint execution
    • types - Telegram object schemas with style attribute for colored buttons
    • util - Worker pool, token validation, async helpers
  • Async event registry - Translated from Python's message_handler router array
  • InlineKeyboardButton style - Native support for "primary", "success", "danger" colored buttons
  • Worker pool - Async task execution with configurable thread count
  • Handler system - Decorator and direct registration for all update types

Installation

npm install exuxmarfoAPI

Quick Start

import { TeleBot } from 'exuxmarfoAPI';
import { InlineKeyboardButton, InlineKeyboardMarkup } from 'exuxmarfoAPI';

const bot = new TeleBot('YOUR_BOT_TOKEN', {
  parse_mode: 'HTML'
});

// Handler registration via decorator-style pattern
bot.message_handler({ commands: ['start'] })(async (msg) => {
  await bot.sendMessage(msg.chat.id, 'Welcome!');
});

// Colored buttons (style attribute)
bot.message_handler({ commands: ['menu'] })(async (msg) => {
  const markup = new InlineKeyboardMarkup([
    [
      new InlineKeyboardButton('Confirm', { callback_data: 'confirm', style: 'success' }),
      new InlineKeyboardButton('Delete', { callback_data: 'delete', style: 'danger' }),
      new InlineKeyboardButton('Info', { callback_data: 'info', style: 'primary' }),
    ]
  ]);
  await bot.sendMessage(msg.chat.id, 'Choose an action:', { reply_markup: markup });
});

// Callback query handler
bot.callback_query_handler({ func: (cq) => true })(async (cq) => {
  await bot.answerCallbackQuery(cq.id, { text: `You clicked: ${cq.data}` });
});

// Start polling
await bot.polling({ non_stop: true });

Directory Structure

exuxmarfoAPI/
├── package.json          # ESM config, dependencies
├── index.js              # Root export module
├── README.md             # This file
└── src/
    ├── TeleBot.js        # Core bot class
    ├── apihelper.js      # HTTP request engine
    ├── types.js          # Telegram type schemas
    ├── util.js           # Async helpers & worker pool
    └── ext/
        └── RE_REROUTE.md # Extension placeholder

Button Styles

The InlineKeyboardButton class natively accepts and serializes a style attribute for colored buttons in Telegram Mini Apps and clients that support it:

import { InlineKeyboardButton, InlineKeyboardMarkup } from 'exuxmarfoAPI';

// Available styles: "primary" (blue), "success" (green), "danger" (red)
const button = new InlineKeyboardButton('Submit', {
  callback_data: 'submit',
  style: 'success'   // serialized as `"style": "success"` in JSON payload
});

// Using the InlineKeyboardBuilder utility
import { InlineKeyboardBuilder } from 'exuxmarfoAPI';

const markup = new InlineKeyboardBuilder()
  .addStyledButton('Save', 'save_data', 'success')
  .addStyledButton('Cancel', 'cancel_op', 'danger')
  .nextRow()
  .addCallbackButton('Help', 'show_help')
  .build();

await bot.sendMessage(chatId, 'Actions:', { reply_markup: markup });

API Methods

All major Telegram Bot API methods are available on the TeleBot instance:

  • sendMessage, sendPhoto, sendAudio, sendDocument, sendVideo, sendVoice
  • forwardMessage, copyMessage, editMessageText, editMessageCaption
  • deleteMessage, pinChatMessage, unpinChatMessage
  • getChat, getChatMember, banChatMember, promoteChatMember
  • setWebhook, deleteWebhook, getWebhookInfo
  • answerCallbackQuery, answerInlineQuery
  • sendInvoice, createInvoiceLink
  • sendSticker, getStickerSet, createNewStickerSet
  • setMyCommands, getMyCommands
  • getAvailableGifts, sendGift
  • verifyUser, verifyChat
  • And many more...

Handler Types

| Handler | Registration Method | Trigger | |---------|-------------------|---------| | Message | message_handler() | Any incoming message | | Edited Message | edited_message_handler() | Edited messages | | Channel Post | channel_post_handler() | Channel posts | | Callback Query | callback_query_handler() | Inline button clicks | | Inline Query | inline_handler() | @bot queries | | Chosen Inline | chosen_inline_handler() | Selected inline result | | Shipping Query | shipping_query_handler() | Shipping inquiries | | Pre-checkout | pre_checkout_query_handler() | Payment checkouts | | Poll | poll_handler() | Poll state changes | | Chat Member | chat_member_handler() | Membership changes | | Join Request | chat_join_request_handler() | Chat join requests |

License

GPL-2.0