telegram-bot-api-6.5: Easy to use library for building Telegram bots. Exports Telegram Bot API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Telegram.Bot.API.Methods.SendVoice

Contents

Synopsis

sendVoice

data SendVoiceRequest Source #

Request parameters for sendVoice.

Constructors

SendVoiceRequest 

Fields

Instances

Instances details
ToJSON SendVoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendVoice

Generic SendVoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendVoice

Associated Types

type Rep SendVoiceRequest :: Type -> Type #

ToMultipart Tmp SendVoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendVoice

type Rep SendVoiceRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendVoice

type Rep SendVoiceRequest = D1 ('MetaData "SendVoiceRequest" "Telegram.Bot.API.Methods.SendVoice" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "SendVoiceRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sendVoiceChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeChatId) :*: (S1 ('MetaSel ('Just "sendVoiceMessageThreadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageThreadId)) :*: S1 ('MetaSel ('Just "sendVoiceVoice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile))) :*: (S1 ('MetaSel ('Just "sendVoiceCaption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "sendVoiceParseMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ParseMode)) :*: S1 ('MetaSel ('Just "sendVoiceCaptionEntities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [MessageEntity]))))) :*: ((S1 ('MetaSel ('Just "sendVoiceDuration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "sendVoiceDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendVoiceProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "sendVoiceReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)) :*: (S1 ('MetaSel ('Just "sendVoiceAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendVoiceReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup)))))))

sendVoice :: SendVoiceRequest -> ClientM (Response Message) Source #

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 Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.