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