class Discordrb::Webhooks::EmbedFooter
An embed's footer will be displayed at the very bottom of an embed, together with the timestamp. An icon URL can be set together with some text to be displayed.
Attributes
icon_url[RW]
@return [String, nil] URL to an icon to be showed alongside the text
text[RW]
@return [String, nil] text to be displayed in the footer
Public Class Methods
new(text: nil, icon_url: nil)
click to toggle source
Creates a new footer object. @param text [String, nil] The text to be displayed in the footer. @param icon_url
[String, nil] The URL to an icon to be showed alongside the text.
# File lib/discordrb/webhooks/embeds.rb, line 136 def initialize(text: nil, icon_url: nil) @text = text @icon_url = icon_url end
Public Instance Methods
to_hash()
click to toggle source
@return [Hash] a hash representation of this embed footer, to be converted to JSON.
# File lib/discordrb/webhooks/embeds.rb, line 142 def to_hash { text: @text, icon_url: @icon_url } end