#how to get role icon url
1 messages · Page 1 of 1 (latest)
Isn't it there in Role object?
no sir
{
icon?: bigint | undefined;
botId?: bigint | undefined;
integrationId?: bigint | undefined;
unicodeEmoji?: string | undefined;
id: bigint;
guildId: bigint;
position: number;
name: string;
permissions: bigint;
color: number;
toggles: RoleToggles;
};```
icon sir
icon is a bigint sir
there is helper functions for every icon, but not for role icons sir?
There's a helper or util function to convert it to url somewhere
thank you sir
What every icon function sir
icon URL, splash URL, Banner URL
Anyway sir you can't expect getRoleName, getRoleIcon, getRolePosition etc.
emoji URL
Then there's no endpoint for it I'd guess
okay thank you sir
Anyway take the bigint, there's a helper or util to get it as url
Like iconhashtobigint Or so
I forgot but something like that
Sir I was talking about api endpoints
These are api endpoints I believe
no sir, these are cdn URLs
GUILD_ICON: (guildId: BigString, icon: string) => {
return `${baseEndpoints.CDN_URL}/icons/${guildId}/${icon}`;
},```
just a todo for the future maybe sir
Which one sir
getGuildIconURL?
yes sir
Welcome sir
https://cdn.discordapp.com/role-icons/<guildid>/<hash>.webp?size=64&quality=lossless is this helpful?