38 lines
520 B
Go
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
|
||
|
}
|