soroush-bot-node-sdk
Version:
Soroush bot nodejs sdk
27 lines (22 loc) • 584 B
JavaScript
const SoroushBot = require("../src/SoroushBot");
const bot = new SoroushBot(process.env.BOT_TOKEN);
const to = "HtAWSaNaCNw7VnlPrWWyhaQrOt6J4oCbXBHtAWSaNaCNw7VnlPboGhYut1";
const fileUrl = "GrAsMSI1kgbGrza8O..."; // received file url from server
const imageWidth = 600;
const imageHeight = 600;
// Optional
const options = {
caption: "Caption for this image"
// fileName,
// thumbnailUrl,
// fileSize,
// keyboard
};
bot.sendImageUploaded(to, fileUrl, imageWidth, imageHeight, options).then(
res => {
console.log(res);
},
err => {
console.log(err);
}
);