mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: replace getMemberMap with gml
This commit is contained in:
parent
3709166b2d
commit
cf7da0d2c5
2 changed files with 4 additions and 4 deletions
|
|
@ -870,8 +870,8 @@ export class chatgpt extends plugin {
|
|||
if (e.user_id == getUin(e)) return false
|
||||
prompt = msg.trim()
|
||||
try {
|
||||
if (e.isGroup && typeof this.e.group.getMemberMap === 'function') {
|
||||
let mm = await this.e.group.getMemberMap()
|
||||
if (e.isGroup) {
|
||||
let mm = await this.e.bot.gml
|
||||
let me = mm.get(getUin(e)) || {}
|
||||
let card = me.card
|
||||
let nickname = me.nickname
|
||||
|
|
@ -1580,7 +1580,7 @@ export class chatgpt extends plugin {
|
|||
bingAIClient.opts.userToken = bingToken
|
||||
bingAIClient.opts.cookies = cookies
|
||||
// opt.messageType = allThrottled ? 'Chat' : 'SearchQuery'
|
||||
if (Config.enableGroupContext && e.isGroup && typeof e.group.getMemberMap === 'function') {
|
||||
if (Config.enableGroupContext && e.isGroup) {
|
||||
try {
|
||||
opt.groupId = e.group_id
|
||||
opt.qq = e.sender.user_id
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export async function getChatHistoryGroup (e, num) {
|
|||
}
|
||||
chats = chats.slice(0, num)
|
||||
try {
|
||||
let mm = await e.group.getMemberMap()
|
||||
let mm = await e.bot.gml
|
||||
for (const chat of chats) {
|
||||
if (e.adapter === 'shamrock') {
|
||||
if (chat.sender?.user_id === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue