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

31 lines
566 B

package timer
import (
"yunyan/modules"
"yunyan/lego/utils/mapstructure"
)
type (
IOptions interface {
modules.IOptions
}
Options struct {
modules.Options
Doubao_Apikey string //doubao 的apikey
Doubao_BotId string //doubao 机器人id
Doubao_Role string //doubao 角色设定
}
)
func (this *Options) LoadConfig(settings map[string]interface{}) (err error) {
if settings != nil {
if err = this.Options.LoadConfig(settings); err != nil {
return
}
if err = mapstructure.Decode(settings, this); err != nil {
return
}
}
return
}