Last active
November 24, 2018 18:47
-
-
Save ejnshtein/a6dd749de9937487c854bc529ef52e67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Telegraf = require('./telegraf') | |
const { bottoken } = require('./conf.json') | |
const bot = new Telegraf(bottoken) | |
const pics = [ | |
'https://pp.userapi.com/c852032/v852032200/54df2/QYhx-gTOyHM.jpg', | |
'https://pp.userapi.com/c852032/v852032200/54e06/XthuKPlyWjY.jpg' | |
] | |
const chatId = 'put here chat id' | |
bot.telegram.sendMediaGroup(chatId, [ | |
{ | |
type: 'photo', | |
media: { | |
url: pics[0] | |
} | |
}, | |
{ | |
type: 'photo', | |
media: { | |
url: pics[0] | |
} | |
} | |
]).then(res => console.log('pic[0]:'+res)).catch(console.log) | |
bot.telegram.sendMediaGroup(chatId, [ | |
{ | |
type: 'photo', | |
media: { | |
url: pics[1] | |
} | |
}, | |
{ | |
type: 'photo', | |
media: { | |
url: pics[1] | |
} | |
} | |
]).then(res => console.log('pic[1]:'+res)).catch(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment