Safe Haskell | None |
---|---|
Language | Haskell2010 |
Calamity.Cache.Eff
Description
Effect for handling the cache
Documentation
data CacheEff m a where Source #
Constructors
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 |
GetGuildChannel :: Snowflake GuildChannel -> CacheEff m (Maybe GuildChannel) | Get a |
GetGuilds :: CacheEff m [Guild] | Get all |
DelGuild :: Snowflake Guild -> CacheEff m () | Delete a |
SetDM :: DMChannel -> CacheEff m () | Set or Update a |
GetDM :: Snowflake DMChannel -> CacheEff m (Maybe DMChannel) | Get a |
GetDMs :: CacheEff m [DMChannel] | Get all |
DelDM :: Snowflake DMChannel -> CacheEff m () | Delete a |
SetUser :: User -> CacheEff m () | Set or Update a |
GetUser :: Snowflake User -> CacheEff m (Maybe User) | Get a |
GetUsers :: CacheEff m [User] | Get all |
DelUser :: Snowflake User -> CacheEff m () | Delete a |
SetUnavailableGuild :: Snowflake Guild -> CacheEff m () | Flag a |
IsUnavailableGuild :: Snowflake Guild -> CacheEff m Bool | Test if a |
GetUnavailableGuilds :: CacheEff m [Snowflake Guild] | Get all |
DelUnavailableGuild :: Snowflake Guild -> CacheEff m () | Unflag a |
SetMessage :: Message -> CacheEff m () | Add or Update a |
GetMessage :: Snowflake Message -> CacheEff m (Maybe Message) | Get a |
GetMessages :: CacheEff m [Message] | Get all |
DelMessage :: Snowflake Message -> CacheEff m () | Delete a |
setBotUser :: forall r. MemberWithError CacheEff r => User -> Sem r () Source #
getGuildChannel :: forall r. MemberWithError CacheEff r => Snowflake GuildChannel -> Sem r (Maybe GuildChannel) 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 #
isUnavailableGuild :: forall r. MemberWithError CacheEff r => Snowflake Guild -> Sem r Bool 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 #
getMessages :: forall r. MemberWithError CacheEff r => Sem r [Message] Source #