packages feed

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

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.DeleteMyCommands 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.Typesimport Telegram.Bot.API.Internal.TH-- ** 'deleteMyCommands'-- | Request parameters for 'deleteMyCommands'.data DeleteMyCommandsRequest = DeleteMyCommandsRequest  { deleteMyCommandsScope :: Maybe BotCommandScope  -- ^ A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.  , deleteMyCommandsLanguageCode :: Maybe Text  -- ^ 	A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands  }  deriving Genericinstance ToJSON   DeleteMyCommandsRequest where toJSON = gtoJSONinstance FromJSON DeleteMyCommandsRequest where parseJSON = gparseJSONtype DeleteMyCommands = "deleteMyCommands"  :> ReqBody '[JSON] DeleteMyCommandsRequest  :> Post '[JSON] (Response Bool)-- | Use this method to delete the list of--   the bot's commands for the given scope--   and user language. After deletion, higher--   level commands will be shown to affected users.--   Returns True on success.deleteMyCommands :: DeleteMyCommandsRequest -> ClientM (Response Bool)deleteMyCommands = client (Proxy @DeleteMyCommands)makeDefault ''DeleteMyCommandsRequest