{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad (when, void) import qualified Data.Text as T import qualified Data.Text.IO as TIO import UnliftIO (liftIO) import Discord import Discord.Types import qualified Discord.Requests as R import Commands import Discord.Internal.Rest (Activity(Activity)) main :: IO () main = do tok <- TIO.readFile "./auth.secret" err <- runDiscord $ def { discordToken = tok , discordOnStart = onDiscordStart , discordOnEnd = liftIO $ putStrLn "Ended" , discordOnEvent = onDiscordEvent , discordOnLog = \s -> TIO.putStrLn s >> TIO.putStrLn "" } TIO.putStrLn err onDiscordStart :: DiscordHandler () onDiscordStart = do let activity = Activity { } onDiscordEvent :: Event -> DiscordHandler () onDiscordEvent _ = return ()