@shernshiou all the _multiparts actually return application/json data and the method sendPhoto/Audio/etc calls return an err; the reason you haven't run into it is because the example sendPhoto call prints out the result and doesn't try to use it (e.g., the promise actually gets rejected).
Also removed some extraneous console.log statements and replaced with the optional debug utility so dependent authors don't have to have console.logs there if they don't want.
Last change was fixing a bug in Bot._poll which arises if there's an HTTP error in the long-poll request. I encountered this while paused for awhile in the debugger, but it could happen due to normal transport errors as well.
@shernshiou all the _multiparts actually return application/json data and the method sendPhoto/Audio/etc calls return an err; the reason you haven't run into it is because the example sendPhoto call prints out the result and doesn't try to use it (e.g., the promise actually gets rejected).
Also removed some extraneous console.log statements and replaced with the optional
debug
utility so dependent authors don't have to have console.logs there if they don't want.Last change was fixing a bug in Bot._poll which arises if there's an HTTP error in the long-poll request. I encountered this while paused for awhile in the debugger, but it could happen due to normal transport errors as well.