utility.presence: async moment

This commit is contained in:
Cynthia Foxwell 2022-10-10 13:15:26 -06:00
parent 2eaeb5c583
commit c87d1e1422

View file

@ -816,7 +816,7 @@ presence.callback = async function (msg, line) {
const smallImage = await fetch(smallUrl) const smallImage = await fetch(smallUrl)
.then((res) => res.arrayBuffer()) .then((res) => res.arrayBuffer())
.then((b) => Buffer.from(b)); .then((b) => Buffer.from(b));
const smallImageBuffer = sharp(smallImage) const smallImageBuffer = await sharp(smallImage)
.resize(20, 20) .resize(20, 20)
.toBuffer(); .toBuffer();
@ -829,7 +829,7 @@ presence.callback = async function (msg, line) {
} }
files.push({ files.push({
content: presenceImage.toBuffer(), content: await presenceImage.toBuffer(),
name: `${index}.png`, name: `${index}.png`,
}); });
embed.thumbnail = { embed.thumbnail = {