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

Telegram.Bot.API.Methods.SendAudio

Contents

Synopsis

sendAudio

data SendAudioRequest Source #

Request parameters for sendAudio.

Constructors

SendAudioRequest 

Fields

Instances

Instances details
Generic SendAudioRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendAudio

Associated Types

type Rep SendAudioRequest :: Type -> Type #

ToJSON SendAudioRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendAudio

ToMultipart Tmp SendAudioRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendAudio

Methods

toMultipart :: SendAudioRequest -> MultipartData Tmp

type Rep SendAudioRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.SendAudio

type Rep SendAudioRequest = D1 ('MetaData "SendAudioRequest" "Telegram.Bot.API.Methods.SendAudio" "telegram-bot-api-6.5-inplace" 'False) (C1 ('MetaCons "SendAudioRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sendAudioChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeChatId) :*: (S1 ('MetaSel ('Just "sendAudioMessageThreadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageThreadId)) :*: S1 ('MetaSel ('Just "sendAudioAudio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile))) :*: ((S1 ('MetaSel ('Just "sendAudioDuration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "sendAudioPerformer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sendAudioTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendAudioThumb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InputFile))))) :*: (((S1 ('MetaSel ('Just "sendAudioCaption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sendAudioParseMode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ParseMode))) :*: (S1 ('MetaSel ('Just "sendAudioCaptionEntities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [MessageEntity])) :*: S1 ('MetaSel ('Just "sendAudioDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendAudioProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendAudioReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))) :*: (S1 ('MetaSel ('Just "sendAudioAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendAudioReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup)))))))

type SendAudioContent = "sendAudio" :> (MultipartForm Tmp SendAudioRequest :> Post '[JSON] (Response Message)) Source #

type SendAudioLink = "sendAudio" :> (ReqBody '[JSON] SendAudioRequest :> Post '[JSON] (Response Message)) Source #

sendAudio :: SendAudioRequest -> ClientM (Response Message) Source #

Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.

For sending voice messages, use the sendVoice method instead.