style(config): move everything related to modify xp role in package config

This commit is contained in:
Anhgelus Morhtuuzh 2025-08-06 15:02:51 +02:00
parent 3d89f9c354
commit 0968c18b15
Signed by: anhgelus
GPG key ID: 617773CACE89052C
4 changed files with 224 additions and 213 deletions

View file

@ -15,13 +15,6 @@ type GuildConfig struct {
DaysXPRemains uint `gorm:"default:90"` // 30 * 3 = 90 (three months)
}
type XpRole struct {
ID uint `gorm:"primarykey"`
XP uint
RoleID string
GuildConfigID uint
}
func GetGuildConfig(guildID string) *GuildConfig {
cfg := GuildConfig{GuildID: guildID}
if err := cfg.Load(); err != nil {