style(config): move everything related to modify xp role in package config
This commit is contained in:
parent
3d89f9c354
commit
0968c18b15
4 changed files with 224 additions and 213 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue