packages feed

telegram-bot-api-7.4.5 / src / Telegram / Bot / API / Methods / SetCustomEmojiStickerSetThumbnail.hs

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.SetCustomEmojiStickerSetThumbnail whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport Data.Textimport GHC.Generics (Generic)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Internal.TH-- ** 'setCustomEmojiStickerSetThumbnail'data SetCustomEmojiStickerSetThumbnailRequest = SetCustomEmojiStickerSetThumbnailRequest    { setCustomEmojiStickerSetThumbnailName          :: Text -- ^ Sticker set name    , setCustomEmojiStickerSetThumbnailCustomEmojiId :: Maybe Text -- ^ Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.    }    deriving Genericinstance ToJSON   SetCustomEmojiStickerSetThumbnailRequest where toJSON = gtoJSONinstance FromJSON SetCustomEmojiStickerSetThumbnailRequest where parseJSON = gparseJSONtype SetCustomEmojiStickerSetThumbnail = "setCustomEmojiStickerSetThumbnail"  :> ReqBody '[JSON] SetCustomEmojiStickerSetThumbnailRequest  :> Post '[JSON] (Response Bool)-- | Use this method to set the thumbnail of a custom emoji sticker set.--   Returns 'True' on success.setCustomEmojiStickerSetThumbnail :: SetCustomEmojiStickerSetThumbnailRequest -> ClientM (Response Bool)setCustomEmojiStickerSetThumbnail = client (Proxy @SetCustomEmojiStickerSetThumbnail)makeDefault ''SetCustomEmojiStickerSetThumbnailRequest