From fd16c95b8f371cb2cf92c688ba253245e25bc46c Mon Sep 17 00:00:00 2001 From: matty Date: Mon, 5 Aug 2024 20:29:46 -0400 Subject: [PATCH] add nigbot build job --- build-avatars.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build-avatars.js b/build-avatars.js index 1ae25fab..b20dc91b 100755 --- a/build-avatars.js +++ b/build-avatars.js @@ -297,6 +297,24 @@ async function generateBotsAvatars () { }) .toFile(path.join(botOutputDir, '1.png')) } + + { + // Nigbot avatar for users + const inputDir = './assets/images/avatars/nctv' + const botOutputDir = './dist/server/bot_avatars/nctv/' + fs.mkdirSync(botOutputDir, { recursive: true }) + const buff = await sharp(path.join(inputDir, 'nigbot.png')) + .toBuffer() + + await sharp(buff) + .resize(60, 60) + .png({ + compressionLevel: 9, + palette: true + }) + .toFile(path.join(botOutputDir, '1.png')) + } + } if (isMainThread) {