兼容trss (#723)

Co-authored-by: Jin1c on imini <Jin0x31c@gmail.com>
This commit is contained in:
青青 2024-10-29 16:01:55 +08:00 committed by GitHub
parent aa2ac7b5d3
commit 2b9734c641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -186,13 +186,14 @@ export class Update extends plugin {
* @returns
*/
async makeForwardMsg (title, msg, end) {
let nickname = (this.e.bot ?? Bot).nickname
const _bot = this.e.bot ?? Bot
let nickname = _bot.nickname
if (this.e.isGroup) {
let info = await (this.e.bot ?? Bot).getGroupMemberInfo(this.e.group_id, (this.e.bot ?? Bot).uin)
let info = await _bot?.pickMember?.(this.e.group_id, _bot.uin) || await _bot?.getGroupMemberInfo?.(this.e.group_id, _bot.uin)
nickname = info.card || info.nickname
}
let userInfo = {
user_id: (this.e.bot ?? Bot).uin,
user_id: _bot.uin,
nickname
}