1.1.1 • Published 3 years ago

telegraf-image v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 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

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago