| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Calamity.Gateway.Types
Description
Types for shards
Documentation
type ShardC r = Members '[LogEff, AtomicState ShardState, Embed IO, Final IO, Async, MetricEff] r Source #
Constructors
| Discord ReceivedDiscordMessage | |
| Control ControlMessage |
data ReceivedDiscordMessage Source #
Constructors
| EvtDispatch Int !DispatchData | |
| HeartBeatReq | |
| Reconnect | |
| InvalidSession Bool | |
| Hello Int | |
| HeartBeatAck |
Instances
| FromJSON ReceivedDiscordMessage Source # | |
Defined in Calamity.Gateway.Types Methods parseJSON :: Value -> Parser ReceivedDiscordMessage # parseJSONList :: Value -> Parser [ReceivedDiscordMessage] # | |
| Show ReceivedDiscordMessage Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> ReceivedDiscordMessage -> ShowS # show :: ReceivedDiscordMessage -> String # showList :: [ReceivedDiscordMessage] -> ShowS # | |
data SentDiscordMessage Source #
Constructors
| StatusUpdate StatusUpdateData | |
| Identify IdentifyData | |
| HeartBeat (Maybe Int) | |
| VoiceStatusUpdate VoiceState | |
| Resume ResumeData | |
| RequestGuildMembers RequestGuildMembersData |
Instances
| ToJSON SentDiscordMessage Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: SentDiscordMessage -> Value # toEncoding :: SentDiscordMessage -> Encoding # toJSONList :: [SentDiscordMessage] -> Value # toEncodingList :: [SentDiscordMessage] -> Encoding # | |
| Show SentDiscordMessage Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> SentDiscordMessage -> ShowS # show :: SentDiscordMessage -> String # showList :: [SentDiscordMessage] -> ShowS # | |
data DispatchType Source #
Constructors
Instances
| FromJSON DispatchType Source # | |
Defined in Calamity.Gateway.Types | |
| ToJSON DispatchType Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: DispatchType -> Value # toEncoding :: DispatchType -> Encoding # toJSONList :: [DispatchType] -> Value # toEncodingList :: [DispatchType] -> Encoding # | |
| Enum DispatchType Source # | |
Defined in Calamity.Gateway.Types Methods succ :: DispatchType -> DispatchType # pred :: DispatchType -> DispatchType # toEnum :: Int -> DispatchType # fromEnum :: DispatchType -> Int # enumFrom :: DispatchType -> [DispatchType] # enumFromThen :: DispatchType -> DispatchType -> [DispatchType] # enumFromTo :: DispatchType -> DispatchType -> [DispatchType] # enumFromThenTo :: DispatchType -> DispatchType -> DispatchType -> [DispatchType] # | |
| Generic DispatchType Source # | |
Defined in Calamity.Gateway.Types Associated Types type Rep DispatchType :: Type -> Type # | |
| Show DispatchType Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> DispatchType -> ShowS # show :: DispatchType -> String # showList :: [DispatchType] -> ShowS # | |
| Eq DispatchType Source # | |
Defined in Calamity.Gateway.Types | |
| type Rep DispatchType Source # | |
Defined in Calamity.Gateway.Types type Rep DispatchType = D1 ('MetaData "DispatchType" "Calamity.Gateway.Types" "calamity-0.8.0.0-inplace" 'False) (((((C1 ('MetaCons "READY" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RESUMED" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "APPLICATION_COMMAND_PERMISSIONS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "AUTO_MODERATION_RULE_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AUTO_MODERATION_RULE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AUTO_MODERATION_RULE_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AUTO_MODERATION_ACTION_EXECUTION" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "CHANNEL_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CHANNEL_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CHANNEL_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CHANNEL_PINS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "THREAD_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THREAD_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "THREAD_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "THREAD_LIST_SYNC" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "THREAD_MEMBER_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "THREAD_MEMBERS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_CREATE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GUILD_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_DELETE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GUILD_AUDIT_LOG_ENTRY_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_BAN_ADD" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "GUILD_BAN_REMOVE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_EMOJIS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GUILD_STICKERS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_INTEGRATIONS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GUILD_MEMBER_ADD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_MEMBER_REMOVE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GUILD_MEMBER_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_MEMBERS_CHUNK" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "GUILD_ROLE_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GUILD_ROLE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_ROLE_DELETE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GUILD_SCHEDULED_EVENT_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_SCHEDULED_EVENT_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GUILD_SCHEDULED_EVENT_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GUILD_SCHEDULED_EVENT_USER_ADD" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "GUILD_SCHEDULED_EVENT_USER_REMOVE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "INTEGRATION_CREATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "INTEGRATION_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "INTEGRATION_DELETE" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "INTERACTION_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "INVITE_CREATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "INVITE_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MESSAGE_CREATE" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "MESSAGE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MESSAGE_DELETE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MESSAGE_DELETE_BULK" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MESSAGE_REACTION_ADD" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MESSAGE_REACTION_REMOVE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MESSAGE_REACTION_REMOVE_ALL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MESSAGE_REACTION_REMOVE_EMOJI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PRESENCE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "STAGE_INSTANCE_CREATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "STAGE_INSTANCE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "STATE_INSTANCE_DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TYPING_START" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "USER_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VOICE_STATE_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "VOICE_SERVER_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WEBHOOKS_UPDATE" 'PrefixI 'False) (U1 :: Type -> Type))))))) | |
data IdentifyData Source #
Constructors
| IdentifyData | |
Fields
| |
Instances
| ToJSON IdentifyData Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: IdentifyData -> Value # toEncoding :: IdentifyData -> Encoding # toJSONList :: [IdentifyData] -> Value # toEncodingList :: [IdentifyData] -> Encoding # | |
| Show IdentifyData Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> IdentifyData -> ShowS # show :: IdentifyData -> String # showList :: [IdentifyData] -> ShowS # | |
| CalamityToJSON' IdentifyData Source # | |
Defined in Calamity.Gateway.Types | |
data StatusUpdateData Source #
Constructors
| StatusUpdateData | |
Fields
| |
Instances
| ToJSON StatusUpdateData Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: StatusUpdateData -> Value # toEncoding :: StatusUpdateData -> Encoding # toJSONList :: [StatusUpdateData] -> Value # toEncodingList :: [StatusUpdateData] -> Encoding # | |
| Show StatusUpdateData Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> StatusUpdateData -> ShowS # show :: StatusUpdateData -> String # showList :: [StatusUpdateData] -> ShowS # | |
| CalamityToJSON' StatusUpdateData Source # | |
Defined in Calamity.Gateway.Types | |
data ResumeData Source #
Instances
| ToJSON ResumeData Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: ResumeData -> Value # toEncoding :: ResumeData -> Encoding # toJSONList :: [ResumeData] -> Value # toEncodingList :: [ResumeData] -> Encoding # | |
| Show ResumeData Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> ResumeData -> ShowS # show :: ResumeData -> String # showList :: [ResumeData] -> ShowS # | |
| CalamityToJSON' ResumeData Source # | |
Defined in Calamity.Gateway.Types | |
data RequestGuildMembersData Source #
Constructors
| RequestGuildMembersData | |
Instances
| ToJSON RequestGuildMembersData Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: RequestGuildMembersData -> Value # toEncoding :: RequestGuildMembersData -> Encoding # toJSONList :: [RequestGuildMembersData] -> Value # | |
| Show RequestGuildMembersData Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> RequestGuildMembersData -> ShowS # show :: RequestGuildMembersData -> String # showList :: [RequestGuildMembersData] -> ShowS # | |
| CalamityToJSON' RequestGuildMembersData Source # | |
Defined in Calamity.Gateway.Types | |
data IdentifyProps Source #
Constructors
| IdentifyProps | |
Instances
| ToJSON IdentifyProps Source # | |
Defined in Calamity.Gateway.Types Methods toJSON :: IdentifyProps -> Value # toEncoding :: IdentifyProps -> Encoding # toJSONList :: [IdentifyProps] -> Value # toEncodingList :: [IdentifyProps] -> Encoding # | |
| Show IdentifyProps Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> IdentifyProps -> ShowS # show :: IdentifyProps -> String # showList :: [IdentifyProps] -> ShowS # | |
| CalamityToJSON' IdentifyProps Source # | |
Defined in Calamity.Gateway.Types | |
data ControlMessage Source #
Constructors
| RestartShard | |
| ShutDownShard | |
| SendPresence StatusUpdateData |
Instances
| Show ControlMessage Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> ControlMessage -> ShowS # show :: ControlMessage -> String # showList :: [ControlMessage] -> ShowS # | |
data ShardFlowControl Source #
Constructors
| ShardFlowRestart | |
| ShardFlowShutDown |
Instances
| Show ShardFlowControl Source # | |
Defined in Calamity.Gateway.Types Methods showsPrec :: Int -> ShardFlowControl -> ShowS # show :: ShardFlowControl -> String # showList :: [ShardFlowControl] -> ShowS # | |
Constructors
| Shard | |
Fields
| |
Instances
data ShardState Source #
Constructors
| ShardState | |