discord-haskell-1.16.1: Write bots for Discord in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Discord.Internal.Gateway.Cache

Description

Query info about connected Guilds and Channels

Synopsis

Documentation

data Cache Source #

Cached data from gateway. Set RunDiscordOpts.discordEnableCache=true to enable all the fields

Constructors

Cache 

Fields

Instances

Instances details
Show Cache Source # 
Instance details

Defined in Discord.Internal.Gateway.Cache

Methods

showsPrec :: Int -> Cache -> ShowS #

show :: Cache -> String #

showList :: [Cache] -> ShowS #

data CacheHandle Source #

Internal handle for cacheLoop to manage the cache

Constructors

CacheHandle 

initializeCache :: User -> FullApplication -> CacheHandle -> IO () Source #

Internally used to setup the first cache

cacheLoop :: Bool -> CacheHandle -> Chan Text -> IO () Source #

IO loop to update cache on each gateway event

adjustCache :: EventInternalParse -> Cache -> Cache Source #

Apply gateway event to cache