UNPKG
soroush-bot-node-sdk
Version:
latest (1.0.0)
1.0.0
Soroush bot nodejs sdk
github.com/2012mjm/soroush-bot-node-sdk
soroush-bot-node-sdk
/
examples
/
upload_file.js
14 lines
(11 loc)
•
244 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const
SoroushBot
=
require
(
"../src/SoroushBot"
);
const
bot =
new
SoroushBot
(process.
env
.
BOT_TOKEN
);
const
filePath =
"my_image.jpg"
; bot.
uploadFile
(filePath).
then
(
res
=>
{
console
.
log
(res); },
err
=>
{
console
.
log
(err); } );