diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-08 18:51:05 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-03-08 18:51:05 +0100 |
| commit | 6e92feaba23a4992e0ec4b529660921a6bcb492a (patch) | |
| tree | 05024b52d4c8ede041facdc48ac65af5ba0259da /user/level.go | |
| parent | 3bcf74c47d1597ba650dc5a55868f83f5f547ad7 (diff) | |
feat(config): leave gorm
Diffstat (limited to 'user/level.go')
| -rw-r--r-- | user/level.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/user/level.go b/user/level.go index 26cf03f..d068f97 100644 --- a/user/level.go +++ b/user/level.go @@ -15,7 +15,7 @@ import ( ) func onNewLevel(ctx context.Context, dg bot.Session, m *user.Member, level uint) { - cfg := config.GetGuildConfig(ctx, m.GuildID) + cfg := config.GetGuild(ctx, m.GuildID) xpForLevel := exp.LevelXP(level) for _, role := range cfg.XpRoles { if role.XP <= xpForLevel && !slices.Contains(m.Roles, role.RoleID) { @@ -60,7 +60,7 @@ func PeriodicReducer(ctx context.Context, dg bot.Session) { n := 0 var wg sync.WaitGroup for _, g := range dg.GuildState().ListGuilds() { - cfg := config.GetGuildConfig(ctx, g) + cfg := config.GetGuild(ctx, g) res, err := common.GetDB(ctx).ExecContext( ctx, `DELETE FROM copaing_xps WHERE guild_id = ? and created_at < ?`, |
