-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
43 lines (32 loc) · 735 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
39
40
41
42
43
package main
import (
"fmt"
// "log"
"net/http"
// "log"
// "net/http"
"github.com/moonman369/Go-Discord-Bot/bot"
"github.com/moonman369/Go-Discord-Bot/config"
"github.com/moonman369/Go-Discord-Bot/errorhandler"
// "github.com/moonman369/Go-Discord-Bot/gpt"
"github.com/gorilla/mux"
)
func main() {
// gpt.SendPrompt("Hello")
r := mux.NewRouter()
err := config.ReadConfig()
if err != nil {
// fmt.Println(err.Error())
errorhandler.FancyHandleError(err)
return
}
bot.Start()
fmt.Println("Starting server at port 8080")
if err := http.ListenAndServe("0.0.0.0:8080", r); err != nil {
// log.Fatal(err)
errorhandler.FancyHandleError(err)
}
<-make(chan struct{})
// <-make(chan struct{})
return
}