From 597aac4e950e10973bc1ed4420a31f7cd6c13a82 Mon Sep 17 00:00:00 2001 From: LamGC Date: Sat, 9 May 2020 22:35:21 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20BotCommandProcess=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8C=87=E4=BB=A4=E6=97=A0=E6=B3=95=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=BE=A4=E7=BB=84=E9=85=8D=E7=BD=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java b/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java index 84d124c..6cf25c5 100644 --- a/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java +++ b/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java @@ -245,7 +245,7 @@ public class BotCommandProcess { String itemLimitPropertyKey = "ranking.itemCountLimit"; try { itemLimit = Integer.parseInt(SettingProperties - .getProperty(SettingProperties.GLOBAL, itemLimitPropertyKey, "10")); + .getProperty(fromGroup, itemLimitPropertyKey, "10")); } catch(NumberFormatException e) { log.warn("配置项 {} 的参数值格式有误!", itemLimitPropertyKey); } @@ -254,7 +254,7 @@ public class BotCommandProcess { String imageLimitPropertyKey = "ranking.imageCountLimit"; try { imageLimit = Integer.parseInt( - SettingProperties.getProperty(SettingProperties.GLOBAL, imageLimitPropertyKey, "3")); + SettingProperties.getProperty(fromGroup, imageLimitPropertyKey, "3")); } catch(NumberFormatException e) { log.warn("配置项 {} 的参数值格式有误!", imageLimitPropertyKey); } @@ -408,7 +408,7 @@ public class BotCommandProcess { int limit = 8; try { limit = Integer.parseInt(SettingProperties. - getProperty(SettingProperties.GLOBAL, "search.itemCountLimit", "8")); + getProperty(fromGroup, "search.itemCountLimit", "8")); } catch (Exception e) { log.warn("参数转换异常!将使用默认值(" + limit + ")", e); }