From fc151a9ceeb6cab8631a197c939ca6f6429d8b31 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 15 Apr 2024 16:17:31 +0200 Subject: fix(config): a role can be present twice --- config/guild.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/guild.go b/config/guild.go index ddeb300..df78406 100644 --- a/config/guild.go +++ b/config/guild.go @@ -32,9 +32,9 @@ func (cfg *GuildConfig) Save() { gokord.DB.Save(cfg) } -func (cfg *GuildConfig) FindXpRole(xp uint, roleID string) (int, *XpRole) { +func (cfg *GuildConfig) FindXpRole(roleID string) (int, *XpRole) { for i, r := range cfg.XpRoles { - if r.XP == xp && r.RoleID == roleID { + if r.RoleID == roleID { return i, &r } } -- cgit v1.2.3