| package system_setting | |
| import "github.com/QuantumNous/new-api/setting/config" | |
| type DiscordSettings struct { | |
| Enabled bool `json:"enabled"` | |
| ClientId string `json:"client_id"` | |
| ClientSecret string `json:"client_secret"` | |
| } | |
| // 默认配置 | |
| var defaultDiscordSettings = DiscordSettings{} | |
| func init() { | |
| // 注册到全局配置管理器 | |
| config.GlobalConfig.Register("discord", &defaultDiscordSettings) | |
| } | |
| func GetDiscordSettings() *DiscordSettings { | |
| return &defaultDiscordSettings | |
| } | |