1.1.1 • Published 4 years ago

telegraf-image v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Telegraf Image Downloader

Developer: Husniddin Developer

You can download telegram bot images via this package

Installing

npm install telegraf-helper --save

Using

require('dotenv').config();
const Telegraf = require('telegraf')
const bot = new Telegraf(process.env.TOKEN)
var helper = require('telegraf-image');

bot.on(['photo'], async (ctx) => {
    imageData = await bot.telegram.getFile(ctx.message.photo[ctx.message.photo.length - 1].file_id);

    helper.download(imageData, imageData.file_path, process.env.TOKEN, function () {
        console.log(imageData.file_path);
    })
});
1.1.1

4 years ago

1.0.2

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago