Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Command invokation context
Synopsis
- class CommandContext c => CalamityCommandContext c where
- ctxChannelID :: c -> Snowflake Channel
- ctxGuildID :: c -> Maybe (Snowflake Guild)
- ctxUserID :: c -> Snowflake User
- ctxMessage :: c -> Message
- data FullContext = FullContext {}
- useFullContext :: Member CacheEff r => Sem (ConstructContext (Message, User, Maybe Member) FullContext IO () ': r) a -> Sem r a
- data LightContext = LightContext {}
- useLightContext :: Sem (ConstructContext (Message, User, Maybe Member) LightContext IO () ': r) a -> Sem r a
Documentation
class CommandContext c => CalamityCommandContext c where Source #
ctxChannelID :: c -> Snowflake Channel Source #
The id of the channel that invoked this command
ctxGuildID :: c -> Maybe (Snowflake Guild) Source #
The id of the guild the command was invoked in, if in a guild
ctxUserID :: c -> Snowflake User Source #
The id of the user that invoked this command
ctxMessage :: c -> Message Source #
The message that triggered this command
Instances
CalamityCommandContext FullContext Source # | |
Defined in Calamity.Commands.Context ctxChannelID :: FullContext -> Snowflake Channel Source # ctxGuildID :: FullContext -> Maybe (Snowflake Guild) Source # ctxUserID :: FullContext -> Snowflake User Source # ctxMessage :: FullContext -> Message Source # | |
CalamityCommandContext LightContext Source # | |
Defined in Calamity.Commands.Context ctxChannelID :: LightContext -> Snowflake Channel Source # ctxGuildID :: LightContext -> Maybe (Snowflake Guild) Source # ctxUserID :: LightContext -> Snowflake User Source # ctxMessage :: LightContext -> Message Source # |
data FullContext Source #
Invokation context for commands
FullContext | |
|
Instances
useFullContext :: Member CacheEff r => Sem (ConstructContext (Message, User, Maybe Member) FullContext IO () ': r) a -> Sem r a Source #
data LightContext Source #
A lightweight context that doesn't need any cache information
LightContext | |
|