From fa3151827fa697c91802b09ae0052429e788b275 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Wed, 26 Jul 2017 19:19:38 -0400 Subject: initial commit --- thulani.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 thulani.go (limited to 'thulani.go') diff --git a/thulani.go b/thulani.go new file mode 100644 index 0000000..9ed8f18 --- /dev/null +++ b/thulani.go @@ -0,0 +1,45 @@ +package main + +import ( + "encoding/json" + "log" + "os" + + "github.com/bwmarrin/discordgo" +) + +type config struct { + Trigger string `json:"trigger"` + QueueSize uint `json:"queue_size"` + Admin string `json:"admin"` + OpRole string `json:"op_role"` + Server string `json:"server"` + VoiceChannel string `json:"voice_channel"` + Token string `json:"token"` +} + +func (c *config) UnmarshalYAML(unmarshal func(interface{}) error) error { + + return nil +} + +func main() { + file, err := os.Open("config.json") + handle(err) + + var conf config + handle(json.NewDecoder(file).Decode(&conf)) + + dg, err := discordgo.New() + handle(err) + + app := &discordgo.Application{} + app.Name = "Thulani" + +} + +func handle(err error) { + if err != nil { + log.Fatal(err) + } +} -- cgit v1.3.1