Safe Haskell | None |
---|---|
Language | Haskell2010 |
Types for the client
Documentation
Client | |
|
Instances
Generic Client Source # | |
type Rep Client Source # | |
Defined in Calamity.Client.Types type Rep Client = D1 (MetaData "Client" "Calamity.Client.Types" "calamity-0.1.0.0-inplace" False) (C1 (MetaCons "Client" PrefixI True) ((S1 (MetaSel (Just "shards") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (TVar [(Shard, Async (Maybe ()))])) :*: S1 (MetaSel (Just "numShards") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (MVar Int))) :*: (S1 (MetaSel (Just "token") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Token) :*: (S1 (MetaSel (Just "rlState") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 RateLimitState) :*: S1 (MetaSel (Just "eventQueue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (TQueue DispatchMessage)))))) |
type BotC r = (LogC r, Members '[CacheEff, Reader Client, AtomicState EventHandlers, Embed IO, Final IO, Async] r, Typeable r) Source #
type family EHType d m where ... Source #
EHType "ready" m = ReadyData -> m () | |
EHType "channelcreate" m = Channel -> m () | |
EHType "channelupdate" m = Channel -> Channel -> m () | |
EHType "channeldelete" m = Channel -> m () | |
EHType "channelpinsupdate" m = Channel -> Maybe UTCTime -> m () | |
EHType "guildcreate" m = Guild -> Bool -> m () | |
EHType "guildupdate" m = Guild -> Guild -> m () | |
EHType "guilddelete" m = Guild -> Bool -> m () | |
EHType "guildbanadd" m = Guild -> User -> m () | |
EHType "guildbanremove" m = Guild -> User -> m () | |
EHType "guildemojisupdate" m = Guild -> [Emoji] -> m () | |
EHType "guildintegrationsupdate" m = Guild -> m () | |
EHType "guildmemberadd" m = Member -> m () | |
EHType "guildmemberremove" m = Member -> m () | |
EHType "guildmemberupdate" m = Member -> Member -> m () | |
EHType "guildmemberschunk" m = Guild -> [Member] -> m () | |
EHType "guildrolecreate" m = Guild -> Role -> m () | |
EHType "guildroleupdate" m = Guild -> Role -> Role -> m () | |
EHType "guildroledelete" m = Guild -> Role -> m () | |
EHType "messagecreate" m = Message -> m () | |
EHType "messageupdate" m = Message -> Message -> m () | |
EHType "messagedelete" m = Message -> m () | |
EHType "messagedeletebulk" m = [Message] -> m () | |
EHType "messagereactionadd" m = Message -> Reaction -> m () | |
EHType "messagereactionremove" m = Message -> Reaction -> m () | |
EHType "messagereactionremoveall" m = Message -> m () | |
EHType "typingstart" m = Channel -> Maybe Member -> UnixTimestamp -> m () | |
EHType "userupdate" m = User -> User -> m () | |
EHType s _ = TypeError (Text "Unknown event name: " :<>: ShowType s) |
type family EHType' d where ... Source #
EHType' "ready" = Dynamic | |
EHType' "channelcreate" = Dynamic | |
EHType' "channelupdate" = Dynamic | |
EHType' "channeldelete" = Dynamic | |
EHType' "channelpinsupdate" = Dynamic | |
EHType' "guildcreate" = Dynamic | |
EHType' "guildupdate" = Dynamic | |
EHType' "guilddelete" = Dynamic | |
EHType' "guildbanadd" = Dynamic | |
EHType' "guildbanremove" = Dynamic | |
EHType' "guildemojisupdate" = Dynamic | |
EHType' "guildintegrationsupdate" = Dynamic | |
EHType' "guildmemberadd" = Dynamic | |
EHType' "guildmemberremove" = Dynamic | |
EHType' "guildmemberupdate" = Dynamic | |
EHType' "guildmemberschunk" = Dynamic | |
EHType' "guildrolecreate" = Dynamic | |
EHType' "guildroleupdate" = Dynamic | |
EHType' "guildroledelete" = Dynamic | |
EHType' "messagecreate" = Dynamic | |
EHType' "messageupdate" = Dynamic | |
EHType' "messagedelete" = Dynamic | |
EHType' "messagedeletebulk" = Dynamic | |
EHType' "messagereactionadd" = Dynamic | |
EHType' "messagereactionremove" = Dynamic | |
EHType' "messagereactionremoveall" = Dynamic | |
EHType' "typingstart" = Dynamic | |
EHType' "userupdate" = Dynamic | |
EHType' s = TypeError (Text "Unknown event name: " :<>: ShowType s) |
newtype EventHandlers Source #
Instances
Semigroup EventHandlers Source # | |
Defined in Calamity.Client.Types (<>) :: EventHandlers -> EventHandlers -> EventHandlers # sconcat :: NonEmpty EventHandlers -> EventHandlers # stimes :: Integral b => b -> EventHandlers -> EventHandlers # | |
Monoid EventHandlers Source # | |
Defined in Calamity.Client.Types mempty :: EventHandlers # mappend :: EventHandlers -> EventHandlers -> EventHandlers # mconcat :: [EventHandlers] -> EventHandlers # | |
Default EventHandlers Source # | |
Defined in Calamity.Client.Types def :: EventHandlers # |
newtype EventHandler d Source #
EH | |
|
Instances
Semigroup (EventHandler d) Source # | |
Defined in Calamity.Client.Types (<>) :: EventHandler d -> EventHandler d -> EventHandler d # sconcat :: NonEmpty (EventHandler d) -> EventHandler d # stimes :: Integral b => b -> EventHandler d -> EventHandler d # | |
Monoid (EventHandler d) Source # | |
Defined in Calamity.Client.Types mempty :: EventHandler d # mappend :: EventHandler d -> EventHandler d -> EventHandler d # mconcat :: [EventHandler d] -> EventHandler d # |