| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Calamity.Client
Contents
Description
Module containing the core client stuff
Synopsis
- module Calamity.Client.Client
- module Calamity.Client.Types
Documentation
module Calamity.Client.Client
module Calamity.Client.Types
Client stuff
This module provides the core components for running a discord client, along with abstractions for registering event handlers, firing custom events, and waiting on events.
Registered Metrics
Counter:
"events_recieved" [type, shard]Incremented for each event received, the
typeparameter is the type of event (the name of the constructor inDispatchData), andshardis the ID of the shard that received the event.
Histogram:
"cache_update"Tracks how long it takes to update the cache after recieving an event.
Histogram:
"event_handle"Tracks how long it takes to process an event handler for an event.
Examples
A simple client that prints every message recieved:
void.runFinal.embedToFinal.runCacheInMemory.runMetricsNoop$runBotIO(BotTokentoken) $ doreact@'MessageCreateEvt$ \msg ->embed$