mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: groupId format error
This commit is contained in:
parent
5ccefa6fa6
commit
6d5a9ed97d
1 changed files with 2 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ export class SendPictureTool extends AbstractTool {
|
|||
let pictures = picture.trim().split(' ')
|
||||
pictures = pictures.map(img => segment.image(img))
|
||||
let groupList = await Bot.getGroupList()
|
||||
groupId = parseInt(groupId)
|
||||
try {
|
||||
if (groupList.get(groupId)) {
|
||||
let group = await Bot.pickGroup(groupId)
|
||||
|
|
@ -33,7 +34,7 @@ export class SendPictureTool extends AbstractTool {
|
|||
return `picture has been sent to user ${groupId}`
|
||||
}
|
||||
} catch (err) {
|
||||
return `failed to send pictures, error: ${err.toString()}`
|
||||
return `failed to send pictures, error: ${JSON.stringify(err)}`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue