Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Effect for handling the cache
Synopsis
- data CacheEff m a where
- SetBotUser :: User -> CacheEff m ()
- GetBotUser :: CacheEff m (Maybe User)
- SetGuild :: Guild -> CacheEff m ()
- GetGuild :: Snowflake Guild -> CacheEff m (Maybe Guild)
- GetGuildChannel :: Snowflake GuildChannel -> CacheEff m (Maybe GuildChannel)
- GetGuilds :: CacheEff m [Guild]
- DelGuild :: Snowflake Guild -> CacheEff m ()
- SetDM :: DMChannel -> CacheEff m ()
- GetDM :: Snowflake DMChannel -> CacheEff m (Maybe DMChannel)
- GetDMs :: CacheEff m [DMChannel]
- DelDM :: Snowflake DMChannel -> CacheEff m ()
- SetUser :: User -> CacheEff m ()
- GetUser :: Snowflake User -> CacheEff m (Maybe User)
- GetUsers :: CacheEff m [User]
- DelUser :: Snowflake User -> CacheEff m ()
- SetUnavailableGuild :: Snowflake Guild -> CacheEff m ()
- IsUnavailableGuild :: Snowflake Guild -> CacheEff m Bool
- GetUnavailableGuilds :: CacheEff m [Snowflake Guild]
- DelUnavailableGuild :: Snowflake Guild -> CacheEff m ()
- SetMessage :: Message -> CacheEff m ()
- GetMessage :: Snowflake Message -> CacheEff m (Maybe Message)
- GetMessages :: CacheEff m [Message]
- DelMessage :: Snowflake Message -> CacheEff m ()
- setBotUser :: forall r. Member CacheEff r => User -> Sem r ()
- updateBotUser :: Member CacheEff r => (User -> User) -> Sem r ()
- getBotUser :: forall r. Member CacheEff r => Sem r (Maybe User)
- setGuild :: forall r. Member CacheEff r => Guild -> Sem r ()
- updateGuild :: Member CacheEff r => Snowflake Guild -> (Guild -> Guild) -> Sem r ()
- getGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r (Maybe Guild)
- getGuildChannel :: forall r. Member CacheEff r => Snowflake GuildChannel -> Sem r (Maybe GuildChannel)
- getGuilds :: forall r. Member CacheEff r => Sem r [Guild]
- delGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r ()
- setDM :: forall r. Member CacheEff r => DMChannel -> Sem r ()
- updateDM :: Member CacheEff r => Snowflake DMChannel -> (DMChannel -> DMChannel) -> Sem r ()
- getDM :: forall r. Member CacheEff r => Snowflake DMChannel -> Sem r (Maybe DMChannel)
- getDMs :: forall r. Member CacheEff r => Sem r [DMChannel]
- delDM :: forall r. Member CacheEff r => Snowflake DMChannel -> Sem r ()
- setUser :: forall r. Member CacheEff r => User -> Sem r ()
- updateUser :: Member CacheEff r => Snowflake User -> (User -> User) -> Sem r ()
- getUser :: forall r. Member CacheEff r => Snowflake User -> Sem r (Maybe User)
- getUsers :: forall r. Member CacheEff r => Sem r [User]
- delUser :: forall r. Member CacheEff r => Snowflake User -> Sem r ()
- setUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r ()
- isUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r Bool
- getUnavailableGuilds :: forall r. Member CacheEff r => Sem r [Snowflake Guild]
- delUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r ()
- setMessage :: forall r. Member CacheEff r => Message -> Sem r ()
- updateMessage :: Member CacheEff r => Snowflake Message -> (Message -> Message) -> Sem r ()
- getMessage :: forall r. Member CacheEff r => Snowflake Message -> Sem r (Maybe Message)
- getMessages :: forall r. Member CacheEff r => Sem r [Message]
- delMessage :: forall r. Member CacheEff r => Snowflake Message -> Sem r ()
Documentation
data CacheEff m a where Source #
setBotUser :: forall r. Member CacheEff r => User -> Sem r () Source #
Set the User
representing the bot itself
getBotUser :: forall r. Member CacheEff r => Sem r (Maybe User) Source #
Get the User
representing the bot itself
setGuild :: forall r. Member CacheEff r => Guild -> Sem r () Source #
Set or Update a Guild
in the cache
getGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r (Maybe Guild) Source #
Get a Guild
from the cache
getGuildChannel :: forall r. Member CacheEff r => Snowflake GuildChannel -> Sem r (Maybe GuildChannel) Source #
Get a GuildChannel
from the cache
delGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r () Source #
Delete a Guild
from the cache
setDM :: forall r. Member CacheEff r => DMChannel -> Sem r () Source #
Set or Update a DMChannel
in the cache
updateDM :: Member CacheEff r => Snowflake DMChannel -> (DMChannel -> DMChannel) -> Sem r () Source #
getDM :: forall r. Member CacheEff r => Snowflake DMChannel -> Sem r (Maybe DMChannel) Source #
Get a DMChannel
from the cache
getDMs :: forall r. Member CacheEff r => Sem r [DMChannel] Source #
Get all DMChannel
s from the cache
delDM :: forall r. Member CacheEff r => Snowflake DMChannel -> Sem r () Source #
Delete a DMChannel
from the cache
setUser :: forall r. Member CacheEff r => User -> Sem r () Source #
Set or Update a User
in the cache
getUser :: forall r. Member CacheEff r => Snowflake User -> Sem r (Maybe User) Source #
Get a User
from the cache
delUser :: forall r. Member CacheEff r => Snowflake User -> Sem r () Source #
Delete a User
from the cache
setUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r () Source #
Flag a Guild
as unavailable
isUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r Bool Source #
Test if a Guild
is flagged as unavailable
getUnavailableGuilds :: forall r. Member CacheEff r => Sem r [Snowflake Guild] Source #
Get all UnavailableGuild
s from the cache
delUnavailableGuild :: forall r. Member CacheEff r => Snowflake Guild -> Sem r () Source #
Unflag a Guild
from being unavailable
setMessage :: forall r. Member CacheEff r => Message -> Sem r () Source #
Add or Update a Message
in the cache
updateMessage :: Member CacheEff r => Snowflake Message -> (Message -> Message) -> Sem r () Source #
getMessage :: forall r. Member CacheEff r => Snowflake Message -> Sem r (Maybe Message) Source #
Get a Message
from the cache