packages feed

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

{-# LANGUAGE DataKinds #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.DeleteMessage whereimport Data.Proxyimport Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Types-- ** 'deleteMessage'-- | Notice that deleting by POST method was bugged, so we use GETtype DeleteMessage = "deleteMessage"  :> RequiredQueryParam "chat_id" ChatId  :> RequiredQueryParam "message_id" MessageId  :> Get '[JSON] (Response Bool)-- | Use this method to delete message in chat.-- On success, the sent Bool is returned.deleteMessage :: ChatId -> MessageId -> ClientM (Response Bool)deleteMessage = client (Proxy @DeleteMessage)