无关紧要的小修改,支持一下频道插件 (#22)

* 无关紧要的修改,以支持某些插件
This commit is contained in:
2y8e9h22 2023-03-15 03:00:09 +08:00 committed by GitHub
parent 8d73a4275f
commit 23952c1eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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 })
}