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) => { ...@@ -196,7 +196,7 @@ bot.onText(/^\/(t|translate)($| ((.|\n)+))/, (msg, match) => {
196 bot.on('photo', (msg) => { 196 bot.on('photo', (msg) => {
197 const user = msg.from; 197 const user = msg.from;
198 const chatId = msg.chat.id; 198 const chatId = msg.chat.id;
199 - const photo = msg.photo[2]; 199 + const photo = msg.photo[msg.photo.length - 1]; // Choose largest image possible
200 const photoId = photo.file_id; 200 const photoId = photo.file_id;
201 201
202 // Download the image, which will later be deleted to avoid git detection 202 // Download the image, which will later be deleted to avoid git detection
......