%
for(var i in req.session.guilds){ %>
<% if((req.session.guilds[i].permissions & 0x00000020) == 0x00000020){ %>
<% if(!bot.guilds.cache.get(req.session.guilds[i].id)){
let icon = `https://cdn.discordapp.com/icons/${req.session.guilds[i].id}/${req.session.guilds[i].icon}.png`;
const friendlyName = req.session.guilds[i].name.replace('`', '');
if (!req.session.guilds[i].icon) icon = themeConfig.iconURL;
%>
<% }else{
const guild = bot.guilds.cache.get(req.session.guilds[i].id);
let icon;
if (!guild.iconURL()) icon = themeConfig.iconURL;
else icon = guild.iconURL();
const friendlyName = guild.name.replace('`', '');
%>
<%
}
}
}
%>