dorisbot/main.go
2019-06-28 09:37:37 +00:00

38 lines
520 B
Go

package main
import (
"dorisbot/pkg/options"
"dorisbot/pkg/svc/discord"
"fmt"
"log"
)
func init() {
options.RegOptions()
}
func main() {
opts := options.GetOptions()
if opts.Help {
opts.ShowUsage()
return
}
fmt.Println("Bot Svc")
cc := make(chan bool)
botToken := "NDEyNTEzNzk2OTA1NTAwNjcy.XQ-Shw.sS-Ldtu1fgCaPPNG_Bn3i0LX2wg"
client, err := discord.NewClient(botToken)
if err != nil {
log.Fatal(err)
}
err = client.Connect()
if err != nil {
log.Fatal(err)
}
defer client.Close()
<-cc
}