Telegex.send_voice
You're seeing just the function
send_voice
, go back to Telegex module for more information.
Specs
send_voice(integer() | String.t(), Telegex.Model.InputFile.t() | String.t(), caption: String.t(), parse_mode: String.t(), caption_entities: [Telegex.Model.MessageEntity.t()], duration: integer(), disable_notification: boolean(), reply_to_message_id: integer(), allow_sending_without_reply: boolean(), reply_markup: Telegex.Model.InlineKeyboardMarkup.t() | Telegex.Model.ReplyKeyboardMarkup.t() | Telegex.Model.ReplyKeyboardRemove.t() | Telegex.Model.ForceReply.t() ) :: {:ok, Telegex.Model.Message.t()} | {:error, Telegex.Model.errors()}
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Telegex.Model.Audio
or Telegex.Model.Document
).
On success, the sent Telegex.Model.Message
is returned.
Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.