diff options
| author | William Hergès <william@herges.fr> | 2025-07-30 21:34:07 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-07-30 21:34:07 +0200 |
| commit | 7508627d86a4f2ef9b3caebd88d92fe8be854816 (patch) | |
| tree | d34fad4e94f0c89eab9497210b914d1208983480 /config | |
| parent | 436ec957481bdadefc8a38dc5ad848021a34ac37 (diff) | |
feat(xp): boost XP if user has a certain role
Diffstat (limited to 'config')
| -rw-r--r-- | config/guild.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/guild.go b/config/guild.go index fb7eaef..63736df 100644 --- a/config/guild.go +++ b/config/guild.go @@ -10,6 +10,7 @@ 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) @@ -22,6 +23,13 @@ type XpRole struct { 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 { |
