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)
|
const smallImage = await fetch(smallUrl)
|
||||||
.then((res) => res.arrayBuffer())
|
.then((res) => res.arrayBuffer())
|
||||||
.then((b) => Buffer.from(b));
|
.then((b) => Buffer.from(b));
|
||||||
const smallImageSharp = sharp(smallImage).resize(20, 20);
|
const smallImageBuffer = sharp(smallImage)
|
||||||
|
.resize(20, 20)
|
||||||
|
.toBuffer();
|
||||||
|
|
||||||
presenceImage.composite([
|
presenceImage.composite([
|
||||||
{
|
{
|
||||||
input: smallImageSharp,
|
input: smallImageBuffer,
|
||||||
gravity: "southeast",
|
gravity: "southeast",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue