hotfix #79

Merged
李寻欢 merged 3 commits from hotfix into main 2024-07-15 14:38:04 +08:00
4 changed files with 5 additions and 0 deletions
Showing only changes of commit fcc61fdcd9 - Show all commits

View File

@ -19,6 +19,8 @@ system:
welcome: true
# 每日早报
news: true
# 热榜
hotTop: true
# 微信HOOK配置
wechat:

View File

@ -20,4 +20,5 @@ type defaultRule struct {
Summary bool `json:"summary" yaml:"summary"` // 是否启用聊天总结
Welcome bool `json:"welcome" yaml:"welcome"` // 是否启用欢迎新成员
News bool `json:"news" yaml:"news"` // 是否启用每日早报
HotTop bool `json:"hotTop" yaml:"hotTop"` // 是否启用热门话题
}

View File

@ -20,6 +20,7 @@ type Friend struct {
EnableWelcome bool `json:"enableWelcome" gorm:"type:tinyint(1) default 0 not null"` // 是否启用迎新
EnableSummary bool `json:"enableSummary" gorm:"type:tinyint(1) default 0 not null"` // 是否启用总结
EnableNews bool `json:"enableNews" gorm:"type:tinyint(1) default 0 not null"` // 是否启用新闻
EnableHotTop bool `json:"enableHotTop" gorm:"type:tinyint(1) default 0 not null"` // 是否启用热榜新闻
ClearMember int `json:"clearMember"` // 清理成员配置(多少天未活跃的)
IsOk bool `json:"isOk" gorm:"type:tinyint(1) default 0 not null"` // 是否正常
UsedTokens int `json:"usedTokens"` // 已使用的AI Token数量

View File

@ -75,6 +75,7 @@ func Sync() {
EnableSummary: config.Conf.System.DefaultRule.Summary,
EnableWelcome: config.Conf.System.DefaultRule.Welcome,
EnableNews: config.Conf.System.DefaultRule.News,
EnableHotTop: config.Conf.System.DefaultRule.HotTop,
ClearMember: 0,
LastActive: time.Now().Local(),
}).Error