edisonchee / slimbot

Telegram Bot API for Node.js
MIT License
223 stars 37 forks source link

optionalParams in sendPhoto #10

Closed devjet closed 6 years ago

devjet commented 6 years ago

Hi there How to use optionalParams with sending(uploading) photos, for examle I need _disablenotification: true but when I use like this:

 let optionalParams = {
        disable_notification: true
    };

    slimbot.sendPhoto(TELEGRAM_CHAT_NAME, fileUpload,optionalParams)

It's not working thanks

edisonchee commented 6 years ago

Hi @devjet, what is the error you got?

edisonchee commented 6 years ago

@devjet, also check if using chat_id works. That's how the method should work e.g.

slimbot.sendPhoto(CHAT_ID, fileUpload, optionalParams)

You can refer to the API here.

edisonchee commented 6 years ago

Closed due to inactivity.