|
@ -64,12 +64,14 @@ import qualified System.Cron.Schedule as Cron |
|
|
import UnliftIO.Directory ( doesFileExist |
|
|
import UnliftIO.Directory ( doesFileExist |
|
|
, removeFile |
|
|
, removeFile |
|
|
) |
|
|
) |
|
|
|
|
|
import System.Environment (setEnv) |
|
|
|
|
|
|
|
|
main :: IO () |
|
|
main :: IO () |
|
|
main = do |
|
|
main = do |
|
|
tok <- TIO.readFile "./auth.secret" |
|
|
tok <- TIO.readFile "./auth.secret" |
|
|
conf <- readConfig "./conf.yaml" |
|
|
conf <- readConfig "./conf.yaml" |
|
|
eventSystem <- E.initEventSystem |
|
|
eventSystem <- E.initEventSystem |
|
|
|
|
|
setEnv "TZ" "Europe/Paris" -- The bot needs to run on the french timezone for edt to work properly |
|
|
|
|
|
|
|
|
err <- Discord.runDiscord $ Discord.def |
|
|
err <- Discord.runDiscord $ Discord.def |
|
|
{ discordToken = tok |
|
|
{ discordToken = tok |
|
|