Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Avatar

Generates and modifies avatar URLs according to the given arguments

Hierarchy

  • Avatar

Index

Methods

Static bannerURL

  • Returns a guild's banner image URL

    Parameters

    • hash: string

      The banner hash

    • id: Snowflake

      The ID of the guild

    • Default value format: GuildBannerFormat = GuildBannerFormat.PNG

      The format of the returned banner image

    • Optional size: undefined | number

      The size of the returned banner image

    Returns string

Static discoverySplashURL

  • Returns a guild's discovery splash image URL

    Parameters

    • hash: string

      The discovery splash hash

    • id: Snowflake

      The ID of the guild

    • Default value format: GuildDiscoverySplashFormat = GuildDiscoverySplashFormat.PNG

      The format of the returned discovery splash image

    • Optional size: undefined | number

      The size of the returned discovery splash image

    Returns string

Static emojiURL

  • Returns a guild emoji's image

    Parameters

    • id: Snowflake

      The ID of the emoji

    • Default value format: GuildEmojiFormat = GuildEmojiFormat.PNG

      The format of the returned emoji image

    • Optional size: undefined | number

      The size of the returned emoji image

    Returns string

Static guildURL

  • Returns a guild's icon

    Parameters

    • hash: string

      The guild's icon hash

    • id: Snowflake

      The ID of the guild

    • Default value format: GuildIconFormat = GuildIconFormat.PNG

      The format of the returned icon image

    • Optional size: undefined | number

      The size of the returned icon image

    Returns string

Static splashURL

  • Returns a guild's splash image URL

    Parameters

    • hash: string

      The splash hash

    • id: Snowflake

      The ID of the guild

    • Default value format: GuildSplashFormat = GuildSplashFormat.PNG

      The format of the returned splash image

    • Optional size: undefined | number

      The size of the returned splash image

    Returns string

Static userAvatarURL

  • userAvatarURL(hash: string | null, id: Snowflake, hashtag: string, format?: UserAvatarFormat, size?: undefined | number): string
  • Returns a user's avatar URL. Returns the default user avatar if the user does not have an avatar. Note: the default user avatar only supports type Format.PNG

    Parameters

    • hash: string | null

      The user's avatar hash

    • id: Snowflake

      The user's ID

    • hashtag: string

      the user's hashtag

    • Default value format: UserAvatarFormat = UserAvatarFormat.PNG

      The avatar image format

    • Optional size: undefined | number

      The avatar image size

    Returns string

Generated using TypeDoc