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

@frogbotai/piece-telegram-bot

v0.25.0

Published

telegram-bot tools for FrogBot.

Readme

@frogbotai/piece-telegram-bot

Send Telegram Bot API requests and receive bot updates through FrogBot.

Usage

import { createTelegramBot } from '@frogbotai/piece-telegram-bot';

export const telegramBot = createTelegramBot({
  auth: { botToken: process.env.TELEGRAM_BOT_TOKEN! },
  webhookSecret: process.env.TELEGRAM_WEBHOOK_SECRET!,
  botUsername: 'frogbot',
});

Setup

  1. Create a bot with BotFather and copy its bot token.
  2. Choose a webhook secret containing only letters, numbers, underscores, or hyphens. Keep it private.
  3. Register https://<your-host>/api/webhooks/<piece-instance-slug> with Telegram's setWebhook method and pass the same value as secret_token.
  4. Add message, edited_message, channel_post, edited_channel_post, and callback_query to allowed_updates. Add any other update types used by newUpdate.
  5. Disable privacy mode with BotFather when the bot must receive ordinary group messages. Add the bot to each group or channel with the permissions needed to read and reply.
  6. Mount the instance in the agent's channels: [telegramBot] and explicitly configure the agent's access callback to permit the intended anonymous participants.

Telegram does not use a webhook challenge handshake. FrogBot verifies every delivery with the X-Telegram-Bot-Api-Secret-Token header. Set allowedUserIds to restrict channel conversations to known Telegram user IDs; omitted or empty values allow every Telegram user to reach the bot, subject to your FrogBot agent access rules.

Allowlisting does not authenticate a FrogBot user. Telegram channel identity always returns null, so default agent access denies even allowlisted users. For an intentionally public agent, access: () => true permits anonymous use on every agent entry point. For restricted access, use a callback that checks the intended channel and participant through req.context.channel; keep allowedUserIds configured as the Telegram-side filter.

Telegram permits one webhook per bot token. The channel adapter and newUpdate share the instance webhook above; do not register a separate subscription URL. Direct messages, groups, and each forum topic remain separate conversations.

The Start button (/start) and other direct-message commands reach the agent with their command text and arguments intact. Group commands addressed to @<botUsername> use the same mention and conversation routing as ordinary messages.

Actions

| Upstream action slug | Previous wrapper export | Native action | Notes | | ----------------------- | ----------------------- | --------------------- | ---------------------------------- | | send_text_message | sendTextMessage | sendTextMessage | | | send_media | sendMedia | sendMedia | Accepts a Telegram file ID or URL. | | send_document | sendDocument | sendDocument | Accepts a Telegram file ID or URL. | | send_audio | sendAudio | sendAudio | Accepts a Telegram file ID or URL. | | send_location | sendLocation | sendLocation | | | send_media_group | sendMediaGroup | sendMediaGroup | Accepts Telegram file IDs or URLs. | | send_poll | sendPoll | sendPoll | | | send_chat_action | sendChatAction | sendChatAction | | | edit_message_text | editMessageText | editMessageText | | | delete_message | deleteMessage | deleteMessage | | | forward_message | forwardMessage | forwardMessage | | | pin_message | pinMessage | pinMessage | | | unpin_message | unpinMessage | unpinMessage | | | get_chat | getChat | getChat | | | get_chat_member | getChatMember | getChatMember | | | get_file | getFile | getFile | Returns Telegram file metadata. | | create_invite_link | createInviteLink | createInviteLink | | | answer_callback_query | answerCallbackQuery | answerCallbackQuery | | | custom_api_call | customApiCall | customApiCall | |

Triggers

| Upstream trigger slug | Native trigger | Type | Notes | | ---------------------- | -------------- | ----- | ------------------------------------------------------------ | | new_telegram_message | newUpdate | app | Filters update types received by the shared channel webhook. |