Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 24, 2022 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3ecdb9a8665e3251f4bf2d91ea9704ac to your computer and use it in GitHub Desktop.
Save parzibyte/3ecdb9a8665e3251f4bf2d91ea9704ac to your computer and use it in GitHub Desktop.
const mejorFoto = msg.photo[msg.photo.length - 1]; // al momento de escribir esto, la foto con mejor calidad estaba en la última posición
const nombreFotoDescargada = await bot.downloadFile(mejorFoto.file_id, "./");
const fotoConGloboDeTexto = await agregarGloboDeTextoYDevolverBuffer(nombreFotoDescargada, 15);
fs.unlink(nombreFotoDescargada, () => {
bot.sendPhoto(chatId, fotoConGloboDeTexto);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment