kykint

Choose largest received image possible

Showing 1 changed file with 1 additions and 1 deletions
......@@ -196,7 +196,7 @@ bot.onText(/^\/(t|translate)($| ((.|\n)+))/, (msg, match) => {
bot.on('photo', (msg) => {
const user = msg.from;
const chatId = msg.chat.id;
const photo = msg.photo[2];
const photo = msg.photo[msg.photo.length - 1]; // Choose largest image possible
const photoId = photo.file_id;
// Download the image, which will later be deleted to avoid git detection
......