Class: Discordrb::Collectibles::Nameplate

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

Overview

Collectable background images shown on a user's name in the member's tab.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#assetString (readonly)

Returns the path to the nameplate asset.

Returns:

  • (String)

    the path to the nameplate asset.



21
22
23
# File 'lib/discordrb/data/collectibles.rb', line 21

def asset
  @asset
end

#labelString (readonly)

Returns the label of the nameplate.

Returns:

  • (String)

    the label of the nameplate.



24
25
26
# File 'lib/discordrb/data/collectibles.rb', line 24

def label
  @label
end

#paletteSymbol (readonly)

Returns the background color of the nameplate.

Returns:

  • (Symbol)

    the background color of the nameplate.



27
28
29
# File 'lib/discordrb/data/collectibles.rb', line 27

def palette
  @palette
end

#sku_idInteger (readonly)

Returns ID of the nameplate's SKU.

Returns:

  • (Integer)

    ID of the nameplate's SKU.



18
19
20
# File 'lib/discordrb/data/collectibles.rb', line 18

def sku_id
  @sku_id
end

Instance Method Details

#urlString

Utility method to get the URL of this nameplate.

Returns:

  • (String)

    CDN url of this nameplate.



40
41
42
# File 'lib/discordrb/data/collectibles.rb', line 40

def url
  API.nameplate_url(@asset)
end