Api functions
Api functions it all functions from https://core.telegram.org/bots/api
You can use it with BJS.
Example 1. Send audio to current chat
Api.sendAudio({
audio: "https://www.bensound.org/bensound-music/bensound-funnysong.mp3"
});send audio to other chat:
Api.sendAudio({
chat_id: 5515411,
audio: "https://www.bensound.org/bensound-music/bensound-funnysong.mp3"
});You can pass allowed parameters. For example for sendAudio it can be title and disable_notification
Api.sendAudio({
audio: "https://www.bensound.org/bensound-music/bensound-funnysong.mp3"
title: "test audio",
disable_notification: true
});Example 2. Send photo with inline keyboard

Get methods
You can call Api get methods (and others methods too). Need pass on_result key.
For example get all user's profile photos:
Command /get
/getCommand onGetProfilePhotos
onGetProfilePhotosError handling
It is possible to capture error with on_error param
In command on_error:
Last updated
Was this helpful?