better JPG name
This commit is contained in:
parent
2a2942135a
commit
ddb436a02c
2 changed files with 12 additions and 2 deletions
|
@ -117,7 +117,12 @@ export class UserCommand extends Command {
|
||||||
const imageAttachment: AttachmentBuilder[] = [];
|
const imageAttachment: AttachmentBuilder[] = [];
|
||||||
|
|
||||||
for (let i = 0; i < responseJSON.artifacts.length; i++) {
|
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`, {
|
const newCreditCountResponse = await fetch(`https://api.stability.ai/v1/user/balance`, {
|
||||||
|
|
|
@ -119,7 +119,12 @@ export class UserCommand extends Command {
|
||||||
const imageAttachment: AttachmentBuilder[] = [];
|
const imageAttachment: AttachmentBuilder[] = [];
|
||||||
|
|
||||||
for (let i = 0; i < responseJSON.artifacts.length; i++) {
|
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`, {
|
const newCreditCountResponse = await fetch(`https://api.stability.ai/v1/user/balance`, {
|
||||||
|
|
Loading…
Add table
Reference in a new issue