|
@ -77,6 +77,7 @@ onDiscordStart conf eventSystem = do |
|
|
let reminddata :: [Remind] |
|
|
let reminddata :: [Remind] |
|
|
reminddata = map read $ lines remindfile |
|
|
reminddata = map read $ lines remindfile |
|
|
now <- liftIO getCurrentTime |
|
|
now <- liftIO getCurrentTime |
|
|
|
|
|
liftIO $ removeFile "reminds.data" |
|
|
mapM_ (\r -> do |
|
|
mapM_ (\r -> do |
|
|
withRunInIO $ \runInIO -> |
|
|
withRunInIO $ \runInIO -> |
|
|
if now > rmdWhen r then |
|
|
if now > rmdWhen r then |
|
@ -89,6 +90,8 @@ onDiscordStart conf eventSystem = do |
|
|
`T.append` "> **Reminder**\n" |
|
|
`T.append` "> **Reminder**\n" |
|
|
`T.append` rmdWhat r |
|
|
`T.append` rmdWhat r |
|
|
) |
|
|
) |
|
|
|
|
|
appendFile "reminds.data" $ show r |
|
|
|
|
|
|
|
|
return () |
|
|
return () |
|
|
) |
|
|
) |
|
|
else |
|
|
else |
|
|