utility.presence: fix small image
This commit is contained in:
parent
8f4b230326
commit
2eaeb5c583
1 changed files with 4 additions and 2 deletions
|
@ -816,11 +816,13 @@ presence.callback = async function (msg, line) {
|
|||
const smallImage = await fetch(smallUrl)
|
||||
.then((res) => res.arrayBuffer())
|
||||
.then((b) => Buffer.from(b));
|
||||
const smallImageSharp = sharp(smallImage).resize(20, 20);
|
||||
const smallImageBuffer = sharp(smallImage)
|
||||
.resize(20, 20)
|
||||
.toBuffer();
|
||||
|
||||
presenceImage.composite([
|
||||
{
|
||||
input: smallImageSharp,
|
||||
input: smallImageBuffer,
|
||||
gravity: "southeast",
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue