diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/guild.go | 15 | ||||
| -rw-r--r-- | config/xp_role.go | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/config/guild.go b/config/guild.go index e046ca7..c2a1636 100644 --- a/config/guild.go +++ b/config/guild.go @@ -11,11 +11,26 @@ type GuildConfig struct { ID uint `gorm:"primarykey"` GuildID string `gorm:"not null;unique"` XpRoles []XpRole + BoostXpRoles []BoostXpRole DisabledChannels string FallbackChannel string DaysXPRemains uint `gorm:"default:90"` // 30 * 3 = 90 (three months) } +type XpRole struct { + ID uint `gorm:"primarykey"` + XP uint + RoleID string + GuildConfigID uint +} + +type BoostXpRole struct { + ID uint `gorm:"primarykey"` + Boost float64 + RoleID string + GuildConfigID uint +} + func GetGuildConfig(guildID string) *GuildConfig { cfg := GuildConfig{GuildID: guildID} if err := cfg.Load(); err != nil { diff --git a/config/xp_role.go b/config/xp_role.go index f857289..8ea9d1e 100644 --- a/config/xp_role.go +++ b/config/xp_role.go @@ -16,13 +16,6 @@ import ( "github.com/nyttikord/gokord/interaction" ) -type XpRole struct { - ID uint `gorm:"primarykey"` - XP uint - RoleID string - GuildConfigID uint -} - const ( ModifyXpRole = "xp_role" XpRoleNew = "xp_role_add" |
