Skip to content

Commit

Permalink
feat: download sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
ndresgarc committed Dec 11, 2023
1 parent 15bebcb commit e30e00a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/handlers/sticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ export const sticker = (msg, bot, config) => {
console.log('sticker handler');
bot.sendMessage(msg.chat.id, 'Procesing...');
var sticker = msg.sticker;

bot.downloadFile(sticker.file_id, './stickers').then((path) => {
console.log(path);
bot.sendMessage(msg.chat.id, 'Done!');
});

/* Add as image metadata */
/*
bot.getFileLink(sticker.file_id).then((link) => {
console.log(link);
bot.sendMessage(msg.chat.id, 'Done!');
});
*/
}

0 comments on commit e30e00a

Please sign in to comment.