On this page
Context (ctx)
Cada handler recibe un objeto ctx enriquecido con informacion y metodos.
Propiedades
ctx.bot- Instancia del botctx.client- Cliente de Telegramctx.update- Update raw de Telegramctx.message- Objeto del mensajectx.userId- ID del usuarioctx.chatId- ID del chat
Metodos
ctx.reply(text, options)
Responde al mensaje actual.
JavaScript
await ctx.reply('Hola!');
ctx.send(text, options)
Envia un mensaje al chat actual.
ctx.sendFile(file, options)
Envia un archivo.
ctx.getReplyMessage()
Obtiene el mensaje al que se responde.
ctx.downloadMedia(message, options)
Descarga medios con progreso.