MCPcopy Index your code
hub / github.com/cyclic-software/starter-telegram-bot

github.com/cyclic-software/starter-telegram-bot @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
10 symbols 22 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Telegram Bot, built on Cyclic 🤖

Say hello to the Telegram Bot template! Built on the grammY framework and hosted by the Cyclic serverless platform.

  • Handling Inline Queries.
  • Responding to commands.
  • Interactive Inline Keyboards.

Try it out now! \@CyclicDemoBot

The Telegram Bot Starter.

Deployment

Prerequisites

Make sure that you have the following programs installed on your own local machine.

Step 1 — Deploy on Cyclic 🚀

Take your new Telegram bot live with one click. \ Free hosting. No credit card required.

Deploy to Cyclic

Deploying an app to Cyclic

Step 2 — Configure environment variables

  1. Grab your Telegram bot's API token by sending a message to \@BotFather.

Send /newbot to @BotFather to create a new bot and get its API token.

  1. Add that API token to your Cyclic deployment's environment variables.

  1. Set the NODE_ENV environment variable to production.

Step 3 — Link the bot with your new server

Connect your Telegram bot to your server by sending the following HTTP request using your terminal:

Linux / MacOS

export TELEGRAM_API_TOKEN=... # YOUR TELEGRAM API TOKEN
export TELEGRAM_WEBHOOK_URL=... # YOUR CYCLIC DEPLOYMENT URL

curl "https://api.telegram.org/bot$TELEGRAM_API_TOKEN/setWebhook?url=$TELEGRAM_WEBHOOK_URL"

How to run it locally?

Prerequisites

Local installation

  1. Clone the repository to your machine: git clone https://github.com/eludadev/telegram-bot && cd telegram-bot
  2. Grab your bot's API token by messaging \@BotFather. (see above)
  3. Create the file .env and add the following line:
TELEGRAM_TOKEN=... # YOUR TELEGRAM API TOKEN
  1. Download dependencies: yarn
  2. Start your bot: yarn dev

Usage Examples

Being greeted by the bot

Bot responding to the yo command with

Applying text effects

Bot applying various text effects such as monospace and italic to the text

Invoking the bot in other chats

Note This feature is also known as Inline Queries.

Bot applying the monospace text effect to the text

Extension points exported contracts — how you extend this code

ProcessEnv (Interface)
(no doc)
environment.d.ts

Core symbols most depended-on inside this repo

effectCallbackCodeAccessor
called by 2
src/bot.ts
effectsKeyboardAccessor
called by 2
src/bot.ts
textEffectResponseAccessor
called by 2
src/bot.ts
applyTextEffect
called by 2
src/textEffects.ts
getFlag
called by 2
src/textEffects.ts
effectsAccessor
called by 1
src/bot.ts
parseTextEffectResponse
called by 1
src/bot.ts
getType
called by 1
src/textEffects.ts

Shape

Function 9
Interface 1

Languages

TypeScript100%

Modules by API surface

src/bot.ts6 symbols
src/textEffects.ts3 symbols
environment.d.ts1 symbols

For agents

$ claude mcp add starter-telegram-bot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact