Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Query info about connected Guilds and Channels
Synopsis
- data Cache = Cache {
- cacheCurrentUser :: !User
- cacheDMChannels :: !(Map ChannelId Channel)
- cacheGuilds :: !(Map GuildId (Maybe (Guild, Maybe GuildCreateData)))
- cacheChannels :: !(Map ChannelId Channel)
- cacheApplication :: !FullApplication
- data CacheHandle = CacheHandle {}
- initializeCache :: User -> FullApplication -> CacheHandle -> IO ()
- cacheLoop :: Bool -> CacheHandle -> Chan Text -> IO ()
- adjustCache :: EventInternalParse -> Cache -> Cache
Documentation
Cached data from gateway. Set RunDiscordOpts.discordEnableCache=true to enable all the fields
Cache | |
|
data CacheHandle Source #
Internal handle for cacheLoop to manage the cache
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