#how to get role icon url

1 messages · Page 1 of 1 (latest)

jaunty imp
#

there seems to be no helper for this

remote swallow
#

Isn't it there in Role object?

jaunty imp
#

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;
};```
remote swallow
#

icon sir

jaunty imp
#

icon is a bigint sir

remote swallow
#

That's how it's done sir

#

Applies for all icons, avatars etc.

jaunty imp
#

there is helper functions for every icon, but not for role icons sir?

remote swallow
#

There's a helper or util function to convert it to url somewhere

jaunty imp
#

thank you sir

remote swallow
jaunty imp
#

icon URL, splash URL, Banner URL

remote swallow
#

Anyway sir you can't expect getRoleName, getRoleIcon, getRolePosition etc.

jaunty imp
#

emoji URL

remote swallow
#

Then there's no endpoint for it I'd guess

jaunty imp
#

okay thank you sir

remote swallow
#

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

jaunty imp
#

client.utils.iconBigintToHash

#

thank you sir

#

there is a custom endpoint sir

remote swallow
#

Sir I was talking about api endpoints

remote swallow
jaunty imp
#

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

remote swallow
#

getGuildIconURL?

jaunty imp
#

yes sir

remote swallow
#

That's scam sir

#

Then idk

jaunty imp
#

okay sir thank you

#

todo for later

remote swallow
#

Welcome sir

vapid otter
#

https://cdn.discordapp.com/role-icons/<guildid>/<hash>.webp?size=64&quality=lossless is this helpful?