You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

40 lines
1.0 KiB

{-# 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 ()