calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Calamity.HTTP

Contents

Description

Combined http request stuff

Synopsis

Documentation

invoke :: (Members '[RatelimitEff, TokenEff, LogEff, MetricEff, Embed IO] r, Request a, ReadResponse (Result a)) => a -> Sem r (Either RestError (Result a)) Source #

data RestError Source #

Instances

Instances details
Show RestError Source # 
Instance details

Defined in Calamity.HTTP.Internal.Types

data TokenEff m a where Source #

Constructors

GetBotToken :: TokenEff m Token 

HTTP

This module contains all the http related things

Registered Metrics

  1. Gauge: "inflight_requests" [route]

    Keeps track of how many requests are currently in-flight, the route parameter will be the route that is currently active.

  1. Counter: "total_requests" [route]

    Incremented on every request, the route parameter is the route that the request was made on.

Examples

Editing a message:

invoke $ EditMessage someChannel someMessage (Just "new content") Nothing