packages feed

telegram-bot-api-7.4.4 / src / Telegram / Bot / API / Methods / SetMyDescription.hs

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.SetMyDescription whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport GHC.Generics (Generic)import Data.Text (Text)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Internal.TH-- ** 'setMyDescription'data SetMyDescriptionRequest = SetMyDescriptionRequest  { setMyDescriptionDescription  :: Maybe Text -- ^ New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.  , setMyDescriptionLanguageCode :: Maybe Text -- ^ A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.  }  deriving Genericinstance ToJSON   SetMyDescriptionRequest where toJSON = gtoJSONinstance FromJSON SetMyDescriptionRequest where parseJSON = gparseJSONtype SetMyDescription = "setMyDescription"  :> ReqBody '[JSON] SetMyDescriptionRequest  :> Post '[JSON] (Response Bool)-- | Use this method to change the bot's description,--   which is shown in the chat with the bot if the chat is empty.--   Returns 'True' on success.setMyDescription :: SetMyDescriptionRequest -> ClientM (Response Bool)setMyDescription = client (Proxy @SetMyDescription)makeDefault ''SetMyDescriptionRequest