telegram-bot-simple-0.5.2: Easy to use library for building Telegram bots.
Safe HaskellNone
LanguageHaskell2010

Telegram.Bot.API.Stickers

Synopsis

Documentation

data StickerType Source #

Type of uploaded sticker file. Static or animated.

Constructors

PngSticker

PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.

TgsSticker

TGS animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements.

WebmSticker

WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements.

data StickerFile Source #

Sticker file with static/animated label.

data SendStickerRequest Source #

Request parameters for sendSticker.

Constructors

SendStickerRequest 

Fields

Instances

Instances details
Generic SendStickerRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Associated Types

type Rep SendStickerRequest :: Type -> Type #

ToJSON SendStickerRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

ToMultipart Tmp SendStickerRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Methods

toMultipart :: SendStickerRequest -> MultipartData Tmp

type Rep SendStickerRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

type Rep SendStickerRequest = D1 ('MetaData "SendStickerRequest" "Telegram.Bot.API.Stickers" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "SendStickerRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sendStickerChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeChatId) :*: (S1 ('MetaSel ('Just "sendStickerSticker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile) :*: S1 ('MetaSel ('Just "sendStickerDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendStickerProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendStickerReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))) :*: (S1 ('MetaSel ('Just "sendStickerAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendStickerReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup))))))

type SendStickerContent = "sendSticker" :> (MultipartForm Tmp SendStickerRequest :> Post '[JSON] (Response Message)) Source #

type SendStickerLink = "sendSticker" :> (ReqBody '[JSON] SendStickerRequest :> Post '[JSON] (Response Message)) Source #

sendSticker :: SendStickerRequest -> ClientM (Response Message) Source #

Use this method to send static .WEBP or animated .TGS stickers. On success, the sent Message is returned.

data UploadStickerFileRequest Source #

Request parameters for uploadStickerFile.

Constructors

UploadStickerFileRequest 

Fields

Instances

Instances details
Generic UploadStickerFileRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Associated Types

type Rep UploadStickerFileRequest :: Type -> Type #

ToJSON UploadStickerFileRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

ToMultipart Tmp UploadStickerFileRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Methods

toMultipart :: UploadStickerFileRequest -> MultipartData Tmp

type Rep UploadStickerFileRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

type Rep UploadStickerFileRequest = D1 ('MetaData "UploadStickerFileRequest" "Telegram.Bot.API.Stickers" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "UploadStickerFileRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "uploadStickerFileUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "uploadStickerFilePngSticker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile)))

type UploadStickerFileContent = "uploadStickerFile" :> (MultipartForm Tmp UploadStickerFileRequest :> Post '[JSON] (Response File)) Source #

type UploadStickerFileLink = "uploadStickerFile" :> (ReqBody '[JSON] UploadStickerFileRequest :> Post '[JSON] (Response File)) Source #

uploadStickerFile :: UploadStickerFileRequest -> ClientM (Response File) Source #

Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.

data CreateNewStickerSetRequest Source #

Request parameters for createNewStickerSet.

Constructors

CreateNewStickerSetRequest 

Fields

Instances

Instances details
Generic CreateNewStickerSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Associated Types

type Rep CreateNewStickerSetRequest :: Type -> Type #

ToJSON CreateNewStickerSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

ToMultipart Tmp CreateNewStickerSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Methods

toMultipart :: CreateNewStickerSetRequest -> MultipartData Tmp

type Rep CreateNewStickerSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

type Rep CreateNewStickerSetRequest = D1 ('MetaData "CreateNewStickerSetRequest" "Telegram.Bot.API.Stickers" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "CreateNewStickerSetRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "createNewStickerSetUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: (S1 ('MetaSel ('Just "createNewStickerSetName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "createNewStickerSetTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "createNewStickerSetSticker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StickerFile) :*: S1 ('MetaSel ('Just "createNewStickerSetEmojis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "createNewStickerSetContainsMasks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "createNewStickerSetMaskPosition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MaskPosition))))))

type CreateNewStickerSetContent = "createNewStickerSet" :> (MultipartForm Tmp CreateNewStickerSetRequest :> Post '[JSON] (Response Bool)) Source #

type CreateNewStickerSetLink = "createNewStickerSet" :> (ReqBody '[JSON] CreateNewStickerSetRequest :> Post '[JSON] (Response Bool)) Source #

createNewStickerSet :: CreateNewStickerSetRequest -> ClientM (Response Bool) Source #

Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You must use exactly one of the fields png_sticker or tgs_sticker. Returns True on success.

data AddStickerToSetRequest Source #

Request parameters for addStickerToSet.

Constructors

AddStickerToSetRequest 

Fields

Instances

Instances details
Generic AddStickerToSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Associated Types

type Rep AddStickerToSetRequest :: Type -> Type #

ToJSON AddStickerToSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

ToMultipart Tmp AddStickerToSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Methods

toMultipart :: AddStickerToSetRequest -> MultipartData Tmp

type Rep AddStickerToSetRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

type Rep AddStickerToSetRequest = D1 ('MetaData "AddStickerToSetRequest" "Telegram.Bot.API.Stickers" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "AddStickerToSetRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "addStickerToSetUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "addStickerToSetName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "addStickerToSetSticker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StickerFile) :*: (S1 ('MetaSel ('Just "addStickerToSetEmojis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "addStickerToSetMaskPosition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MaskPosition))))))

type AddStickerToSetContent = "addStickerToSet" :> (MultipartForm Tmp AddStickerToSetRequest :> Post '[JSON] (Response Bool)) Source #

type AddStickerToSetLink = "addStickerToSet" :> (ReqBody '[JSON] AddStickerToSetRequest :> Post '[JSON] (Response Bool)) Source #

addStickerToSet :: AddStickerToSetRequest -> ClientM (Response Bool) Source #

Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.

type GetStickerSet = "getStickerSet" :> (RequiredQueryParam "name" Text :> Get '[JSON] (Response StickerSet)) Source #

getStickerSet Source #

Arguments

:: Text

Name of the sticker set

-> ClientM (Response StickerSet) 

Use this method to get a sticker set. On success, a StickerSet object is returned.

type SetStickerPositionInSet = "setStickerPositionInSet" :> (RequiredQueryParam "sticker" Text :> (RequiredQueryParam "position" Integer :> Post '[JSON] (Response Bool))) Source #

setStickerPositionInSet Source #

Arguments

:: Text

File identifier of the sticker

-> Integer

New sticker position in the set, zero-based

-> ClientM (Response Bool) 

Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.

type DeleteStickerFromSet = "deleteStickerFromSet" :> (RequiredQueryParam "sticker" Text :> Post '[JSON] (Response Bool)) Source #

deleteStickerFromSet Source #

Arguments

:: Text

File identifier of the sticker

-> ClientM (Response Bool) 

Use this method to delete a sticker from a set created by the bot. Returns True on success.

data SetStickerSetThumbRequest Source #

Request parameters for setStickerSetThumb.

Constructors

SetStickerSetThumbRequest 

Fields

Instances

Instances details
Generic SetStickerSetThumbRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Associated Types

type Rep SetStickerSetThumbRequest :: Type -> Type #

ToJSON SetStickerSetThumbRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

ToMultipart Tmp SetStickerSetThumbRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

Methods

toMultipart :: SetStickerSetThumbRequest -> MultipartData Tmp

type Rep SetStickerSetThumbRequest Source # 
Instance details

Defined in Telegram.Bot.API.Stickers

type Rep SetStickerSetThumbRequest = D1 ('MetaData "SetStickerSetThumbRequest" "Telegram.Bot.API.Stickers" "telegram-bot-simple-0.5.2-inplace" 'False) (C1 ('MetaCons "SetStickerSetThumbRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "setStickerSetThumbName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "setStickerSetThumbUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "setStickerSetThumbThumb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputFile))))

type SetStickerSetThumbContent = "setStickerSetThumb" :> (MultipartForm Tmp SetStickerSetThumbRequest :> Post '[JSON] (Response Bool)) Source #

type SetStickerSetThumbLink = "setStickerSetThumb" :> (ReqBody '[JSON] SetStickerSetThumbRequest :> Post '[JSON] (Response Bool)) Source #

setStickerSetThumb :: SetStickerSetThumbRequest -> ClientM (Response Bool) Source #

Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success.