You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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
}