discord-flauschbot/config.go

41 lines
688 B
Go
Raw Normal View History

2018-06-03 10:40:28 +02:00
package main
import (
"os"
"encoding/json"
)
type Embed struct {
Message string
QuestionsTitle string
QuestionsText string
BugsTitle string
BugsText string
Image string
}
type Config struct {
AdminID string
ServerID string
LockedRoleID string
Token string
WelcomeChannel string
GeneralChannel string
SendWelcomeDM bool
RequireAccept bool
ComplaintReceivedMessage string
ModChannel string
WelcomeEmbed Embed
RoleCommands map[string]string
}
func readConfig() Config {
file, _ := os.Open("config2.json")
2018-06-03 10:40:28 +02:00
conf := Config{}
json.NewDecoder(file).Decode(&conf)
file.Close()
return conf
}