From 6c427a4ad5e767b8434b78e1136c520e18c2ab5e Mon Sep 17 00:00:00 2001 From: Dituon <2544193782@qq.com> Date: Thu, 7 Jul 2022 11:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9bot=E5=8F=98=E8=81=AA=E6=98=8E(=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/xmmt/dituon/plugin/Petpet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/xmmt/dituon/plugin/Petpet.java b/src/main/java/xmmt/dituon/plugin/Petpet.java index b3fa8775..0164482b 100644 --- a/src/main/java/xmmt/dituon/plugin/Petpet.java +++ b/src/main/java/xmmt/dituon/plugin/Petpet.java @@ -37,7 +37,7 @@ public void onEnable() { try { this.reloadPluginConfig(PetPetAutoSaveConfig.INSTANCE); pluginPetService.readConfigByPluginAutoSave(); - } catch (Exception ignored){ + } catch (Exception ignored) { getLogger().error("Mirai 2.11.0 提供了新的 JavaAutoSaveConfig 方法, 请更新Mirai版本至 2.11.0 (不是2.11.0-M1)\n使用旧版本将无法配置config"); } @@ -62,7 +62,7 @@ private void onNudge(NudgeEvent e) { pluginPetService.sendImage((Group) e.getSubject(), (Member) e.getFrom(), (Member) e.getTarget(), true); } catch (Exception ex) { // 如果无法把被戳的对象转换为Member(只有Bot无法强制转换为Member对象) try { - pluginPetService.sendImage((Group) e.getSubject(), (Member) e.getFrom(), ((Group) e.getSubject()).getBotAsMember(), true); + pluginPetService.sendImage((Group) e.getSubject(), ((Group) e.getSubject()).getBotAsMember(), (Member) e.getFrom(), true); } catch (Exception ignored) { // 如果bot戳了别人 if (!pluginPetService.respondSelfNudge) return; pluginPetService.sendImage((Group) e.getSubject(), ((Group) e.getSubject()).getBotAsMember(), (Member) e.getFrom(), true);