aboutsummaryrefslogtreecommitdiff
path: root/config/guild.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-08-21 12:54:52 +0000
committerAnhgelus Morhtuuzh <william@herges.fr>2025-08-21 12:54:52 +0000
commit166aadabfb37a1a565bb8d46241682c709b1c4db (patch)
treebc77b8e3f7a7599ad272fcc3c0032f3258ff7cd7 /config/guild.go
parent026abcc07a57eeda8a08a746ad2b664e956360f3 (diff)
parent15448aa0014e1473582227e2ea301df7ccfb9560 (diff)
Merge pull request '[Refactor] Config command' (#1) from refactor/config-command into main
Reviewed-on: https://git.anhgelus.world/anhgelus/les-copaings-bot/pulls/1
Diffstat (limited to 'config/guild.go')
-rw-r--r--config/guild.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/config/guild.go b/config/guild.go
index fb7eaef..8384d5b 100644
--- a/config/guild.go
+++ b/config/guild.go
@@ -1,9 +1,9 @@
package config
import (
- "github.com/anhgelus/gokord"
- "github.com/anhgelus/gokord/utils"
"strings"
+
+ "github.com/anhgelus/gokord"
)
type GuildConfig struct {
@@ -15,18 +15,10 @@ 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 {
- utils.SendAlert("config/guild.go - Loading guild config", err.Error(), "guild_id", guildID)
- return nil
+ panic(err)
}
return &cfg
}