packages feed

telegram-bot-api-6.7.1 / src / Telegram / Bot / API / Methods / GetMyDefaultAdministratorRights.hs

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.GetMyDefaultAdministratorRights whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport GHC.Generics (Generic)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Typesimport Telegram.Bot.API.Internal.TH-- ** 'getMyDefaultAdministratorRights'-- | Request parameters for 'getMyDefaultAdministratorRights'.newtype GetMyDefaultAdministratorRightsRequest = GetMyDefaultAdministratorRightsRequest  { getMyDefaultAdministratorRightsRequestForChannels :: Maybe Bool -- ^ Pass 'True' to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.  }  deriving Genericinstance ToJSON   GetMyDefaultAdministratorRightsRequest where toJSON = gtoJSONinstance FromJSON GetMyDefaultAdministratorRightsRequest where parseJSON = gparseJSONtype GetMyDefaultAdministratorRights = "getMyDefaultAdministratorRights"  :> ReqBody '[JSON] GetMyDefaultAdministratorRightsRequest  :> Post '[JSON] (Response ChatAdministratorRights)-- | Use this method to get the current default administrator rights of the bot.-- Returns 'ChatAdministratorRights' on success.getMyDefaultAdministratorRights  :: GetMyDefaultAdministratorRightsRequest -> ClientM (Response ChatAdministratorRights)getMyDefaultAdministratorRights = client (Proxy @GetMyDefaultAdministratorRights)makeDefault ''GetMyDefaultAdministratorRightsRequest