Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effect for handling the cache
Documentation
data CacheEff m a where Source #
SetBotUser :: User -> CacheEff m () | Set the |
GetBotUser :: CacheEff m (Maybe User) | Get the |
SetGuild :: Guild -> CacheEff m () | Set or Update a |
GetGuild :: Snowflake Guild -> CacheEff m (Maybe Guild) | Get a |
DelGuild :: Snowflake Guild -> CacheEff m () | Delete a |
SetDM :: DMChannel -> CacheEff m () | Set or Update a |
GetDM :: Snowflake DMChannel -> CacheEff m (Maybe DMChannel) | Get a |
DelDM :: Snowflake DMChannel -> CacheEff m () | Delete a |
SetUser :: User -> CacheEff m () | Set or Update a |
GetUser :: Snowflake User -> CacheEff m (Maybe User) | Get a |
DelUser :: Snowflake User -> CacheEff m () | Delete a |
SetUnavailableGuild :: Snowflake Guild -> CacheEff m () | Flag a |
IsUnavailableGuild :: Snowflake Guild -> CacheEff m Bool | Test if a |
DelUnavailableGuild :: Snowflake Guild -> CacheEff m () | Unflag a |
SetMessage :: Message -> CacheEff m () | Add or Update a |
GetMessage :: Snowflake Message -> CacheEff m (Maybe Message) | Get a |
DelMessage :: Snowflake Message -> CacheEff m () | Delete a |
Instances
type DefiningModule (CacheEff :: k -> Type -> Type) Source # | |
Defined in Calamity.Cache.Eff |
setBotUser :: forall r. MemberWithError CacheEff r => User -> Sem r () Source #
getBotUser :: forall r. MemberWithError CacheEff r => Sem r (Maybe User) Source #
updateDM :: Member CacheEff r => Snowflake DMChannel -> (DMChannel -> DMChannel) -> Sem r () Source #
getDM :: forall r. MemberWithError CacheEff r => Snowflake DMChannel -> Sem r (Maybe DMChannel) Source #
setUnavailableGuild :: forall r. MemberWithError CacheEff r => Snowflake Guild -> Sem r () Source #
isUnavailableGuild :: forall r. MemberWithError CacheEff r => Snowflake Guild -> Sem r Bool Source #
delUnavailableGuild :: forall r. MemberWithError CacheEff r => Snowflake Guild -> Sem r () Source #
setMessage :: forall r. MemberWithError CacheEff r => Message -> Sem r () Source #
updateMessage :: Member CacheEff r => Snowflake Message -> (Message -> Message) -> Sem r () Source #
getMessage :: forall r. MemberWithError CacheEff r => Snowflake Message -> Sem r (Maybe Message) Source #
delMessage :: forall r. MemberWithError CacheEff r => Snowflake Message -> Sem r () Source #