packages feed

telegram-bot-api-7.4 / src / Telegram / Bot / API / Methods / SetMessageReaction.hs

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.SetMessageReaction 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-- ** 'setMessageReaction'-- | Request parameters for 'setMessageReaction'data SetMessageReactionRequest = SetMessageReactionRequest  { setMessageReactionRequestChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format \@channelusername).  , setMessageReactionRequestMessageId :: MessageId -- ^ Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.  , setMessageReactionRequestReaction :: Maybe [ReactionType] -- ^ New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.  , setMessageReactionRequestIsBig :: Maybe Bool -- ^ Pass 'True' to set the reaction with a big animation.  }  deriving Genericinstance ToJSON   SetMessageReactionRequest where toJSON = gtoJSONinstance FromJSON SetMessageReactionRequest where parseJSON = gparseJSONtype SetMessageReaction = "setMessageReaction"  :> ReqBody '[JSON] SetMessageReactionRequest  :> Post '[JSON] (Response Bool)setMessageReaction :: SetMessageReactionRequest -> ClientM (Response Bool)setMessageReaction = client (Proxy @SetMessageReaction)makeDefault ''SetMessageReactionRequest