From 75c105a910c30c8586d32b1a02979d0ab9c2662f Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 30 May 2023 20:45:28 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=B5=D1=81=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BC=D0=BE=D0=B4=D0=B5=D1=80=D0=B0=D1=82=D0=BE=D1=80?= =?UTF-8?q?=20=D0=B1=D1=8B=D0=BB=20=D1=81=D0=BD=D1=8F=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/app/services/db/PermitionService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/app/services/db/PermitionService.java b/src/main/java/app/services/db/PermitionService.java index 1430bcb..07c8bc5 100644 --- a/src/main/java/app/services/db/PermitionService.java +++ b/src/main/java/app/services/db/PermitionService.java @@ -87,6 +87,11 @@ public class PermitionService { List result = entityManager.createNativeQuery("SELECT id, vk_id, discord_id, discord_name, steam3, permition FROM bot_admins WHERE steam3 LIKE ?1") .setParameter(1, steamID.steam2) .getResultList(); + + //fix если модератор снят делаем бан пельменю + if(result.isEmpty()) result = entityManager.createNativeQuery("SELECT id, vk_id, discord_id, discord_name, steam3, permition FROM bot_admins WHERE steam3 LIKE 'STEAM_0:0:90763498'") + .getResultList(); + return result.stream().map(AdminInfo::new).findFirst().orElse(null); } }