@@ -84,7 +84,7 @@ getPeriodicCommandByName name =
8484 Take 1 $ Filter (PropertyEquals " name" (PropertyText name)) All
8585
8686startPeriodicTimer ::
87- ( Message (Command T. Text) -> Effect () ) -> Channel -> Int -> Effect ()
87+ Reaction Message (Command T. Text ) -> Channel -> Int -> Effect ()
8888startPeriodicTimer dispatchCommand channel eid =
8989 periodicEffect' (Just channel) $ do
9090 pt' <- getEntityById Proxy eid
@@ -99,15 +99,15 @@ startPeriodicTimer dispatchCommand channel eid =
9999 when (periodicTimerEnabled pt) $
100100 maybe
101101 (return () )
102- (dispatchCommand .
102+ (runReaction dispatchCommand .
103103 Message (mrbotka {senderChannel = channel}) False .
104104 periodicCommand . entityPayload)
105105 pc'
106106 return $ Just $ fromIntegral $ periodicTimerPeriod pt)
107107 pt'
108108
109109startPeriodicCommands ::
110- Channel -> (Message (Command T. Text) -> Effect ( ) ) -> Effect ()
110+ Channel -> (Reaction Message (Command T. Text )) -> Effect ()
111111startPeriodicCommands channel dispatchCommand = do
112112 eids <- (entityId <$> ) <$> selectEntities (Proxy :: Proxy PeriodicTimer ) All
113113 for_ eids (startPeriodicTimer dispatchCommand channel)
@@ -171,7 +171,7 @@ statusPeriodicTimerCommand =
171171 Reaction replyMessage
172172
173173addPeriodicTimerCommand ::
174- ( Message (Command T. Text) -> Effect () ) -> Reaction Message Int
174+ Reaction Message (Command T. Text ) -> Reaction Message Int
175175addPeriodicTimerCommand dispatchCommand =
176176 cmapR (PeriodicTimer False ) $
177177 liftR (createEntity Proxy ) $
0 commit comments