From 8dff79d3f7997c40d6e0c553f9c13681270bb173 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 12 Oct 2022 05:51:09 +0200 Subject: [PATCH] petpet: fix guild pfps --- src/plugins/petpet.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/petpet.ts b/src/plugins/petpet.ts index fb8c5de8..6b0fd4f0 100644 --- a/src/plugins/petpet.ts +++ b/src/plugins/petpet.ts @@ -42,7 +42,7 @@ function loadImage(source: File | string) { }); } -async function resolveImage(options: Argument[], ctx: CommandContext): Promise { +async function resolveImage(options: Argument[], ctx: CommandContext, noServerPfp: boolean): Promise { for (const opt of options) { switch (opt.name) { case "image": @@ -57,7 +57,7 @@ async function resolveImage(options: Argument[], ctx: CommandContext): Promise { const { GIFEncoder, quantize, applyPalette } = await getGifEncoder(); const frames = await getFrames(); + const noServerPfp = findOption(opts, "no-server-pfp", false); try { - var url = await resolveImage(opts, cmdCtx); + var url = await resolveImage(opts, cmdCtx, noServerPfp); if (!url) throw "No Image specified!"; } catch (err) { // Todo make this send a clyde message once that PR is done