aboutsummaryrefslogtreecommitdiff
path: root/src/Tomato/Bot.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Tomato/Bot.hs')
-rw-r--r--src/Tomato/Bot.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Tomato/Bot.hs b/src/Tomato/Bot.hs
new file mode 100644
index 0000000..8d4cf6d
--- /dev/null
+++ b/src/Tomato/Bot.hs
@@ -0,0 +1,19 @@
+module Tomato.Bot
+ ( tomatoBot
+ ) where
+
+import RIO
+
+import Tomato.App (App)
+import Tomato.Post (postTomato)
+import Tomato.Retrieve (randomTomato)
+
+
+-- | Fetch and post a tomato
+tomatoBot :: RIO App ()
+tomatoBot = do
+ logInfo $ "Fetching tomato"
+ randomTomato
+ logInfo $ "Posting tomato"
+ postTomato
+ logInfo $ "Done"