Class: Discordrb::AvatarDecoration

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/data/avatar_decoration.rb

Overview

A decoration displayed on a user's avatar.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#decoration_idString (readonly)

Returns ID that can be used to generate an avatar decoration URL.

Returns:

  • (String)

    ID that can be used to generate an avatar decoration URL.

See Also:



11
12
13
# File 'lib/discordrb/data/avatar_decoration.rb', line 11

def decoration_id
  @decoration_id
end

#sku_idInteger (readonly)

Returns ID of the avatar decoration's SKU.

Returns:

  • (Integer)

    ID of the avatar decoration's SKU.



7
8
9
# File 'lib/discordrb/data/avatar_decoration.rb', line 7

def sku_id
  @sku_id
end

Instance Method Details

#urlString

Utility method to get an avatar decoration URL.

Returns:

  • (String)

    the URL to the avatar decoration.



22
23
24
# File 'lib/discordrb/data/avatar_decoration.rb', line 22

def url
  API.avatar_decoration_url(@decoration_id)
end