Skip to content

Add example code for every single framework adapter #993

Description

@eclipseeer

The example below doesn't contains all info about how dev can setup webhooks. Would be nice to provide more clear example for this:
image

for example:

import express from 'express';
import { Bot, webhookCallback } from 'grammy';

const app = express();
app.use(express.json());

const bot = new Bot(process.env.TELEGRAM_BOT_TOKEN);
await bot.api.setWebhook('https://base_server_url');

bot.on('message', async (ctx) => { ... });

app.use(webhookCallback(bot, 'express'));
app.listen(8080);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions