Class: Discordrb::Webhooks::EmbedThumbnail

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/webhooks/embeds.rb

Overview

An embed's thumbnail will be displayed at the right of the message, next to the description and fields. When clicked it will point to the embed URL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url: nil) ⇒ EmbedThumbnail

Creates a new thumbnail object.



177
178
179
# File 'lib/discordrb/webhooks/embeds.rb', line 177

def initialize(url: nil)
  @url = url
end

Instance Attribute Details

#urlString?



173
174
175
# File 'lib/discordrb/webhooks/embeds.rb', line 173

def url
  @url
end

Instance Method Details

#to_hashHash



182
183
184
185
186
# File 'lib/discordrb/webhooks/embeds.rb', line 182

def to_hash
  {
    url: @url
  }
end