Fix random errors

This commit is contained in:
smartfridge 2021-12-13 00:39:32 +01:00 committed by GitHub
parent 69a8452574
commit 08e9ae5218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,11 +10,11 @@ export default new NamedCommand({
const attachment = message.attachments.first()!;
const gif = await petPetGif(attachment.url);
const file = new MessageAttachment(gif, "pat.gif");
send({attachments: [file]});
send({files: [file]});
} else {
const gif = await petPetGif(author.displayAvatarURL({format: "png"}));
const file = new MessageAttachment(gif, "pat.gif");
send({attachments: [file]});
send({files: [file]});
}
},
id: "user",
@ -24,7 +24,7 @@ export default new NamedCommand({
const user: User = args[0];
const gif = await petPetGif(user.displayAvatarURL({format: "png"}));
const file = new MessageAttachment(gif, "pat.gif");
send({attachments: [file]});
send({files: [file]});
}
}),
any: new RestCommand({
@ -36,7 +36,7 @@ export default new NamedCommand({
else {
const gif = await petPetGif(user.displayAvatarURL({format: "png"}));
const file = new MessageAttachment(gif, "pat.gif");
send({attachments: [file]});
send({files: [file]});
}
}
})