discord-flauschbot/config.go
2018-07-26 18:47:55 +02:00

22 lines
298 B
Go

package main
import (
"os"
"encoding/json"
)
type Config struct {
Admins []string
ServerID string
Token string
}
func readConfig() Config {
file, _ := os.Open("config.json")
conf := Config{}
json.NewDecoder(file).Decode(&conf)
file.Close()
return conf
}