Class: Discordrb::Embed

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

Overview

An Embed object that is contained in a message A freshly generated embed object will not appear in a message object unless grabbed from its ID in a channel.

Instance Attribute Summary collapse

Instance Attribute Details

#authorEmbedAuthor? (readonly)

Returns the author of the embed object. nil is there is not an author.

Returns:

  • (EmbedAuthor, nil)

    the author of the embed object. nil is there is not an author



1558
1559
1560
# File 'lib/discordrb/data.rb', line 1558

def author
  @author
end

#descriptionString? (readonly)

Returns the description of the embed object. nil if there is not a description.

Returns:

  • (String, nil)

    the description of the embed object. nil if there is not a description



1542
1543
1544
# File 'lib/discordrb/data.rb', line 1542

def description
  @description
end

#messageMessage (readonly)

Returns the message this embed object is contained in.

Returns:

  • (Message)

    the message this embed object is contained in.



1533
1534
1535
# File 'lib/discordrb/data.rb', line 1533

def message
  @message
end

#providerEmbedProvider? (readonly)

Returns the provider of the embed object. nil is there is not a provider.

Returns:

  • (EmbedProvider, nil)

    the provider of the embed object. nil is there is not a provider



1552
1553
1554
# File 'lib/discordrb/data.rb', line 1552

def provider
  @provider
end

#thumbnailEmbedThumbnail? (readonly)

Returns the thumbnail of the embed object. nil is there is not a thumbnail.

Returns:

  • (EmbedThumbnail, nil)

    the thumbnail of the embed object. nil is there is not a thumbnail



1555
1556
1557
# File 'lib/discordrb/data.rb', line 1555

def thumbnail
  @thumbnail
end

#titleString? (readonly)

Returns the title of the embed object. nil if there is not a title.

Returns:

  • (String, nil)

    the title of the embed object. nil if there is not a title



1539
1540
1541
# File 'lib/discordrb/data.rb', line 1539

def title
  @title
end

#typeSymbol (readonly)

Returns the type of the embed object. Possible types are:

  • :link
  • :video
  • :image.

Returns:

  • (Symbol)

    the type of the embed object. Possible types are:

    • :link
    • :video
    • :image


1549
1550
1551
# File 'lib/discordrb/data.rb', line 1549

def type
  @type
end

#urlString (readonly)

Returns the URL this embed object is based on.

Returns:

  • (String)

    the URL this embed object is based on.



1536
1537
1538
# File 'lib/discordrb/data.rb', line 1536

def url
  @url
end