From e61295dd3c96e3d146eecd85aff60272be05b60d Mon Sep 17 00:00:00 2001 From: rxdn Date: Wed, 8 Jul 2020 13:35:31 +0100 Subject: [PATCH] allow gifs --- public/templates/views/index.tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/templates/views/index.tmpl b/public/templates/views/index.tmpl index ab01911..2d08c51 100644 --- a/public/templates/views/index.tmpl +++ b/public/templates/views/index.tmpl @@ -78,7 +78,13 @@ } else { const icon = document.createElement('img'); icon.classList.add('guild-icon'); - icon.src = `https:\/\/cdn.discordapp.com/icons/${guild.id}/${guild.icon}.webp?size=256`; + + if (guild.icon.startsWith('a_')) { + icon.src = `https:\/\/cdn.discordapp.com/icons/${guild.id}/${guild.icon}.gif?size=256`; + } else { + icon.src = `https:\/\/cdn.discordapp.com/icons/${guild.id}/${guild.icon}.webp?size=256`; + } + guildContainer.appendChild(icon); }