Module: Discordrb::ServerAttributes
- Included in:
- Light::UltraLightServer, Server
- Defined in:
- lib/discordrb/data.rb
Overview
Basic attributes a server should have
Instance Attribute Summary collapse
-
#icon_id ⇒ String
readonly
The hexadecimal ID used to identify this server's icon.
-
#name ⇒ String
readonly
This server's name.
Instance Method Summary collapse
-
#icon_url ⇒ String
Utility function to get the URL for the icon image.
Instance Attribute Details
#icon_id ⇒ String (readonly)
Returns the hexadecimal ID used to identify this server's icon.
2756 2757 2758 |
# File 'lib/discordrb/data.rb', line 2756 def icon_id @icon_id end |
#name ⇒ String (readonly)
Returns this server's name.
2753 2754 2755 |
# File 'lib/discordrb/data.rb', line 2753 def name @name end |
Instance Method Details
#icon_url ⇒ String
Utility function to get the URL for the icon image
2760 2761 2762 2763 |
# File 'lib/discordrb/data.rb', line 2760 def icon_url return nil unless @icon_id API.icon_url(@id, @icon_id) end |