forked from kageru/discord-selphybot
22 lines
298 B
Go
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
|
|
}
|
|
|