aboutsummaryrefslogtreecommitdiff
path: root/thulani.go
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2017-07-26 19:19:38 -0400
committerNathan Perry <avaglir@gmail.com>2017-07-26 19:19:38 -0400
commitfa3151827fa697c91802b09ae0052429e788b275 (patch)
tree7ec2c8792ec1252ed26ed1d8e6b3723c834121a0 /thulani.go
initial commit
Diffstat (limited to 'thulani.go')
-rw-r--r--thulani.go45
1 files changed, 45 insertions, 0 deletions
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)
+ }
+}