better JPG name

This commit is contained in:
Atridad Lahiji 2023-07-17 23:43:16 -06:00
parent 2a2942135a
commit ddb436a02c
No known key found for this signature in database
GPG key ID: 7CB8245F56BC3880
2 changed files with 12 additions and 2 deletions

View file

@ -117,7 +117,12 @@ export class UserCommand extends Command {
const imageAttachment: AttachmentBuilder[] = [];
for (let i = 0; i < responseJSON.artifacts.length; i++) {
imageAttachment.push(new AttachmentBuilder(Buffer.from(responseJSON.artifacts[i].base64, 'base64')));
imageAttachment.push(
new AttachmentBuilder(Buffer.from(responseJSON.artifacts[i].base64, 'base64'), {
name: 'response.jpg',
description: "Himbot's Response"
})
);
}
const newCreditCountResponse = await fetch(`https://api.stability.ai/v1/user/balance`, {

View file

@ -119,7 +119,12 @@ export class UserCommand extends Command {
const imageAttachment: AttachmentBuilder[] = [];
for (let i = 0; i < responseJSON.artifacts.length; i++) {
imageAttachment.push(new AttachmentBuilder(Buffer.from(responseJSON.artifacts[i].base64, 'base64')));
imageAttachment.push(
new AttachmentBuilder(Buffer.from(responseJSON.artifacts[i].base64, 'base64'), {
name: 'response.jpg',
description: "Himbot's Response"
})
);
}
const newCreditCountResponse = await fetch(`https://api.stability.ai/v1/user/balance`, {