-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
38 lines (29 loc) · 823 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"github.com/AnarkisGaming/isabelle/config"
"github.com/AnarkisGaming/isabelle/discord"
"github.com/AnarkisGaming/isabelle/github"
"github.com/AnarkisGaming/isabelle/mail"
)
func main() {
fmt.Println("Isabelle")
fmt.Println("Copyright (c) 2023 Anarkis Gaming/Cutie Cafe")
fmt.Println("This program is free software; see the LICENSE file for details.")
fmt.Println("")
if err := config.Init(); err != nil {
panic(fmt.Errorf("error reading config: %v", err))
}
github.Init()
if err := discord.Connect(); err != nil {
panic(fmt.Errorf("error connecting to Discord: %v", err))
}
mail.Schedule()
sc := make(chan os.Signal, 1)
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
<-sc
fmt.Println("Shutting down...")
}