Update server icons to display correctly in the dashboard
Correctly format the Discord CDN URL for guild icons in the /api/me endpoint response. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 68bc133b-90dd-45fd-a96b-f7ff6f10bf54 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/oWFvNCu Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
5c705c5792
commit
3b65492e74
1 changed files with 4 additions and 1 deletions
|
|
@ -167,7 +167,10 @@ function createWebServer(discordClient, supabase, options = {}) {
|
|||
avatarUrl: user.avatar
|
||||
? `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}.png`
|
||||
: `https://cdn.discordapp.com/embed/avatars/${parseInt(user.discriminator || '0') % 5}.png`,
|
||||
guilds: user.guilds
|
||||
guilds: user.guilds.map(g => ({
|
||||
...g,
|
||||
icon: g.icon ? `https://cdn.discordapp.com/icons/${g.id}/${g.icon}.png` : null
|
||||
}))
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue