From 23952c1eb1445929e4a8a124cb206a4f20bd11d5 Mon Sep 17 00:00:00 2001 From: 2y8e9h22 <70102795+2y8e9h22@users.noreply.github.com> Date: Wed, 15 Mar 2023 03:00:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=85=B3=E7=B4=A7=E8=A6=81=E7=9A=84?= =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=94=AF=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E9=A2=91=E9=81=93=E6=8F=92=E4=BB=B6=20(#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 无关紧要的修改,以支持某些插件 --- lib/plugins/loader.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index b97f555..3db9b30 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -480,8 +480,12 @@ class PluginsLoader { if (at === true) { at = Number(e.user_id) } else if (!isNaN(at)) { - let info = e.group.pickMember(at).info - text = info?.card ?? info?.nickname + if (e.isGuild) { + text = e.sender?.nickname + } else { + let info = e.group.pickMember(at).info + text = info?.card ?? info?.nickname + } text = lodash.truncate(text, { length: 10 }) }