Method: Telegrammer::Bot#send_audio
- Defined in:
- lib/telegrammer/bot.rb
#send_audio(params) ⇒ Telegrammer::DataTypes::Message
Sends audio file to a user or group chat.
At this moment, Telegram only allows Ogg files encoded with the OPUS codec. If you need to send another file format, you must use #send_document.
229 230 231 232 233 234 235 236 237 238 |
# File 'lib/telegrammer/bot.rb', line 229 def send_audio(params) extra_params_validation = { audio: { required: true, class: [File, String] }, duration: { required: false, class: [Integer] }, performer: { required: false, class: [String] }, title: { required: false, class: [String] } } send_something(:audio, params, extra_params_validation) end |