Home / Docs / Quick Start
On this page

Quick Start

En pocos minutos tendras tu bot funcionando.

1. Obtener Credenciales

2. Crear el Bot

bot.js
const Zerogram = require('zerogramjs');

const bot = new Zerogram(
    API_ID,
    API_HASH,
    'bot:TOKEN'
);

await bot.init();

bot.command('start', async (ctx) => {
    await ctx.reply('Hola! Soy tu bot');
});

3. Ejecutar

Bash
node bot.js

Comandos con Argumentos

JavaScript
bot.command('echo', async (ctx, args) => {
    await ctx.reply(args.join(' '));
});