feat: support user guilds

backport #10995
This commit is contained in:
Elysia
2025-09-13 18:04:34 +07:00
parent ad64e2be11
commit 6fbb62ac64
3 changed files with 87 additions and 56 deletions

View File

@@ -97,7 +97,7 @@ exports.Endpoints = {
return makeImageUrl(`${root}/avatars/${userId}/${hash}`, { format, size });
},
AvatarDecoration: hash => makeImageUrl(`${root}/avatar-decoration-presets/${hash}`, { format: 'png' }),
ClanBadge: (guildId, hash) => `${root}/clan-badges/${guildId}/${hash}.png`,
GuildTagBadge: (guildId, hash) => `${root}/guild-tag-badges/${guildId}/${hash}.png`,
GuildMemberAvatar: (guildId, memberId, hash, format = 'webp', size, dynamic = false) => {
if (dynamic && hash.startsWith('a_')) format = 'gif';
return makeImageUrl(`${root}/guilds/${guildId}/users/${memberId}/avatars/${hash}`, { format, size });