Skip to content

sendAudio

Sahri Riza Umami edited this page Mar 13, 2017 · 3 revisions

Send an audio message.

sendAudio(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, audio, duration, title, performer, caption)  
Option Description
chat_id Chat to send message.
reply_to_message_id Identifier of a message to reply to or 0.
disable_notification Pass true, to disable notification about the message.
from_background Pass true, if the message is sent from background.
reply_markup Bots only. Markup for replying to message.
audio Audio file to send
album_cover_thumb Thumb of the album's cover, if available
duration Duration of audio in seconds, may be replaced by the server
title Title of the audio, 0-64 characters, may be replaced by the server
performer Performer of the audio, 0-64 characters, may be replaced by the server
caption Audio caption, 0-200 characters

Example

  • Send audio message from a message with id 212.

    sendAudio(1234567890, 0, 0, 1, nil, 212)
  • Send audio message from a local file.

    sendAudio(1234567890, 0, 0, 1, nil, '/tmp/music.mp3')
  • Send audio message by its persistent_id.

    sendAudio(1234567890, 0, 0, 1, nil, 'BQADBQADugIAAlACfAHYo-ndqs6ZVAI', nil, nil, nil, 'T-Ara')  

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally