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 8384d5b..971470d 100644 --- a/config/guild.go +++ b/config/guild.go @@ -10,11 +10,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 97de8be..6ea89e2 100644 --- a/config/xp_role.go +++ b/config/xp_role.go @@ -13,13 +13,6 @@ import ( discordgo "github.com/nyttikord/gokord" ) -type XpRole struct { - ID uint `gorm:"primarykey"` - XP uint - RoleID string - GuildConfigID uint -} - const ( ModifyXpRole = "xp_role" XpRoleAdd = "xp_role_add" |
